pub struct PlacedSubview<'a> {
pub view: &'a dyn SubView,
pub frame: Rect,
}Expand description
A child view together with its placed frame inside a container.
Fields§
§view: &'a dyn SubViewThe child proxy.
frame: RectThe child frame in container-local coordinates.
Implementations§
Source§impl<'a> PlacedSubview<'a>
impl<'a> PlacedSubview<'a>
Sourcepub const fn new(view: &'a dyn SubView, frame: Rect) -> PlacedSubview<'a>
pub const fn new(view: &'a dyn SubView, frame: Rect) -> PlacedSubview<'a>
Creates a placed subview.
Sourcepub fn dimensions(&self) -> ViewDimensions
pub fn dimensions(&self) -> ViewDimensions
Returns the child’s dimensions for its placed size proposal.
Sourcepub fn horizontal(&self, alignment: HorizontalAlignment) -> f32
pub fn horizontal(&self, alignment: HorizontalAlignment) -> f32
Returns the resolved horizontal guide in container coordinates.
Sourcepub fn vertical(&self, alignment: VerticalAlignment) -> f32
pub fn vertical(&self, alignment: VerticalAlignment) -> f32
Returns the resolved vertical guide in container coordinates.
Sourcepub fn explicit_horizontal(&self, alignment: HorizontalAlignment) -> Option<f32>
pub fn explicit_horizontal(&self, alignment: HorizontalAlignment) -> Option<f32>
Returns the explicit horizontal guide in container coordinates, if any.
Sourcepub fn explicit_vertical(&self, alignment: VerticalAlignment) -> Option<f32>
pub fn explicit_vertical(&self, alignment: VerticalAlignment) -> Option<f32>
Returns the explicit vertical guide in container coordinates, if any.
Trait Implementations§
Source§impl<'a> Clone for PlacedSubview<'a>
impl<'a> Clone for PlacedSubview<'a>
Source§fn clone(&self) -> PlacedSubview<'a>
fn clone(&self) -> PlacedSubview<'a>
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 moreimpl<'a> Copy for PlacedSubview<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PlacedSubview<'a>
impl<'a> !Send for PlacedSubview<'a>
impl<'a> !Sync for PlacedSubview<'a>
impl<'a> !UnwindSafe for PlacedSubview<'a>
impl<'a> Freeze for PlacedSubview<'a>
impl<'a> Unpin for PlacedSubview<'a>
impl<'a> UnsafeUnpin for PlacedSubview<'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