Struct druid::Ui

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

The main access point for manipulating the UI.

Implementations

Send an arbitrary payload to a widget. The type and interpretation of the payload depends on the specific target widget.

Put a widget in the graph and add its children. Returns newly allocated id for the node.

Set the focused widget.

Add a listener that expects a specific type.

Add a child dynamically, in the last position.

Add a child dynamically, before the given sibling.

Remove a child.

Can panic if child is not a valid child. The child is not deleted, but can be added again later. The listeners for the child are not cleared.

Delete a child.

Can panic if child is not a valid child. Deletes the subtree rooted at the child, drops those widgets, and clears all listeners. The id of the child may be reused; callers should take care not to use the child id in any way afterwards.

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.