Module vizia_core::modifiers
source · Expand description
Methods on views for changing their properties or for adding actions.
§Examples
Modifiers can be used to apply inline style and layout properties to a view:
// Sets the background color of the label to red.
Label::new(cx, "Hello World")
.background_color(Color::red());
// Sets the width of the label to be 100 pixels.
Label::new(cx, "Hello World")
.width(Pixels(100.0));
Modifiers can also be used to add actions to a view:
// Closes the window when the label is pressed.
Label::new(cx, "Hello World")
.on_press(|cx| cx.emit(WindowEvent::WindowClose));
Modules§
- Derived lenses for
ModalModel
.
Structs§
Enums§
Traits§
- Modifiers for changing the abilities of a view.
- Modifiers for changing the accessibility properties of a view.
- Modifiers which add an action callback to a view.
- Modifiers for changing the layout properties of a view.
- Modifiers for changing the style properties of a view.
- Modifiers for changing the text properties of a view.