pub struct WidgetBuilder {
Show 32 fields pub name: String, pub width: f32, pub height: f32, pub desired_position: Vector2<f32>, pub vertical_alignment: VerticalAlignment, pub horizontal_alignment: HorizontalAlignment, pub max_size: Option<Vector2<f32>>, pub min_size: Option<Vector2<f32>>, pub background: Option<Brush>, pub foreground: Option<Brush>, pub row: usize, pub column: usize, pub margin: Thickness, pub children: Vec<Handle<UiNode>>, pub is_hit_test_visible: bool, pub visibility: bool, pub z_index: usize, pub allow_drag: bool, pub allow_drop: bool, pub user_data: Option<Rc<dyn Any>>, pub draw_on_top: bool, pub enabled: bool, pub cursor: Option<CursorIcon>, pub opacity: Option<f32>, pub tooltip: Rc<Handle<UiNode>>, pub tooltip_time: f32, pub context_menu: Handle<UiNode>, pub preview_messages: bool, pub handle_os_events: bool, pub layout_transform: Matrix3<f32>, pub render_transform: Matrix3<f32>, pub clip_to_bounds: bool,
}

Fields§

§name: String§width: f32§height: f32§desired_position: Vector2<f32>§vertical_alignment: VerticalAlignment§horizontal_alignment: HorizontalAlignment§max_size: Option<Vector2<f32>>§min_size: Option<Vector2<f32>>§background: Option<Brush>§foreground: Option<Brush>§row: usize§column: usize§margin: Thickness§children: Vec<Handle<UiNode>>§is_hit_test_visible: bool§visibility: bool§z_index: usize§allow_drag: bool§allow_drop: bool§user_data: Option<Rc<dyn Any>>§draw_on_top: bool§enabled: bool§cursor: Option<CursorIcon>§opacity: Option<f32>§tooltip: Rc<Handle<UiNode>>§tooltip_time: f32§context_menu: Handle<UiNode>§preview_messages: bool§handle_os_events: bool§layout_transform: Matrix3<f32>§render_transform: Matrix3<f32>§clip_to_bounds: bool

Implementations§

Sets the desired tooltip for the node.

Important

The widget will share the tooltip, which means that when widget will be deleted, the tooltip will be deleted only if there’s no one use the tooltip anymore.

The context menu receives PopupMessages for being displayed, and so should support those.

Trait Implementations§

Returns the “default value” for a type. Read more

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
Casts self to a &dyn Any

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 alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Checks if self is actually part of its subset T (and can be converted to it).
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
The inclusion map: converts self to the equivalent element of its superset.
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.