[−][src]Struct imgui::ComboBox
Builder for a combo box widget
Implementations
impl<'a> ComboBox<'a>[src]
pub fn new(label: &'a ImStr) -> ComboBox<'a>[src]
Constructs a new combo box builder.
pub fn preview_value(self, preview_value: &'a ImStr) -> Self[src]
Sets the preview value displayed in the preview box (if visible).
pub fn flags(self, flags: ComboBoxFlags) -> Self[src]
Replaces all current settings with the given flags.
pub fn popup_align_left(self, popup_align_left: bool) -> Self[src]
Enables/disables aligning the combo box popup toward the left.
Disabled by default.
pub fn height(self, height: ComboBoxHeight) -> Self[src]
Sets the combo box height.
Default: ComboBoxHeight::Regular
pub fn preview_mode(self, preview_mode: ComboBoxPreviewMode) -> Self[src]
Sets the combo box preview mode.
Default: ComboBoxPreviewMode::Full
#[must_use]pub fn begin(self, ui: &Ui<'_>) -> Option<ComboBoxToken>[src]
Creates a combo box and starts appending to it.
Returns Some(ComboBoxToken) if the combo box is open. After content has been
rendered, the token must be ended by calling .end().
Returns None if the combo box is not open and no content should be rendered.
pub fn build<F: FnOnce()>(self, ui: &Ui<'_>, f: F)[src]
Creates a combo box and runs a closure to construct the popup contents.
Note: the closure is not called if the combo box is not open.
impl<'a> ComboBox<'a>[src]
pub fn build_simple<T, L>(
self,
ui: &Ui<'_>,
current_item: &mut usize,
items: &[T],
label_fn: &L
) -> bool where
L: Fn(&'b T) -> Cow<'b, ImStr>, [src]
self,
ui: &Ui<'_>,
current_item: &mut usize,
items: &[T],
label_fn: &L
) -> bool where
L: Fn(&'b T) -> Cow<'b, ImStr>,
Builds a simple combo box for choosing from a slice of values
pub fn build_simple_string<S: ?Sized>(
self,
ui: &Ui<'_>,
current_item: &mut usize,
items: &[&S]
) -> bool where
S: AsRef<ImStr>, [src]
self,
ui: &Ui<'_>,
current_item: &mut usize,
items: &[&S]
) -> bool where
S: AsRef<ImStr>,
Builds a simple combo box for choosing from a slice of strings
Trait Implementations
impl<'a> Clone for ComboBox<'a>[src]
impl<'a> Copy for ComboBox<'a>[src]
impl<'a> Debug for ComboBox<'a>[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for ComboBox<'a>
impl<'a> Send for ComboBox<'a>
impl<'a> Sync for ComboBox<'a>
impl<'a> Unpin for ComboBox<'a>
impl<'a> UnwindSafe for ComboBox<'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,
pub 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.
pub fn to_owned(&self) -> T[src]
pub 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.
pub 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>,