pub struct ComboBox<'ui, Label, Preview = &'static str> {
pub label: Label,
pub preview_value: Option<Preview>,
pub flags: ComboBoxFlags,
pub ui: &'ui Ui,
}Expand description
Builder for a combo box widget
Fields§
§label: Label§preview_value: Option<Preview>§flags: ComboBoxFlags§ui: &'ui UiImplementations§
Source§impl<'ui, T, Preview> ComboBox<'ui, T, Preview>
impl<'ui, T, Preview> ComboBox<'ui, T, Preview>
pub fn preview_value<Preview2>( self, preview_value: Preview2, ) -> ComboBox<'ui, T, Preview2>
Sourcepub fn flags(self, flags: ComboBoxFlags) -> ComboBox<'ui, T, Preview>
pub fn flags(self, flags: ComboBoxFlags) -> ComboBox<'ui, T, Preview>
Replaces all current settings with the given flags.
Sourcepub fn popup_align_left(
self,
popup_align_left: bool,
) -> ComboBox<'ui, T, Preview>
pub fn popup_align_left( self, popup_align_left: bool, ) -> ComboBox<'ui, T, Preview>
Enables/disables aligning the combo box popup toward the left.
Disabled by default.
Sourcepub fn height(self, height: ComboBoxHeight) -> ComboBox<'ui, T, Preview>
pub fn height(self, height: ComboBoxHeight) -> ComboBox<'ui, T, Preview>
Sets the combo box height.
Default: ComboBoxHeight::Regular
Sourcepub fn preview_mode(
self,
preview_mode: ComboBoxPreviewMode,
) -> ComboBox<'ui, T, Preview>
pub fn preview_mode( self, preview_mode: ComboBoxPreviewMode, ) -> ComboBox<'ui, T, Preview>
Sets the combo box preview mode.
Default: ComboBoxPreviewMode::Full
Sourcepub fn begin(self) -> Option<ComboBoxToken<'ui>>
pub fn begin(self) -> Option<ComboBoxToken<'ui>>
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.
Trait Implementations§
impl<'ui, Label, Preview> Copy for ComboBox<'ui, Label, Preview>
Auto Trait Implementations§
impl<'ui, Label, Preview> Freeze for ComboBox<'ui, Label, Preview>
impl<'ui, Label, Preview = &'static str> !RefUnwindSafe for ComboBox<'ui, Label, Preview>
impl<'ui, Label, Preview = &'static str> !Send for ComboBox<'ui, Label, Preview>
impl<'ui, Label, Preview = &'static str> !Sync for ComboBox<'ui, Label, Preview>
impl<'ui, Label, Preview> Unpin for ComboBox<'ui, Label, Preview>
impl<'ui, Label, Preview = &'static str> !UnwindSafe for ComboBox<'ui, Label, Preview>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more