Struct imgui::CollapsingHeader
source · pub struct CollapsingHeader<T> { /* private fields */ }
Expand description
Builder for a collapsing header widget
Implementations§
source§impl<T: AsRef<str>> CollapsingHeader<T>
impl<T: AsRef<str>> 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) -> Self
pub fn flags(self, flags: TreeNodeFlags) -> Self
Replaces all current settings with the given flags.
sourcepub fn allow_item_overlap(self, value: bool) -> Self
pub fn allow_item_overlap(self, value: bool) -> Self
Enables/disables allowing the collapsing header to overlap subsequent widgets.
Disabled by default.
sourcepub fn default_open(self, value: bool) -> Self
pub fn default_open(self, value: bool) -> Self
Sets the default open state for the collapsing header.
Collapsing headers are closed by default.
sourcepub fn open_on_double_click(self, value: bool) -> Self
pub fn open_on_double_click(self, value: bool) -> Self
Only open when the collapsing header is double-clicked.
Disabled by default.
sourcepub fn open_on_arrow(self, value: bool) -> Self
pub fn open_on_arrow(self, value: bool) -> Self
Only open when clicking the arrow part of the collapsing header.
Disabled by default.
sourcepub fn leaf(self, value: bool) -> Self
pub fn leaf(self, value: bool) -> Self
Enable/disables leaf mode (no collapsing, no arrow).
Disabled by default.
sourcepub fn bullet(self, value: bool) -> Self
pub fn bullet(self, value: bool) -> Self
Display a bullet instead of arrow.
Disabled by default.
sourcepub fn frame_padding(self, value: bool) -> Self
pub fn frame_padding(self, value: bool) -> Self
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> Clone for CollapsingHeader<T>
impl<T: Clone> Clone for CollapsingHeader<T>
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 more