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, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
Return the
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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