Struct arcdps_imgui::ComboBox

source ·
pub struct ComboBox<Label, Preview = &'static str> { /* private fields */ }
Expand description

Builder for a combo box widget

Implementations§

source§

impl<Label: AsRef<str>> ComboBox<Label>

source

pub fn new(label: Label) -> Self

Constructs a new combo box builder.

source§

impl<T: AsRef<str>, Preview: AsRef<str>> ComboBox<T, Preview>

source

pub fn preview_value<Preview2: AsRef<str>>( self, preview_value: Preview2 ) -> ComboBox<T, Preview2>

source

pub fn flags(self, flags: ComboBoxFlags) -> Self

Replaces all current settings with the given flags.

source

pub fn popup_align_left(self, popup_align_left: bool) -> Self

Enables/disables aligning the combo box popup toward the left.

Disabled by default.

source

pub fn height(self, height: ComboBoxHeight) -> Self

Sets the combo box height.

Default: ComboBoxHeight::Regular

source

pub fn preview_mode(self, preview_mode: ComboBoxPreviewMode) -> Self

Sets the combo box preview mode.

Default: ComboBoxPreviewMode::Full

source

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.

source

pub fn build<R, F: FnOnce() -> R>(self, ui: &Ui<'_>, f: F) -> Option<R>

Creates a combo box and runs a closure to construct the popup contents. Returns the result of the closure, if it is called.

Note: the closure is not called if the combo box is not open.

Trait Implementations§

source§

impl<Label: Clone, Preview: Clone> Clone for ComboBox<Label, Preview>

source§

fn clone(&self) -> ComboBox<Label, Preview>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Label: Debug, Preview: Debug> Debug for ComboBox<Label, Preview>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Label: Copy, Preview: Copy> Copy for ComboBox<Label, Preview>

Auto Trait Implementations§

§

impl<Label, Preview> Freeze for ComboBox<Label, Preview>
where Label: Freeze, Preview: Freeze,

§

impl<Label, Preview> RefUnwindSafe for ComboBox<Label, Preview>
where Label: RefUnwindSafe, Preview: RefUnwindSafe,

§

impl<Label, Preview> Send for ComboBox<Label, Preview>
where Label: Send, Preview: Send,

§

impl<Label, Preview> Sync for ComboBox<Label, Preview>
where Label: Sync, Preview: Sync,

§

impl<Label, Preview> Unpin for ComboBox<Label, Preview>
where Label: Unpin, Preview: Unpin,

§

impl<Label, Preview> UnwindSafe for ComboBox<Label, Preview>
where Label: UnwindSafe, Preview: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.