[−][src]Struct imgui::Selectable
Builder for a selectable widget.
Implementations
impl<'a> Selectable<'a>
[src]
pub fn new(label: &ImStr) -> Selectable
[src]
Constructs a new selectable builder.
pub fn flags(self, flags: SelectableFlags) -> Self
[src]
Replaces all current settings with the given flags
pub fn selected(self, selected: bool) -> Self
[src]
Sets the selected state of the selectable
pub fn close_popups(self, value: bool) -> Self
[src]
Enables/disables closing parent popup window on click.
Default: enabled
pub fn span_all_columns(self, value: bool) -> Self
[src]
Enables/disables full column span (text will still fit in the current column).
Default: disabled
pub fn allow_double_click(self, value: bool) -> Self
[src]
Enables/disables click event generation on double clicks.
Default: disabled
pub fn disabled(self, value: bool) -> Self
[src]
Enables/disables the selectable.
When disabled, it cannot be selected and the text uses the disabled text color.
Default: disabled
pub fn size(self, size: [f32; 2]) -> Self
[src]
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
pub fn build(self, _: &Ui) -> bool
[src]
Builds the selectable.
Returns true if the selectable was clicked.
impl<'a> Selectable<'a>
[src]
pub fn build_with_ref(self, ui: &Ui, selected: &mut bool) -> bool
[src]
Builds the selectable using a mutable reference to selected state.
Trait Implementations
impl<'a> Clone for Selectable<'a>
[src]
fn clone(&self) -> Selectable<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Copy for Selectable<'a>
[src]
impl<'a> Debug for Selectable<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Selectable<'a>
impl<'a> Send for Selectable<'a>
impl<'a> Sync for Selectable<'a>
impl<'a> Unpin for Selectable<'a>
impl<'a> UnwindSafe for Selectable<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,