Struct arcdps_imgui::Selectable
source · pub struct Selectable<T> { /* private fields */ }
Expand description
Builder for a selectable widget.
Implementations§
source§impl<T: AsRef<str>> Selectable<T>
impl<T: AsRef<str>> Selectable<T>
sourcepub fn flags(self, flags: SelectableFlags) -> Self
pub fn flags(self, flags: SelectableFlags) -> Self
Replaces all current settings with the given flags
sourcepub fn close_popups(self, value: bool) -> Self
pub fn close_popups(self, value: bool) -> Self
Enables/disables closing parent popup window on click.
Default: enabled
sourcepub fn span_all_columns(self, value: bool) -> Self
pub fn span_all_columns(self, value: bool) -> Self
Enables/disables full column span (text will still fit in the current column).
Default: disabled
sourcepub fn allow_double_click(self, value: bool) -> Self
pub fn allow_double_click(self, value: bool) -> Self
Enables/disables click event generation on double clicks.
Default: disabled
sourcepub fn disabled(self, value: bool) -> Self
pub fn disabled(self, value: bool) -> Self
Enables/disables the selectable.
When disabled, it cannot be selected and the text uses the disabled text color.
Default: disabled
sourcepub fn size(self, size: [f32; 2]) -> Self
pub fn size(self, size: [f32; 2]) -> Self
Sets the size of the selectable.
For the X axis:
> 0.0
: use given width= 0.0
: use remaining width
For the Y axis:
> 0.0
: use given height= 0.0
: use label height
sourcepub fn build(self, ui: &Ui<'_>) -> bool
pub fn build(self, ui: &Ui<'_>) -> bool
Builds the selectable.
Returns true if the selectable was clicked.
sourcepub fn build_with_ref(self, ui: &Ui<'_>, selected: &mut bool) -> bool
pub fn build_with_ref(self, ui: &Ui<'_>, selected: &mut bool) -> bool
Builds the selectable using a mutable reference to selected state.
Trait Implementations§
source§impl<T: Clone> Clone for Selectable<T>
impl<T: Clone> Clone for Selectable<T>
source§fn clone(&self) -> Selectable<T>
fn clone(&self) -> Selectable<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Debug> Debug for Selectable<T>
impl<T: Debug> Debug for Selectable<T>
impl<T: Copy> Copy for Selectable<T>
Auto Trait Implementations§
impl<T> Freeze for Selectable<T>where
T: Freeze,
impl<T> RefUnwindSafe for Selectable<T>where
T: RefUnwindSafe,
impl<T> Send for Selectable<T>where
T: Send,
impl<T> Sync for Selectable<T>where
T: Sync,
impl<T> Unpin for Selectable<T>where
T: Unpin,
impl<T> UnwindSafe for Selectable<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
Mutably borrows from an owned value. Read more