Struct druid::UiMain

source ·
pub struct UiMain { /* private fields */ }
Expand description

The top-level handler for the UI.

This struct ultimately has ownership of all components within the UI. It implements the WinHandler trait of druid-win-shell, and, after the UI is built, ownership is transferred to the window, through set_handler in the druid-win-shell window building sequence.

Implementations

Send an event to a specific widget. This calls the widget’s poke method at some time in the future.

Trait Implementations

Provide the handler with a handle to the window so that it can invalidate or make other requests. Read more
Request the handler to paint the window contents. Return value indicates whether window is animating, i.e. whether another paint should be scheduled for the next animation frame. Read more
Called when a menu item is selected.
Called on keyboard input of a single character. This corresponds to the WM_CHAR message. Handling of text input will continue to evolve, we need to handle input methods and more. Read more
Called on a key down event. This corresponds to the WM_KEYDOWN message. The key code is as WM_KEYDOWN. We’ll want to add stuff like the modifier state. Read more
Called on a mouse wheel event. This corresponds to a WM_MOUSEWHEEL message. Read more
Called on a mouse horizontal wheel event. This corresponds to a WM_MOUSEHWHEEL message. Read more
Called when the mouse moves. Note that the x, y coordinates are in absolute pixels. Read more
Called on mouse button up or down. Note that the x, y coordinates are in absolute pixels. Read more
Called when the window is being destroyed. Note that this happens earlier in the sequence than drop (at WM_DESTROY, while the latter is WM_NCDESTROY). Read more
Get a reference to the handler state. Used mostly by idle handlers.
Called when the size of the window is changed. Note that size is in physical pixels. Read more
Called when the resources need to be rebuilt.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.