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

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 implement this trait.

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

Required Methods

A constructor for the structure. It should initialize 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).

Implementors