pub struct StackPanel<'a, E> { /* private fields */ }Available on crate feature
winio only.Expand description
A stacked layout container.
Implementations§
Source§impl<'a, E> StackPanel<'a, E>
impl<'a, E> StackPanel<'a, E>
Sourcepub fn new(orient: Orient) -> StackPanel<'a, E>
pub fn new(orient: Orient) -> StackPanel<'a, E>
Create StackPanel with orientation.
Sourcepub fn push<'b>(
&'b mut self,
widget: &'a mut dyn LayoutChild<Error = E>,
) -> StackPanelChildBuilder<'a, 'b, E>
pub fn push<'b>( &'b mut self, widget: &'a mut dyn LayoutChild<Error = E>, ) -> StackPanelChildBuilder<'a, 'b, E>
Push a child into the panel.
Sourcepub fn set_loc(
&mut self,
p: Point2D<f64, LogicalSpace>,
) -> Result<(), LayoutError<E>>
pub fn set_loc( &mut self, p: Point2D<f64, LogicalSpace>, ) -> Result<(), LayoutError<E>>
Move the location.
Sourcepub fn set_size(
&mut self,
s: Size2D<f64, LogicalSpace>,
) -> Result<(), LayoutError<E>>
pub fn set_size( &mut self, s: Size2D<f64, LogicalSpace>, ) -> Result<(), LayoutError<E>>
Resize.
Sourcepub fn set_rect(
&mut self,
r: Rect<f64, LogicalSpace>,
) -> Result<(), LayoutError<E>>
pub fn set_rect( &mut self, r: Rect<f64, LogicalSpace>, ) -> Result<(), LayoutError<E>>
Set the location and size.
Trait Implementations§
Auto Trait Implementations§
impl<'a, E> Freeze for StackPanel<'a, E>
impl<'a, E> !RefUnwindSafe for StackPanel<'a, E>
impl<'a, E> !Send for StackPanel<'a, E>
impl<'a, E> !Sync for StackPanel<'a, E>
impl<'a, E> Unpin for StackPanel<'a, E>
impl<'a, E> UnsafeUnpin for StackPanel<'a, E>
impl<'a, E> !UnwindSafe for StackPanel<'a, E>
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> 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