pub struct CollapsingHeader<T> { /* private fields */ }
Expand description
Builder for a collapsing header widget
Implementations§
Source§impl<T> CollapsingHeader<T>
impl<T> CollapsingHeader<T>
Sourcepub fn new(label: T) -> CollapsingHeader<T>
pub fn new(label: T) -> CollapsingHeader<T>
Constructs a new collapsing header builder
Sourcepub fn flags(self, flags: TreeNodeFlags) -> CollapsingHeader<T>
pub fn flags(self, flags: TreeNodeFlags) -> CollapsingHeader<T>
Replaces all current settings with the given flags.
Sourcepub fn allow_item_overlap(self, value: bool) -> CollapsingHeader<T>
pub fn allow_item_overlap(self, value: bool) -> CollapsingHeader<T>
Enables/disables allowing the collapsing header to overlap subsequent widgets.
Disabled by default.
Sourcepub fn default_open(self, value: bool) -> CollapsingHeader<T>
pub fn default_open(self, value: bool) -> CollapsingHeader<T>
Sets the default open state for the collapsing header.
Collapsing headers are closed by default.
Sourcepub fn open_on_double_click(self, value: bool) -> CollapsingHeader<T>
pub fn open_on_double_click(self, value: bool) -> CollapsingHeader<T>
Only open when the collapsing header is double-clicked.
Disabled by default.
Sourcepub fn open_on_arrow(self, value: bool) -> CollapsingHeader<T>
pub fn open_on_arrow(self, value: bool) -> CollapsingHeader<T>
Only open when clicking the arrow part of the collapsing header.
Disabled by default.
Sourcepub fn leaf(self, value: bool) -> CollapsingHeader<T>
pub fn leaf(self, value: bool) -> CollapsingHeader<T>
Enable/disables leaf mode (no collapsing, no arrow).
Disabled by default.
Sourcepub fn bullet(self, value: bool) -> CollapsingHeader<T>
pub fn bullet(self, value: bool) -> CollapsingHeader<T>
Display a bullet instead of arrow.
Disabled by default.
Sourcepub fn frame_padding(self, value: bool) -> CollapsingHeader<T>
pub fn frame_padding(self, value: bool) -> CollapsingHeader<T>
Use frame_padding
to vertically align text baseline to regular widget height.
Disabled by default.
Sourcepub fn begin(self, ui: &Ui) -> bool
pub fn begin(self, ui: &Ui) -> bool
Begins the collapsing header.
Returns true if the collapsing header is open and content should be rendered.
This is the same as build but is provided for consistent naming.
Begins the collapsing header.
Returns true if the collapsing header is open and content should be rendered.
This is the same as build_with_close_button but is provided for consistent naming.
Sourcepub fn build(self, ui: &Ui) -> bool
pub fn build(self, ui: &Ui) -> bool
Builds the collapsing header.
Returns true if the collapsing header is open and content should be rendered.
Builds the collapsing header, and adds an additional close button that changes the value of the given mutable reference when clicked.
Returns true if the collapsing header is open and content should be rendered.
Trait Implementations§
Source§impl<T> Clone for CollapsingHeader<T>where
T: Clone,
impl<T> Clone for CollapsingHeader<T>where
T: Clone,
Source§fn clone(&self) -> CollapsingHeader<T>
fn clone(&self) -> CollapsingHeader<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<T> Debug for CollapsingHeader<T>where
T: Debug,
impl<T> Debug for CollapsingHeader<T>where
T: Debug,
impl<T> Copy for CollapsingHeader<T>where
T: Copy,
Auto Trait Implementations§
impl<T> Freeze for CollapsingHeader<T>where
T: Freeze,
impl<T> RefUnwindSafe for CollapsingHeader<T>where
T: RefUnwindSafe,
impl<T> Send for CollapsingHeader<T>where
T: Send,
impl<T> Sync for CollapsingHeader<T>where
T: Sync,
impl<T> Unpin for CollapsingHeader<T>where
T: Unpin,
impl<T> UnwindSafe for CollapsingHeader<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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