Struct arcdps_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 moresource§impl<T: Debug> Debug for CollapsingHeader<T>
impl<T: Debug> Debug for CollapsingHeader<T>
impl<T: Copy> Copy for CollapsingHeader<T>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)