Module modifiers

Module 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));

Structs§

LinearGradientBuilder
A builder for constructing linear gradients.
ShadowBuilder
A builder for constructing a shadow.

Enums§

ModalEvent
An event used to modify the modal properties of a view, such as an attached tooltip.

Traits§

AbilityModifiers
Modifiers for changing the abilities of a view.
AccessibilityModifiers
Modifiers for changing the accessibility properties of a view.
ActionModifiers
Modifiers which add an action callback to a view.
LayoutModifiers
Modifiers for changing the layout properties of a view.
StyleModifiers
Modifiers for changing the style properties of a view.
TextModifiers
Modifiers for changing the text properties of a view.