Struct titanium::desktop::gui::GuiInstance
pub struct GuiInstance<State> { /* private fields */ }
Expand description
A struct that can be used to create a GUI instance.
Implementations§
§impl<State> GuiInstance<State>where
State: Data,
impl<State> GuiInstance<State>where State: Data,
pub fn new<W>(root: W) -> GuiInstance<State>where
W: Widget<State> + 'static,
pub fn new<W>(root: W) -> GuiInstance<State>where W: Widget<State> + 'static,
Creates a new GUI instance with the given root widget.
pub fn window(
self,
f: impl FnOnce(WindowDesc<State>) -> WindowDesc<State>
) -> GuiInstance<State>
pub fn window( self, f: impl FnOnce(WindowDesc<State>) -> WindowDesc<State> ) -> GuiInstance<State>
Sets the settings for the window.
pub fn with_initial_state(self, state: State) -> GuiInstance<State>
pub fn with_initial_state(self, state: State) -> GuiInstance<State>
Sets the initial state of the GUI.
pub fn configure_env(
self,
f: impl Fn(&mut Env, &State) + 'static
) -> GuiInstance<State>
pub fn configure_env( self, f: impl Fn(&mut Env, &State) + 'static ) -> GuiInstance<State>
Configures the environment variables of the GUI.
Trait Implementations§
§impl Debug for GuiInstance<()>
impl Debug for GuiInstance<()>
§impl Default for GuiInstance<AppState>
impl Default for GuiInstance<AppState>
§fn default() -> GuiInstance<AppState>
fn default() -> GuiInstance<AppState>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<State> !RefUnwindSafe for GuiInstance<State>
impl<State> !Send for GuiInstance<State>
impl<State> !Sync for GuiInstance<State>
impl<State> Unpin for GuiInstance<State>where State: Unpin,
impl<State> !UnwindSafe for GuiInstance<State>
Blanket Implementations§
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.