pub struct ComboBox<Label, Preview = &'static str> { /* private fields */ }Expand description
Builder for a combo box widget
Implementations§
Source§impl<T: AsRef<str>, Preview: AsRef<str>> ComboBox<T, Preview>
impl<T: AsRef<str>, Preview: AsRef<str>> ComboBox<T, Preview>
pub fn preview_value<Preview2: AsRef<str>>( self, preview_value: Preview2, ) -> ComboBox<T, Preview2>
Sourcepub fn flags(self, flags: ComboBoxFlags) -> Self
pub fn flags(self, flags: ComboBoxFlags) -> Self
Replaces all current settings with the given flags.
Sourcepub fn popup_align_left(self, popup_align_left: bool) -> Self
pub fn popup_align_left(self, popup_align_left: bool) -> Self
Enables/disables aligning the combo box popup toward the left.
Disabled by default.
Sourcepub fn height(self, height: ComboBoxHeight) -> Self
pub fn height(self, height: ComboBoxHeight) -> Self
Sets the combo box height.
Default: ComboBoxHeight::Regular
Sourcepub fn preview_mode(self, preview_mode: ComboBoxPreviewMode) -> Self
pub fn preview_mode(self, preview_mode: ComboBoxPreviewMode) -> Self
Sets the combo box preview mode.
Default: ComboBoxPreviewMode::Full
Sourcepub fn begin<'ui>(self, ui: &Ui<'ui>) -> Option<ComboBoxToken<'ui>>
pub fn begin<'ui>(self, ui: &Ui<'ui>) -> 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<Label: Copy, Preview: Copy> Copy for ComboBox<Label, Preview>
Auto Trait Implementations§
impl<Label, Preview> Freeze for ComboBox<Label, Preview>
impl<Label, Preview> RefUnwindSafe for ComboBox<Label, Preview>where
Label: RefUnwindSafe,
Preview: RefUnwindSafe,
impl<Label, Preview> Send for ComboBox<Label, Preview>
impl<Label, Preview> Sync for ComboBox<Label, Preview>
impl<Label, Preview> Unpin for ComboBox<Label, Preview>
impl<Label, Preview> UnwindSafe for ComboBox<Label, Preview>where
Label: UnwindSafe,
Preview: 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