pub struct WidgetRects { /* private fields */ }Available on crate feature
egui only.Expand description
Stores the WidgetRects of all widgets generated during a single egui update/frame.
All crate::Uis have a WidgetRect. It is created in crate::Ui::new with Rect::NOTHING
and updated with the correct Rect when the crate::Ui is dropped.
Implementations§
Source§impl WidgetRects
impl WidgetRects
Sourcepub fn layer_ids(&self) -> impl ExactSizeIterator
pub fn layer_ids(&self) -> impl ExactSizeIterator
All known layers with widgets.
pub fn layers(&self) -> impl Iterator<Item = (&LayerId, &[WidgetRect])>
pub fn get(&self, id: Id) -> Option<&WidgetRect>
Sourcepub fn order(&self, id: Id) -> Option<(LayerId, usize)>
pub fn order(&self, id: Id) -> Option<(LayerId, usize)>
In which layer, and in which order in that layer?
pub fn contains(&self, id: Id) -> bool
Sourcepub fn get_layer(&self, layer_id: LayerId) -> impl Iterator<Item = &WidgetRect>
pub fn get_layer(&self, layer_id: LayerId) -> impl Iterator<Item = &WidgetRect>
All widgets in this layer, sorted back-to-front.
Sourcepub fn insert(
&mut self,
layer_id: LayerId,
widget_rect: WidgetRect,
options: InteractOptions,
)
pub fn insert( &mut self, layer_id: LayerId, widget_rect: WidgetRect, options: InteractOptions, )
Insert the given widget rect in the given layer.
pub fn set_info(&mut self, id: Id, info: WidgetInfo)
pub fn info(&self, id: Id) -> Option<&WidgetInfo>
Trait Implementations§
Source§impl Clone for WidgetRects
impl Clone for WidgetRects
Source§fn clone(&self) -> WidgetRects
fn clone(&self) -> WidgetRects
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for WidgetRects
impl Default for WidgetRects
Source§fn default() -> WidgetRects
fn default() -> WidgetRects
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Forget for WidgetRects
impl Freeze for WidgetRectswhere
*const u8 is !null: Freeze,
PhantomData<(LayerId, Vec<WidgetRect>)>: Freeze,
PhantomData<fn() -> NoHashHasher<Id>>: Freeze,
PhantomData<(Id, (usize, WidgetRect))>: Freeze,
PhantomData<(Id, WidgetInfo)>: Freeze,
impl Move for WidgetRects
impl RefUnwindSafe for WidgetRects
impl Send for WidgetRectswhere
RawTable<(LayerId, Vec<WidgetRect>)>: Send,
RawTable<(Id, (usize, WidgetRect))>: Send,
RawTable<(Id, WidgetInfo)>: Send,
impl Sync for WidgetRectswhere
RawTable<(LayerId, Vec<WidgetRect>)>: Sync,
RawTable<(Id, (usize, WidgetRect))>: Sync,
RawTable<(Id, WidgetInfo)>: Sync,
impl Unpin for WidgetRects
impl UnsafeUnpin for WidgetRectswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<(LayerId, Vec<WidgetRect>)>: UnsafeUnpin,
PhantomData<fn() -> NoHashHasher<Id>>: UnsafeUnpin,
PhantomData<(Id, (usize, WidgetRect))>: UnsafeUnpin,
PhantomData<(Id, WidgetInfo)>: UnsafeUnpin,
impl UnwindSafe for WidgetRectswhere
HashMap<LayerId, Vec<WidgetRect>, RandomState>: UnwindSafe,
HashMap<Id, (usize, WidgetRect), BuildHasherDefault<NoHashHasher<Id>>>: UnwindSafe,
HashMap<Id, WidgetInfo, BuildHasherDefault<NoHashHasher<Id>>>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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