Struct fyrox::gui::animation::AnimationPlayer

source ·
pub struct AnimationPlayer { /* private fields */ }
Expand description

Animation player is a node that contains multiple animations. It updates and plays all the animations. The node could be a source of animations for animation blending state machines. To learn more about animations, see Animation docs.

Implementations§

source§

impl AnimationPlayer

source

pub const WIDGET: &'static str = "widget"

source

pub const ANIMATIONS: &'static str = "animations"

source

pub const AUTO_APPLY: &'static str = "auto_apply"

source§

impl AnimationPlayer

source

pub fn set_auto_apply(&mut self, auto_apply: bool)

Enables or disables automatic animation pose applying. Every animation in the node is updated first, and then their output pose could be applied to the graph, so the animation takes effect. Automatic applying is useful when you need your animations to be applied immediately to the graph, but in some cases (if you’re using animation blending state machines for example) this functionality is undesired.

source

pub fn is_auto_apply(&self) -> bool

Returns true if the node is automatically applying output poses of animations to the graph, false - otherwise.

source

pub fn animations( &self, ) -> &InheritableVariable<AnimationContainer<Handle<UiNode>>>

Returns a reference to internal animations container.

source

pub fn animations_mut( &mut self, ) -> &mut InheritableVariable<AnimationContainer<Handle<UiNode>>>

Returns a reference to internal animations container. Keep in mind that mutable access to InheritableVariable may have side effects if used inappropriately. Checks docs for InheritableVariable for more info.

source

pub fn set_animations(&mut self, animations: AnimationContainer<Handle<UiNode>>)

Sets new animations container of the animation player.

Methods from Deref<Target = Widget>§

source

pub const NAME: &'static str = "name"

source

pub const DESIRED_LOCAL_POSITION: &'static str = "desired_local_position"

source

pub const WIDTH: &'static str = "width"

source

pub const HEIGHT: &'static str = "height"

source

pub const MIN_SIZE: &'static str = "min_size"

source

pub const MAX_SIZE: &'static str = "max_size"

source

pub const BACKGROUND: &'static str = "background"

source

pub const FOREGROUND: &'static str = "foreground"

source

pub const ROW: &'static str = "row"

source

pub const COLUMN: &'static str = "column"

source

pub const VERTICAL_ALIGNMENT: &'static str = "vertical_alignment"

source

pub const HORIZONTAL_ALIGNMENT: &'static str = "horizontal_alignment"

source

pub const MARGIN: &'static str = "margin"

source

pub const VISIBILITY: &'static str = "visibility"

source

pub const HIT_TEST_VISIBILITY: &'static str = "hit_test_visibility"

source

pub const Z_INDEX: &'static str = "z_index"

source

pub const ALLOW_DRAG: &'static str = "allow_drag"

source

pub const ALLOW_DROP: &'static str = "allow_drop"

source

pub const DRAW_ON_TOP: &'static str = "draw_on_top"

source

pub const ENABLED: &'static str = "enabled"

source

pub const CURSOR: &'static str = "cursor"

source

pub const OPACITY: &'static str = "opacity"

source

pub const TOOLTIP: &'static str = "tooltip"

source

pub const TOOLTIP_TIME: &'static str = "tooltip_time"

source

pub const CONTEXT_MENU: &'static str = "context_menu"

source

pub const CLIP_TO_BOUNDS: &'static str = "clip_to_bounds"

source

pub const PREVIEW_MESSAGES: &'static str = "preview_messages"

source

pub const HANDLE_OS_EVENTS: &'static str = "handle_os_events"

source

pub const TAB_INDEX: &'static str = "tab_index"

source

pub const TAB_STOP: &'static str = "tab_stop"

source

pub const NEED_UPDATE: &'static str = "need_update"

source

pub const IGNORE_LAYOUT_ROUNDING: &'static str = "ignore_layout_rounding"

source

pub const ACCEPTS_INPUT: &'static str = "accepts_input"

source

pub const ID: &'static str = "id"

source

pub const RESOURCE: &'static str = "resource"

source

pub fn handle(&self) -> Handle<UiNode>

Returns self handle of the widget.

source

pub fn name(&self) -> &str

Returns the name of the widget.

source

pub fn set_name<P>(&mut self, name: P) -> &mut Widget
where P: AsRef<str>,

Sets the new name of the widget.

source

pub fn actual_local_size( &self, ) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

Returns the actual size of the widget after the full layout cycle.

source

pub fn actual_initial_size( &self, ) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

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

source

pub fn actual_global_size( &self, ) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

Returns the actual global size of the widget after the full layout cycle.

source

pub fn set_min_size( &mut self, value: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, ) -> &mut Widget

Sets the new minimum size of the widget.

source

pub fn set_min_width(&mut self, value: f32) -> &mut Widget

Sets the new minimum width of the widget.

source

pub fn set_min_height(&mut self, value: f32) -> &mut Widget

Sets the new minimum height of the widget.

source

pub fn min_size( &self, ) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

Sets the new minimum size of the widget.

source

pub fn min_width(&self) -> f32

Returns the minimum width of the widget.

source

pub fn min_height(&self) -> f32

Returns the minimum height of the widget.

source

pub fn is_drag_allowed(&self) -> bool

Return true if the dragging of the widget is allowed, false - otherwise.

source

pub fn is_drop_allowed(&self) -> bool

Return true if the dropping of other widgets is allowed on this widget, false - otherwise.

source

pub fn screen_to_local( &self, point: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, ) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

Maps the given point from screen to local widget’s coordinates.

source

pub fn invalidate_layout(&self)

Invalidates layout of the widget. WARNING: Do not use this method, unless you understand what you’re doing, it will cause new layout pass for this widget which could be quite heavy and doing so on every frame for multiple widgets will cause severe performance issues.

source

pub fn invalidate_measure(&self)

Invalidates measurement results of the widget. WARNING: Do not use this method, unless you understand what you’re doing, it will cause new measurement pass for this widget which could be quite heavy and doing so on every frame for multiple widgets will cause severe performance issues.

source

pub fn invalidate_arrange(&self)

Invalidates arrangement results of the widget. WARNING: Do not use this method, unless you understand what you’re doing, it will cause new arrangement pass for this widget which could be quite heavy and doing so on every frame for multiple widgets will cause severe performance issues.

source

pub fn is_hit_test_visible(&self) -> bool

Returns true if the widget is able to participate in hit testing, false - otherwise.

source

pub fn set_max_size( &mut self, value: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, ) -> &mut Widget

Sets the new maximum size of the widget.

source

pub fn max_size( &self, ) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

Returns current maximum size of the widget.

source

pub fn max_width(&self) -> f32

Returns maximum width of the widget.

source

pub fn max_height(&self) -> f32

Return maximum height of the widget.

source

pub fn set_z_index(&mut self, z_index: usize) -> &mut Widget

Sets new Z index for the widget. Z index defines the sorting (stable) index which will be used to “arrange” widgets in the correct order.

source

pub fn z_index(&self) -> usize

Returns current Z index of the widget.

source

pub fn set_background(&mut self, brush: Brush) -> &mut Widget

Sets the new background of the widget.

source

pub fn background(&self) -> Brush

Returns current background of the widget.

source

pub fn set_foreground(&mut self, brush: Brush) -> &mut Widget

Sets new foreground of the widget.

source

pub fn foreground(&self) -> Brush

Returns current foreground of the widget.

source

pub fn set_width(&mut self, width: f32) -> &mut Widget

Sets new width of the widget.

source

pub fn width(&self) -> f32

Returns current width of the widget.

source

pub fn is_draw_on_top(&self) -> bool

Return true if the widget is set to be drawn on top of every other, normally drawn, widgets, false - otherwise.

source

pub fn set_height(&mut self, height: f32) -> &mut Widget

Sets new height of the widget.

source

pub fn height(&self) -> f32

Returns current height of the widget.

source

pub fn set_desired_local_position( &mut self, pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, ) -> &mut Widget

Sets the desired local position of the widget.

source

pub fn screen_position( &self, ) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

Returns current screen-space position of the widget.

source

pub fn children(&self) -> &[Handle<UiNode>]

Returns a reference to the slice with the children widgets of this widget.

source

pub fn parent(&self) -> Handle<UiNode>

Returns current parent handle of the widget.

source

pub fn set_column(&mut self, column: usize) -> &mut Widget

Sets new column of the widget. Columns are used only by crate::grid::Grid widget.

source

pub fn column(&self) -> usize

Returns current column of the widget. Columns are used only by crate::grid::Grid widget.

source

pub fn set_row(&mut self, row: usize) -> &mut Widget

Sets new row of the widget. Rows are used only by crate::grid::Grid widget.

source

pub fn row(&self) -> usize

Returns current row of the widget. Rows are used only by crate::grid::Grid widget.

source

pub fn desired_size( &self, ) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

Returns the desired size of the widget.

source

pub fn desired_local_position( &self, ) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

Returns current desired local position of the widget.

source

pub fn screen_bounds(&self) -> Rect<f32>

Returns current screen-space bounds of the widget.

source

pub fn bounding_rect(&self) -> Rect<f32>

Returns local-space bounding rect of the widget.

source

pub fn visual_transform( &self, ) -> &Matrix<f32, Const<3>, Const<3>, ArrayStorage<f32, 3, 3>>

Returns current visual transform of the widget.

source

pub fn render_transform( &self, ) -> &Matrix<f32, Const<3>, Const<3>, ArrayStorage<f32, 3, 3>>

Returns current render transform of the widget.

source

pub fn layout_transform( &self, ) -> &Matrix<f32, Const<3>, Const<3>, ArrayStorage<f32, 3, 3>>

Returns current layout transform of the widget.

source

pub fn has_descendant( &self, node_handle: Handle<UiNode>, ui: &UserInterface, ) -> bool

Returns true, if the widget has a descendant widget with the specified handle, false - otherwise.

source

pub fn find_by_criteria_up<Func>( &self, ui: &UserInterface, func: Func, ) -> Handle<UiNode>
where Func: Fn(&UiNode) -> bool,

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

source

pub fn handle_routed_message( &mut self, _ui: &mut UserInterface, msg: &mut UiMessage, )

Handles incoming WidgetMessages. This method must be called in crate::control::Control::handle_routed_message of any derived widgets!

source

pub fn set_vertical_alignment( &mut self, vertical_alignment: VerticalAlignment, ) -> &mut Widget

Sets new vertical alignment of the widget.

source

pub fn vertical_alignment(&self) -> VerticalAlignment

Returns current vertical alignment of the widget.

source

pub fn set_horizontal_alignment( &mut self, horizontal_alignment: HorizontalAlignment, ) -> &mut Widget

Sets new horizontal alignment of the widget.

source

pub fn horizontal_alignment(&self) -> HorizontalAlignment

Returns current horizontal alignment of the widget.

source

pub fn set_margin(&mut self, margin: Thickness) -> &mut Widget

Sets new margin of the widget.

source

pub fn margin(&self) -> Thickness

Returns current margin of the widget.

source

pub fn measure_override( &self, ui: &UserInterface, available_size: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, ) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

Performs standard measurement of children nodes. It provides available size as a constraint and returns the maximum desired size across all children. As a result, this widget will have this size as its desired size to fit all the children nodes.

source

pub fn arrange_override( &self, ui: &UserInterface, final_size: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, ) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

Performs standard arrangement of the children nodes of the widget. It uses input final size to make a final bounding rectangle to arrange children. As a result, all the children nodes will be located at the top-left corner of this widget and stretched to fit its bounds.

source

pub fn is_arrange_valid(&self) -> bool

Returns true if the current results of arrangement of the widget are valid, false - otherwise.

source

pub fn is_measure_valid(&self) -> bool

Returns true if the current results of measurement of the widget are valid, false - otherwise.

source

pub fn actual_local_position( &self, ) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

Returns current actual local position of the widget. It is valid only after layout pass!

source

pub fn center(&self) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

Returns center point of the widget. It is valid only after layout pass!

source

pub fn is_globally_visible(&self) -> bool

Returns true of the widget is globally visible, which means that all its parents are visible as well as this widget. It is valid only after the first update of the layout, otherwise if will be always false.

source

pub fn set_visibility(&mut self, visibility: bool) -> &mut Widget

Sets new visibility of the widget.

source

pub fn request_update_visibility(&self)

Requests (via event queue, so the request is deferred) the update of the visibility of the widget.

source

pub fn visibility(&self) -> bool

Returns current visibility of the widget.

source

pub fn set_enabled(&mut self, enabled: bool) -> &mut Widget

Enables or disables the widget. Disabled widgets does not interact with user and usually greyed out.

source

pub fn enabled(&self) -> bool

Returns true if the widget if enabled, false - otherwise.

source

pub fn set_cursor(&mut self, cursor: Option<CursorIcon>)

Sets new cursor of the widget.

source

pub fn cursor(&self) -> Option<CursorIcon>

Returns current cursor of the widget.

source

pub fn user_data_cloned<T>(&self) -> Option<T>
where T: Clone + 'static,

Tries to fetch user-defined data of the specified type T.

source

pub fn clip_bounds(&self) -> Rect<f32>

Returns current clipping bounds of the widget. It is valid only after at least one layout pass.

source

pub fn set_opacity(&mut self, opacity: Option<f32>) -> &mut Widget

Set new opacity of the widget. Opacity should be in [0.0..1.0] range.

source

pub fn opacity(&self) -> Option<f32>

Returns current opacity of the widget.

source

pub fn tooltip(&self) -> Option<RcUiNodeHandle>

Returns current tooltip handle of the widget.

source

pub fn set_tooltip(&mut self, tooltip: Option<RcUiNodeHandle>) -> &mut Widget

Sets new tooltip handle of the widget (if any).

source

pub fn tooltip_time(&self) -> f32

Returns maximum available time to show the tooltip after the cursor was moved away from the widget.

source

pub fn set_tooltip_time(&mut self, tooltip_time: f32) -> &mut Widget

Set the maximum available time to show the tooltip after the cursor was moved away from the widget.

source

pub fn context_menu(&self) -> Option<RcUiNodeHandle>

Returns current context menu of the widget.

source

pub fn set_context_menu( &mut self, context_menu: Option<RcUiNodeHandle>, ) -> &mut Widget

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

Trait Implementations§

source§

impl Clone for AnimationPlayer

source§

fn clone(&self) -> AnimationPlayer

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl ComponentProvider for AnimationPlayer

source§

fn query_component_ref(&self, type_id: TypeId) -> Option<&(dyn Any + 'static)>

Allows an object to provide access to inner components.
source§

fn query_component_mut( &mut self, type_id: TypeId, ) -> Option<&mut (dyn Any + 'static)>

Allows an object to provide access to inner components.
source§

impl Control for AnimationPlayer

source§

fn handle_routed_message( &mut self, ui: &mut UserInterface, message: &mut UiMessage, )

Performs event-specific actions. Must call widget.handle_message()! Read more
source§

fn update(&mut self, dt: f32, ui: &mut UserInterface)

This method is called every frame and can be used to update internal variables of the widget, that can be used to animated your widget. Its main difference from other methods, is that it does not provide access to any other widget in the UI. Instead, you can only send messages to widgets to force them to change their state. Read more
source§

fn on_remove(&self, sender: &Sender<UiMessage>)

This method will be called before the widget is destroyed (dropped). At the moment, when this method is called, the widget is still in the widget graph and can be accessed via handles. It is guaranteed to be called once, and only if the widget is deleted via crate::widget::WidgetMessage::remove.
source§

fn measure_override( &self, ui: &UserInterface, available_size: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, ) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

This method is used to override measurement step of the layout system. It should return desired size of the widget (how many space it wants to occupy). Read more
source§

fn arrange_override( &self, ui: &UserInterface, final_size: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, ) -> Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

This method is used to override arrangement step of the layout system. Arrangement step is used to commit the final location and size of the widget in local coordinates. It is done after the measurement step; when all desired sizes of every widget is known. This fact allows you to calculate final location and size of every child widget, based in their desired size. Usually this method is used in some panel widgets, that takes their children and arranges them in some specific way. For example, it may stack widgets on top of each other, or put them in a line with wrapping, etc. Read more
source§

fn draw(&self, drawing_context: &mut DrawingContext)

This method is used to emit drawing commands that will be used later to draw your widget on screen. Keep in mind that any emitted geometry (quads, lines, text, etc), will be used to perform hit test. In other words, all the emitted geometry will make your widget “clickable”. Widgets with no geometry emitted by this method are mouse input transparent. Read more
source§

fn post_draw(&self, drawing_context: &mut DrawingContext)

The same as Self::draw, but it runs after all descendant widgets are rendered.
source§

fn preview_message(&self, ui: &UserInterface, message: &mut UiMessage)

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
source§

fn handle_os_event( &mut self, self_handle: Handle<UiNode>, ui: &mut UserInterface, event: &OsEvent, )

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
source§

impl Debug for AnimationPlayer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for AnimationPlayer

source§

fn default() -> AnimationPlayer

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

impl Deref for AnimationPlayer

§

type Target = Widget

The resulting type after dereferencing.
source§

fn deref(&self) -> &<AnimationPlayer as Deref>::Target

Dereferences the value.
source§

impl DerefMut for AnimationPlayer

source§

fn deref_mut(&mut self) -> &mut <AnimationPlayer as Deref>::Target

Mutably dereferences the value.
source§

impl Reflect for AnimationPlayer

source§

fn source_path() -> &'static str

source§

fn type_name(&self) -> &'static str

source§

fn doc(&self) -> &'static str

source§

fn assembly_name(&self) -> &'static str

Returns a parent assembly name of the type that implements this trait. WARNING: You should use proc-macro (#[derive(Reflect)]) to ensure that this method will return correct assembly name. In other words - there’s no guarantee, that any implementation other than proc-macro will return a correct name of the assembly. Alternatively, you can use env!("CARGO_PKG_NAME") as an implementation.
source§

fn type_assembly_name() -> &'static str

Returns a parent assembly name of the type that implements this trait. WARNING: You should use proc-macro (#[derive(Reflect)]) to ensure that this method will return correct assembly name. In other words - there’s no guarantee, that any implementation other than proc-macro will return a correct name of the assembly. Alternatively, you can use env!("CARGO_PKG_NAME") as an implementation.
source§

fn fields_info(&self, func: &mut dyn FnMut(&[FieldInfo<'_, '_>]))

source§

fn into_any(self: Box<AnimationPlayer>) -> Box<dyn Any>

source§

fn set( &mut self, value: Box<dyn Reflect>, ) -> Result<Box<dyn Reflect>, Box<dyn Reflect>>

source§

fn as_any(&self, func: &mut dyn FnMut(&(dyn Any + 'static)))

source§

fn as_any_mut(&mut self, func: &mut dyn FnMut(&mut (dyn Any + 'static)))

source§

fn as_reflect(&self, func: &mut dyn FnMut(&(dyn Reflect + 'static)))

source§

fn as_reflect_mut(&mut self, func: &mut dyn FnMut(&mut (dyn Reflect + 'static)))

source§

fn fields(&self, func: &mut dyn FnMut(&[&(dyn Reflect + 'static)]))

source§

fn fields_mut( &mut self, func: &mut dyn FnMut(&mut [&mut (dyn Reflect + 'static)]), )

source§

fn field( &self, name: &str, func: &mut dyn FnMut(Option<&(dyn Reflect + 'static)>), )

source§

fn field_mut( &mut self, name: &str, func: &mut dyn FnMut(Option<&mut (dyn Reflect + 'static)>), )

source§

fn set_field( &mut self, field: &str, value: Box<dyn Reflect>, func: &mut dyn FnMut(Result<Box<dyn Reflect>, Box<dyn Reflect>>), )

Calls user method specified with #[reflect(setter = ..)] or falls back to Reflect::field_mut
source§

fn as_array(&self, func: &mut dyn FnMut(Option<&(dyn ReflectArray + 'static)>))

source§

fn as_array_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectArray + 'static)>), )

source§

fn as_list(&self, func: &mut dyn FnMut(Option<&(dyn ReflectList + 'static)>))

source§

fn as_list_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectList + 'static)>), )

source§

fn as_inheritable_variable( &self, func: &mut dyn FnMut(Option<&(dyn ReflectInheritableVariable + 'static)>), )

source§

fn as_inheritable_variable_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectInheritableVariable + 'static)>), )

source§

fn as_hash_map( &self, func: &mut dyn FnMut(Option<&(dyn ReflectHashMap + 'static)>), )

source§

fn as_hash_map_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectHashMap + 'static)>), )

source§

impl TypeUuidProvider for AnimationPlayer

source§

fn type_uuid() -> Uuid

Return type UUID.
source§

impl Visit for AnimationPlayer

source§

fn visit(&mut self, name: &str, visitor: &mut Visitor) -> Result<(), VisitError>

Read or write this value, depending on whether Visitor::is_reading() is true or false. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> AsyncTaskResult for T
where T: Any + Send + 'static,

source§

fn into_any(self: Box<T>) -> Box<dyn Any>

source§

impl<T> BaseControl for T
where T: Any + Clone + 'static + Control + TypeUuidProvider,

source§

fn as_any(&self) -> &(dyn Any + 'static)

Returns self as &dyn Any.
source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Returns self as &mut dyn Any.
source§

fn clone_boxed(&self) -> Box<dyn Control<Target = Widget>>

Returns the exact copy of the widget in “type-erased” form.
source§

fn type_name(&self) -> &'static str

Returns type name of the widget.
source§

fn id(&self) -> Uuid

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Downcast for T
where T: Any,

source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
source§

impl<T> FieldValue for T
where T: 'static,

source§

fn as_any(&self) -> &(dyn Any + 'static)

Casts self to a &dyn Any
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<R> GetField for R
where R: Reflect,

source§

fn get_field<T>(&self, name: &str, func: &mut dyn FnMut(Option<&T>))
where T: 'static,

source§

fn get_field_mut<T>(&mut self, name: &str, func: &mut dyn FnMut(Option<&mut T>))
where T: 'static,

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ReflectBase for T
where T: Reflect,

source§

fn as_any_raw(&self) -> &(dyn Any + 'static)

source§

fn as_any_raw_mut(&mut self) -> &mut (dyn Any + 'static)

source§

impl<T> ResolvePath for T
where T: Reflect,

source§

fn resolve_path<'p>( &self, path: &'p str, func: &mut dyn FnMut(Result<&(dyn Reflect + 'static), ReflectPathError<'p>>), )

source§

fn resolve_path_mut<'p>( &mut self, path: &'p str, func: &mut dyn FnMut(Result<&mut (dyn Reflect + 'static), ReflectPathError<'p>>), )

source§

fn get_resolve_path<'p, T>( &self, path: &'p str, func: &mut dyn FnMut(Result<&T, ReflectPathError<'p>>), )
where T: Reflect,

source§

fn get_resolve_path_mut<'p, T>( &mut self, path: &'p str, func: &mut dyn FnMut(Result<&mut T, ReflectPathError<'p>>), )
where T: Reflect,

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ScriptMessagePayload for T
where T: 'static + Send + Debug,

source§

fn as_any_ref(&self) -> &(dyn Any + 'static)

Returns self as &dyn Any
source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Returns self as &dyn Any
source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> Value for T
where T: Reflect + Clone + Debug + Send,

source§

fn clone_box(&self) -> Box<dyn Value>

source§

fn into_box_reflect(self: Box<T>) -> Box<dyn Reflect>

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> CollectionItem for T
where T: Clone + Reflect + Debug + Default + TypeUuidProvider + Send + 'static,

source§

impl<T> InspectableEnum for T
where T: Debug + Reflect + Clone + TypeUuidProvider + Send + 'static,

source§

impl<T> SpriteSheetTexture for T
where T: Clone + Visit + Reflect + 'static,