pub struct ListBox<T> { /* private fields */ }
Expand description
Builder for a list box widget
Implementations§
Source§impl<T> ListBox<T>
impl<T> ListBox<T>
Sourcepub fn size(self, size: impl Into<Vector2<f32>>) -> ListBox<T>
pub fn size(self, size: impl Into<Vector2<f32>>) -> ListBox<T>
Sets the list box size based on the given width and height If width or height are 0 or smaller, a default value is calculated Helper to calculate the size of a listbox and display a label on the right. Tip: To have a list filling the entire window width, PushItemWidth(-1) and pass an non-visible label e.g. “##empty”
Default: [0.0, 0.0], in which case the combobox calculates a sensible width and height
Sourcepub fn begin(self, ui: &Ui) -> Option<ListBoxToken<'_>>
pub fn begin(self, ui: &Ui) -> Option<ListBoxToken<'_>>
Creates a list box and starts appending to it.
Returns Some(ListBoxToken)
if the list box is open. After content has been
rendered, the token must be ended by calling .end()
.
Returns None
if the list box is not open and no content should be rendered.
Trait Implementations§
impl<T> Copy for ListBox<T>where
T: Copy,
Auto Trait Implementations§
impl<T> Freeze for ListBox<T>where
T: Freeze,
impl<T> RefUnwindSafe for ListBox<T>where
T: RefUnwindSafe,
impl<T> Send for ListBox<T>where
T: Send,
impl<T> Sync for ListBox<T>where
T: Sync,
impl<T> Unpin for ListBox<T>where
T: Unpin,
impl<T> UnwindSafe for ListBox<T>where
T: 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
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