pub struct Select { /* private fields */ }Implementations§
Source§impl Select
impl Select
pub fn new( options: Vec<impl Into<SharedString>>, selected_idx: Option<usize>, cx: &mut Context<'_, Self>, ) -> Self
pub fn borderless(self) -> Self
pub fn radius_none(self) -> Self
pub fn radius_left_none(self) -> Self
pub fn radius_right_none(self) -> Self
pub fn width(self, w: impl Into<Pixels>) -> Self
pub fn width_xs(self) -> Self
pub fn text_size(self, s: impl Into<Pixels>) -> Self
pub fn text_sm(self) -> Self
pub fn text_color(self, c: Hsla) -> Self
pub fn padding_x(self, p: impl Into<Pixels>) -> Self
pub fn padding_x_sm(self) -> Self
pub fn set_borderless(&mut self, b: bool, cx: &mut Context<'_, Self>)
pub fn set_radius_none(&mut self, r: bool, cx: &mut Context<'_, Self>)
pub fn set_radius_left_none(&mut self, r: bool, cx: &mut Context<'_, Self>)
pub fn set_radius_right_none(&mut self, r: bool, cx: &mut Context<'_, Self>)
pub fn set_width(&mut self, w: impl Into<Pixels>, cx: &mut Context<'_, Self>)
pub fn set_text_size( &mut self, s: impl Into<Pixels>, cx: &mut Context<'_, Self>, )
pub fn set_text_color(&mut self, c: Hsla, cx: &mut Context<'_, Self>)
pub fn set_padding_x( &mut self, p: impl Into<Pixels>, cx: &mut Context<'_, Self>, )
pub fn set_options( &mut self, options: Vec<SharedString>, cx: &mut Context<'_, Self>, )
pub fn set_selected_idx( &mut self, idx: Option<usize>, cx: &mut Context<'_, Self>, )
pub fn close_on_escape(self, close: bool) -> Self
pub fn close_on_click_outside(self, close: bool) -> Self
pub fn register_key_bindings(cx: &mut App)
pub fn on_change( self, cb: impl Fn(usize, &mut Window, &mut App) + 'static, ) -> Self
pub fn set_on_change( &mut self, cb: impl Fn(usize, &mut Window, &mut App) + 'static, )
pub fn selected_index(&self) -> Option<usize>
Trait Implementations§
Source§impl Focusable for Select
impl Focusable for Select
Source§fn focus_handle(&self, _cx: &App) -> FocusHandle
fn focus_handle(&self, _cx: &App) -> FocusHandle
Returns the focus handle associated with this view.
Auto Trait Implementations§
impl !RefUnwindSafe for Select
impl !Send for Select
impl !Sync for Select
impl !UnwindSafe for Select
impl Freeze for Select
impl Unpin for Select
impl UnsafeUnpin for Select
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> 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