pub struct Entity(/* private fields */);
Implementations§
Source§impl Entity
impl Entity
Sourcepub fn null() -> Entity
pub fn null() -> Entity
Creates a null entity
A null entity can be used as a placeholder within a widget struct but cannot be used to get/set properties
Sourcepub fn root() -> Entity
pub fn root() -> Entity
Creates a root entity
The root entity represents the main window and is alwys valid. The root entity can be used to set properties on the window, such as background color, as well as sending events to the window such as Restyle and Redraw events.
Sourcepub fn generation(&self) -> Option<u8>
pub fn generation(&self) -> Option<u8>
Returns the generation of the entity
Trait Implementations§
Source§impl<'a> IntoBranchIterator<'a> for &'a Entity
impl<'a> IntoBranchIterator<'a> for &'a Entity
type Item = Entity
type IntoIter = BranchIterator<'a>
fn branch_iter( self, h: &'a Tree, ) -> <&'a Entity as IntoBranchIterator<'a>>::IntoIter
Source§impl<'a> IntoChildIterator<'a> for &'a Entity
impl<'a> IntoChildIterator<'a> for &'a Entity
type Item = Entity
type IntoIter = ChildIterator<'a>
fn child_iter( self, h: &'a Tree, ) -> <&'a Entity as IntoChildIterator<'a>>::IntoIter
Source§impl<'a> IntoParentIterator<'a> for &'a Entity
impl<'a> IntoParentIterator<'a> for &'a Entity
type Item = Entity
type IntoIter = ParentIterator<'a>
fn parent_iter( self, h: &'a Tree, ) -> <&'a Entity as IntoParentIterator<'a>>::IntoIter
Source§impl<'a> IntoTreeIterator<'a> for &'a Entity
impl<'a> IntoTreeIterator<'a> for &'a Entity
Source§impl<'a> Node<'a> for Entity
impl<'a> Node<'a> for Entity
Source§type Data = Style
type Data = Style
A type representing an external store in case the position and size data is not be owned by the node itself (e.g. ECS)
Source§fn layout_type(&self, store: &<Entity as Node<'a>>::Data) -> Option<LayoutType>
fn layout_type(&self, store: &<Entity as Node<'a>>::Data) -> Option<LayoutType>
Get the layout type of the node Read more
Source§fn position_type(
&self,
store: &<Entity as Node<'a>>::Data,
) -> Option<PositionType>
fn position_type( &self, store: &<Entity as Node<'a>>::Data, ) -> Option<PositionType>
Get the position type of the node Read more
Source§fn left(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn left(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired space to the left of the node in units
Source§fn min_left(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn min_left(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired min_left of the node in units
Source§fn max_left(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn max_left(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired min_left of the node in units
Source§fn right(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn right(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired space to the right of the node in units
Source§fn min_right(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn min_right(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired min_left of the node in units
Source§fn max_right(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn max_right(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired min_left of the node in units
Source§fn top(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn top(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired space above the node in units
Source§fn min_top(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn min_top(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired min_left of the node in units
Source§fn max_top(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn max_top(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired min_left of the node in units
Source§fn bottom(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn bottom(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired space below the node in units
Source§fn min_bottom(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn min_bottom(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired min_left of the node in units
Source§fn max_bottom(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn max_bottom(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired min_left of the node in units
Source§fn width(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn width(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired width of the node in units
Source§fn min_width(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn min_width(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired min_width of the node in units
Source§fn max_width(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn max_width(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired max_width of the node in units
Source§fn height(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn height(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired height of the node in units
Source§fn min_height(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn min_height(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired min_height of the node in units
Source§fn max_height(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn max_height(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired max_height of the node in units
Source§fn child_left(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn child_left(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired space to the left of all child nodes in units Read more
Source§fn child_right(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn child_right(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired space to the right of all child nodes in units Read more
Source§fn child_top(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn child_top(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired space above all child nodes in units Read more
Source§fn child_bottom(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn child_bottom(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired space below all child nodes in units Read more
Source§fn grid_cols(&self, store: &<Entity as Node<'a>>::Data) -> Option<Vec<Units>>
fn grid_cols(&self, store: &<Entity as Node<'a>>::Data) -> Option<Vec<Units>>
Get the desired grid columns as a vector of units
Source§fn grid_rows(&self, store: &<Entity as Node<'a>>::Data) -> Option<Vec<Units>>
fn grid_rows(&self, store: &<Entity as Node<'a>>::Data) -> Option<Vec<Units>>
Get the desired grid rows as a vector of units
Source§fn row_between(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn row_between(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired space between children in units when stacked in a column
Source§fn col_between(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn col_between(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Get the desired space between children in units when stacked in a row
fn border_left(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn border_right(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn border_top(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
fn border_bottom(&self, store: &<Entity as Node<'a>>::Data) -> Option<Units>
Source§fn row_index(&self, store: &<Entity as Node<'a>>::Data) -> Option<usize>
fn row_index(&self, store: &<Entity as Node<'a>>::Data) -> Option<usize>
Get the desired row_index of the node in units
fn row_span(&self, store: &<Entity as Node<'a>>::Data) -> Option<usize>
Source§fn col_index(&self, store: &<Entity as Node<'a>>::Data) -> Option<usize>
fn col_index(&self, store: &<Entity as Node<'a>>::Data) -> Option<usize>
Get the desired col_index of the node in units
fn col_span(&self, store: &<Entity as Node<'a>>::Data) -> Option<usize>
Source§impl PropGet for Entity
impl PropGet for Entity
fn is_disabled(self, state: &mut State) -> bool
fn is_hovered(self, state: &mut State) -> bool
fn is_selected(self, state: &mut State) -> bool
fn is_checked(self, state: &mut State) -> bool
fn is_over(self, state: &mut State) -> bool
fn is_active(self, state: &mut State) -> bool
fn is_focused(self, state: &mut State) -> bool
fn get_overflow(&self, state: &mut State) -> Overflow
fn get_display(&self, state: &mut State) -> Display
fn get_left(&self, state: &mut State) -> Units
fn get_right(&self, state: &mut State) -> Units
fn get_top(&self, state: &mut State) -> Units
fn get_bottom(&self, state: &mut State) -> Units
fn get_width(&self, state: &mut State) -> Units
fn get_height(&self, state: &mut State) -> Units
fn get_min_width(&self, state: &mut State) -> Units
fn get_max_width(&self, state: &mut State) -> Units
fn get_min_height(&self, state: &mut State) -> Units
fn get_max_height(&self, state: &mut State) -> Units
fn get_border_width(&self, state: &mut State) -> Units
fn get_tooltip(&self, state: &mut State) -> String
fn get_text(&self, state: &mut State) -> String
fn get_font(&self, state: &mut State) -> String
fn name(&self, state: &mut State) -> String
fn element(&self, state: &mut State) -> String
fn get_layout_type(&self, state: &mut State) -> LayoutType
fn get_background_color(&self, state: &mut State) -> Color
impl Copy for Entity
impl Eq for Entity
impl StructuralPartialEq for Entity
Auto Trait Implementations§
impl Freeze for Entity
impl RefUnwindSafe for Entity
impl Send for Entity
impl Sync for Entity
impl Unpin for Entity
impl UnwindSafe for Entity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PropSet for Twhere
T: AsEntity,
impl<T> PropSet for Twhere
T: AsEntity,
Source§fn emit(&self, state: &mut State, message: impl Message) -> Entitywhere
Self: 'static,
fn emit(&self, state: &mut State, message: impl Message) -> Entitywhere
Self: 'static,
Helper method for sending an event to self with default propagation
Source§fn emit_to(
&self,
state: &mut State,
target: Entity,
message: impl Message,
) -> Entity
fn emit_to( &self, state: &mut State, target: Entity, message: impl Message, ) -> Entity
Helper method for sending an event to target with default propagation