logo
pub struct DrawerElement {
    pub component: Rc<RefCell<WidgetComponent>>,
    pub child: Box<dyn Element>,
    pub focused: Option<Id>,
    pub marked: Option<Id>,
    pub captured: Option<Id>,
    pub focus_invalid: bool,
    pub scale: f32,
    pub onfocusedchange: Signal<Id>,
    pub onmarkedchange: Signal<Id>,
    pub oncapturedchange: Signal<Id>,
    pub onscalechange: Signal<ScaleChangeEvent>,
    pub node: Node,
    /* private fields */
}
Expand description

A Drawer is a layout-only object and it do not requires a rendering instance. It and handles all incoming events, propagating them to the children. Additional Signals: none

Fields

component: Rc<RefCell<WidgetComponent>>child: Box<dyn Element>focused: Option<Id>

The current focused control, None if none

marked: Option<Id>

The current marked control, None if none

captured: Option<Id>

The current modal control, None if none

focus_invalid: bool

Whether or not the current focus needs refreshing.

scale: f32

The canvas scale factor. Note that this value is a hint for rendering the canvas, it does not affect any coordinates directly.

onfocusedchange: Signal<Id>

An event for when the focused state changes

onmarkedchange: Signal<Id>

An event for when the marked state changes

oncapturedchange: Signal<Id>

An event for when the captured state changes

onscalechange: Signal<ScaleChangeEvent>

On scale changed

node: Node

Implementations

Get the top most control under the given point, or None if there is none (or is the canvas itself)

The canvas scale factor. Note that this value is a hint for rendering the canvas, it does not affect any coordinates directly.

The canvas scale factor. Note that this value is a hint for rendering the canvas, it does not affect any coordinates directly.

The current focused control, None if none

The current modal control, None if none

The current modal control, None if none

The current marked control, None if none

The current marked control, None if none

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.

Formats the value using the given formatter. Read more

The control this one is clipped by

The control this one is clipped by

If the control is visible

If the control is visible

If the control is visible

The child must be sure that his parent reference is correct. The child must remove the parent reference by himself: child.set_parent(None); Read more

The x position of the control bounds, world coordinate

The x position of the control bounds, world coordinate

The y position of the control bounds, world coordinate

The y position of the control bounds, world coordinate

The minimum width

The minimum width

The minimum height

The minimum height

The maximum width

The maximum width

The maximum height

The maximum height

The width of the control bounds

The width of the control bounds

The height of the control bounds

The height of the control bounds

The x position of the control bounds, relative to its container

The y position of the control bounds, relative to its container

The x position of the control bounds, relative to its container

The y position of the control bounds, relative to its container

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.

Typed getter

Inspect the context.

Inspect the context.

Inspect the context.

Calls U::from(self).

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

Convert into color

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

Sets value as a parameter of self.

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.