Struct fyrox_ui::rect::RectEditor

source ·
pub struct RectEditor<T>where
    T: NumericType,
{ pub widget: Widget, pub position: Handle<UiNode>, pub size: Handle<UiNode>, pub value: Rect<T>, }

Fields§

§widget: Widget§position: Handle<UiNode>§size: Handle<UiNode>§value: Rect<T>

Methods from Deref<Target = Widget>§

Returns size of the widget without any layout or rendering transform applied.

Searches a node up on tree starting from given root that matches a criteria defined by a given func.

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

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Allows a widget to provide access to inner components. For example you can build your custom MyTree widget using engine’s Tree widget as a base. The engine needs to know whether the custom widget is actually extends functionality of some existing widget. Read more
Performs event-specific actions. Must call widget.handle_message()! Read more
Used to react to a message (by producing another message) that was posted outside of current hierarchy. In other words this method is used when you need to “peek” a message before it’ll be passed into bubbling router. Most common use case is to catch messages from popups: popup in 99.9% cases is a child of root canvas and it won’t receive a message from a its logical parent during bubbling message routing. For example preview_message used in a dropdown list: dropdown list has two separate parts - a field with selected value and a popup for all possible options. Visual parent of the popup in this case is the root canvas, but logical parent is the dropdown list. Because of this fact, the field won’t receive any messages from popup, to solve this we use preview_message. This method is much more restrictive - it does not allow you to modify a node and ui, you can either request changes by sending a message or use internal mutability (Cell, RefCell, etc). Read more
Provides a way to respond to OS specific events. Can be useful to detect if a key or mouse button was pressed. This method significantly differs from handle_message because os events are not dispatched - they’ll be passed to this method in any case. Read more
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.