pub struct Pane {
pub child: WidgetRef,
pub preferred_width: Option<PanePreferredSize>,
pub preferred_height: Option<PanePreferredSize>,
pub margins: EdgeInsetsGeometry,
pub shape: Option<ShapeBorderRef>,
}Expand description
One pane’s content, the size it asks for, its margins and its shape.
Fields§
§child: WidgetRefThe pane’s content.
preferred_width: Option<PanePreferredSize>The width the pane asks for; None uses the directive’s default.
preferred_height: Option<PanePreferredSize>The height a reflowed pane asks for; None uses the directive’s default.
margins: EdgeInsetsGeometryCompose’s paneMargins(fixedMargins): how far the pane keeps from each edge of the
scaffold. A margin only moves an edge the pane shares with the scaffold; the gap between
two panes is the directive’s spacer.
shape: Option<ShapeBorderRef>Compose’s AnimatedPane(shape:): the shape the pane is clipped to; None is Compose’s
RectangleShape.
Implementations§
Source§impl Pane
impl Pane
Sourcepub fn new<K>(child: impl IntoWidget<K>) -> Pane
pub fn new<K>(child: impl IntoWidget<K>) -> Pane
Creates a pane around child.
Sourcepub fn preferred_width(self, preferred_width: PanePreferredSize) -> Pane
pub fn preferred_width(self, preferred_width: PanePreferredSize) -> Pane
The width the pane asks for.
Sourcepub fn preferred_height(self, preferred_height: PanePreferredSize) -> Pane
pub fn preferred_height(self, preferred_height: PanePreferredSize) -> Pane
The height a reflowed pane asks for.
Sourcepub fn margins(self, margins: impl Into<EdgeInsetsGeometry>) -> Pane
pub fn margins(self, margins: impl Into<EdgeInsetsGeometry>) -> Pane
How far the pane keeps from each edge of the scaffold.
Sourcepub fn shape(self, shape: impl Into<ShapeBorderRef>) -> Pane
pub fn shape(self, shape: impl Into<ShapeBorderRef>) -> Pane
The shape the pane is clipped to.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Pane
impl !Send for Pane
impl !Sync for Pane
impl !UnwindSafe for Pane
impl Forget for Pane
impl Freeze for Panewhere
*const RcInner<dyn Widget> is !null: Freeze,
PhantomData<RcInner<dyn Widget>>: Freeze,
*const RcInner<dyn ShapeBorder> is !null: Freeze,
PhantomData<RcInner<dyn ShapeBorder>>: Freeze,
impl Move for Pane
impl Unpin for Pane
impl UnsafeUnpin for Panewhere
*const RcInner<dyn Widget> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Widget>>: UnsafeUnpin,
*const RcInner<dyn ShapeBorder> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn ShapeBorder>>: UnsafeUnpin,
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