Struct nannou::ui::widget::DropDownList[][src]

pub struct DropDownList<'a, T> where
    T: 'a, 
{ /* fields omitted */ }

Displays a given Vec<String> as a selectable drop down menu.

It’s reaction is triggered upon selection of a list item.

Implementations

impl<'a, T> DropDownList<'a, T>[src]

pub fn new(items: &'a [T], selected: Option<usize>) -> DropDownList<'a, T>[src]

Construct a new DropDownList.

pub fn enabled(self, enabled: bool) -> DropDownList<'a, T>[src]

Build the type’s self.$($assignee).+ with the given $Type.

pub fn max_visible_items(self, num: usize) -> DropDownList<'a, T>[src]

Set the maximum height of the DropDownList (before the scrollbar appears) as a number of items.

pub fn max_visible_height(self, height: f64) -> DropDownList<'a, T>[src]

Set the maximum height of the DropDownList (before the scrollbar appears) as a scalar height.

pub fn scrollbar_next_to(self) -> DropDownList<'a, T>[src]

Specifies that the list should be scrollable and should provide a Scrollbar to the right of the items.

pub fn scrollbar_on_top(self) -> DropDownList<'a, T>[src]

Specifies that the list should be scrollable and should provide a Scrollbar that hovers above the right edge of the items and automatically hides when the user is not scrolling.

pub fn no_scrollbar(self) -> DropDownList<'a, T>[src]

Even in the case that the list is scrollable, do not display a Scrollbar.

pub fn scrollbar_width(self, w: f64) -> DropDownList<'a, T>[src]

Specify the width of the scrollbar.

pub fn label_font_id(self, font_id: Id) -> DropDownList<'a, T>[src]

Specify the font used for displaying the label.

pub fn left_justify_label(self) -> DropDownList<'a, T>[src]

Align the labels to the left of their Buttons’ surface.

pub fn right_justify_label(self) -> DropDownList<'a, T>[src]

Align the labels to the right of their Buttons’ surface.

pub fn center_justify_label(self) -> DropDownList<'a, T>[src]

Center the labels to the their Buttons’ surface.

pub fn label_x(self, x: Relative) -> DropDownList<'a, T>[src]

Specify the label’s position relatively to Button along the x axis.

pub fn label_y(self, y: Relative) -> DropDownList<'a, T>[src]

Specify the label’s position relatively to Button along the y axis.

Trait Implementations

impl<'a, T> Borderable for DropDownList<'a, T>[src]

pub fn border(self, border: f64) -> DropDownList<'a, T>[src]

Build the type’s self.$($assignee).+ with the given $Type.

pub fn border_color(self, border_color: Color) -> DropDownList<'a, T>[src]

Build the type’s self.$($assignee).+ with the given $Type.

impl<'a, T> Colorable for DropDownList<'a, T>[src]

pub fn color(self, color: Color) -> DropDownList<'a, T>[src]

Build the type’s self.$($assignee).+ with the given $Type.

impl<'a, T> Common for DropDownList<'a, T> where
    T: 'a, 
[src]

impl<'a, T> Labelable<'a> for DropDownList<'a, T>[src]

pub fn label(self, label: &'a str) -> DropDownList<'a, T>[src]

Build the type’s self.$($assignee).+ with the given $Type.

pub fn label_color(self, label_color: Color) -> DropDownList<'a, T>[src]

Build the type’s self.$($assignee).+ with the given $Type.

pub fn label_font_size(self, label_font_size: u32) -> DropDownList<'a, T>[src]

Build the type’s self.$($assignee).+ with the given $Type.

impl<'a, T> Widget for DropDownList<'a, T> where
    T: AsRef<str>, 
[src]

type State = State

State to be stored within the Uis widget cache. Read more

type Style = Style

Every widget is required to have its own associated Style type. This type is intended to contain high-level styling information for the widget that can be optionally specified by a user of the widget. Read more

type Event = Option<usize>

The type of event yielded by the widget, returned via the Widget::set function. Read more

pub fn update(
    self,
    args: UpdateArgs<'_, '_, '_, '_, DropDownList<'a, T>>
) -> <DropDownList<'a, T> as Widget>::Event
[src]

Update the state of the DropDownList.

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for DropDownList<'a, T> where
    T: RefUnwindSafe

impl<'a, T> Send for DropDownList<'a, T> where
    T: Sync

impl<'a, T> Sync for DropDownList<'a, T> where
    T: Sync

impl<'a, T> Unpin for DropDownList<'a, T>

impl<'a, T> UnwindSafe for DropDownList<'a, T> where
    T: RefUnwindSafe

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    T: Component + Float,
    D: AdaptFrom<S, Swp, Dwp, T>,
    Swp: WhitePoint,
    Dwp: WhitePoint
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> Downcast<T> for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<W> Positionable for W where
    W: Widget
[src]

impl<T> SetParameter for T

impl<W> Sizeable for W where
    W: Widget
[src]

pub fn get_x_dimension(&self, ui: &Ui) -> Dimension[src]

We attempt to retrieve the x Dimension for the widget via the following:

  • Check for specified value at maybe_x_dimension
  • Otherwise, use the default returned by Widget::default_x_dimension.

pub fn get_y_dimension(&self, ui: &Ui) -> Dimension[src]

We attempt to retrieve the y Dimension for the widget via the following:

  • Check for specified value at maybe_y_dimension
  • Otherwise, use the default returned by Widget::default_y_dimension.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Upcast<T> for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,