pub struct DockStyle {
pub docks: Vec<Dock>,
pub gap: f32,
pub last_child_fill: bool,
pub ordered: bool,
}Expand description
Docking configuration for a set of children.
Fields§
§docks: Vec<Dock>Dock side for each child, by index.
gap: f32Gap between docked children.
last_child_fill: boolWhether the last child should fill the remaining space.
ordered: boolLay out children in declaration order instead of grouping sides first.
Implementations§
Source§impl DockStyle
impl DockStyle
Sourcepub fn new(docks: impl IntoIterator<Item = Dock>) -> DockStyle
pub fn new(docks: impl IntoIterator<Item = Dock>) -> DockStyle
Creates a style from the given dock sides.
Sourcepub fn last_child_fill(self, fill: bool) -> DockStyle
pub fn last_child_fill(self, fill: bool) -> DockStyle
Makes the last child fill the remaining space.
Sourcepub fn ordered(self, ordered: bool) -> DockStyle
pub fn ordered(self, ordered: bool) -> DockStyle
Uses declaration order rather than grouping sides before the fill.
Sourcepub fn border(self, border: bool) -> DockStyle
pub fn border(self, border: bool) -> DockStyle
Enables or disables border-style ordering.
This is the inverse of DockStyle::ordered.
Trait Implementations§
impl StructuralPartialEq for DockStyle
Auto Trait Implementations§
impl Freeze for DockStyle
impl RefUnwindSafe for DockStyle
impl Send for DockStyle
impl Sync for DockStyle
impl Unpin for DockStyle
impl UnsafeUnpin for DockStyle
impl UnwindSafe for DockStyle
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