[][src]Trait native_windows_gui::NativeUi

pub trait NativeUi<UI> {
    fn build_ui(inital_state: Self) -> Result<UI, NwgError>;
}

A structure that implements this trait is considered a GUI structure. The structure will hold GUI components and possibly user data.

The goal of NativeUi and PartialUi is to provide a common way to define NWG applications. Native-windows-derive can automatically implements this trait.

For an example on how to implement this trait, see the Small application layout section in the NWG documentation.

Required methods

fn build_ui(inital_state: Self) -> Result<UI, NwgError>

A constructor for the structure. It should initializes the GUI components and bind GUI events.

Parameters:

  • inital_state: should contain the initial user data. NativeUi assumes this data will be wrapped in another type (UI).
Loading content...

Implementors

Loading content...