pub struct SidebarGroup<C> { /* private fields */ }Expand description
A titled set of sidebar items that can fold away and carry actions.
Implementations§
Source§impl<C: ViewSeq> SidebarGroup<C>
impl<C: ViewSeq> SidebarGroup<C>
Sourcepub fn new(title: impl Into<String>, children: C) -> Self
pub fn new(title: impl Into<String>, children: C) -> Self
A group of children under this caption.
Sourcepub fn collapsible(self) -> Self
pub fn collapsible(self) -> Self
Lets the caption fold the group. Reduced to icons, a group is always unfolded, because its caption is gone.
Sourcepub fn open(self, open: bool) -> Self
pub fn open(self, open: bool) -> Self
Whether a collapsible group starts unfolded (true by default).
Sourcepub fn open_binding(self, open: Binding<bool>) -> Self
pub fn open_binding(self, open: Binding<bool>) -> Self
Reads and writes whether it is unfolded from the app; makes it collapsible.
Sourcepub fn action(self, action: impl View + 'static) -> Self
pub fn action(self, action: impl View + 'static) -> Self
Adds a control at the end of the caption, usually a small IconButton
with a label, or a DropdownMenu. Hidden when
reduced to icons.
Trait Implementations§
Source§impl<C> Debug for SidebarGroup<C>
impl<C> Debug for SidebarGroup<C>
Auto Trait Implementations§
impl<C> !RefUnwindSafe for SidebarGroup<C>
impl<C> !Send for SidebarGroup<C>
impl<C> !Sync for SidebarGroup<C>
impl<C> !UnwindSafe for SidebarGroup<C>
impl<C> Freeze for SidebarGroup<C>where
C: Freeze,
impl<C> Unpin for SidebarGroup<C>where
C: Unpin,
impl<C> UnsafeUnpin for SidebarGroup<C>where
C: 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
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<V> ViewExt for Vwhere
V: View,
impl<V> ViewExt for Vwhere
V: View,
Source§fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
Adds padding inside the box, in logical pixels.
Source§fn background(self, fill: impl Into<Fill>) -> Styled<Self>
fn background(self, fill: impl Into<Fill>) -> Styled<Self>
Paints a background behind the content.
Source§fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
Fixes the width and/or height in logical pixels;
None keeps the content size.