[][src]Struct imgui::Selectable

#[must_use]pub struct Selectable<'a> { /* fields omitted */ }

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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.