Struct floem::context::ComputeLayoutCx
source · pub struct ComputeLayoutCx<'a> { /* private fields */ }
Implementations§
source§impl<'a> ComputeLayoutCx<'a>
impl<'a> ComputeLayoutCx<'a>
pub fn app_state_mut(&mut self) -> &mut AppState
pub fn app_state(&self) -> &AppState
pub fn save(&mut self)
pub fn restore(&mut self)
pub fn current_viewport(&self) -> Rect
pub fn get_layout(&self, id: Id) -> Option<Layout>
pub fn layout(&self, node: Node) -> Option<Layout>
sourcepub fn compute_view_layout(&mut self, view: &mut dyn View) -> Option<Rect>
pub fn compute_view_layout(&mut self, view: &mut dyn View) -> Option<Rect>
Internal method used by Floem. This method derives its calculations based on the Taffy Node returned by the View::layout
method.
It’s responsible for:
- calculating and setting the view’s origin (local coordinates and window coordinates)
- calculating and setting the view’s viewport
- invoking any attached context::ResizeListeners
Returns the bounding rect that encompasses this view and its children
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ComputeLayoutCx<'a>
impl<'a> !Send for ComputeLayoutCx<'a>
impl<'a> !Sync for ComputeLayoutCx<'a>
impl<'a> Unpin for ComputeLayoutCx<'a>
impl<'a> !UnwindSafe for ComputeLayoutCx<'a>
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