pub struct LayoutCache { /* private fields */ }Expand description
This is a container object that stores a Vec of LayoutContainer objects for its cache.
Implementations§
Source§impl LayoutCache
This is the implementation of the LayoutCache.
impl LayoutCache
This is the implementation of the LayoutCache.
pub fn new() -> Self
Sourcepub fn add_layout(&mut self, layout: Box<dyn Layout>) -> i32
pub fn add_layout(&mut self, layout: Box<dyn Layout>) -> i32
Adds a Box<Layout> to the Layout stack.
Sourcepub fn get_layout_by_id(&mut self, id: i32) -> &mut LayoutContainer
pub fn get_layout_by_id(&mut self, id: i32) -> &mut LayoutContainer
Retrieves a &mut LayoutContainer object by its ID.
Sourcepub fn get_layout_cache(&self) -> &[LayoutContainer]
pub fn get_layout_cache(&self) -> &[LayoutContainer]
Retrieves a borrowed slice of the LayoutContainer cache that can be sent to callbacks.
Sourcepub fn do_layout(&self, widgets: &[WidgetContainer])
pub fn do_layout(&self, widgets: &[WidgetContainer])
Performs the do_layout call on Layout objects only if their needs_layout flag is set
to true.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LayoutCache
impl !RefUnwindSafe for LayoutCache
impl !Send for LayoutCache
impl !Sync for LayoutCache
impl Unpin for LayoutCache
impl !UnwindSafe for LayoutCache
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