DropDownList

Struct DropDownList 

Source
pub struct DropDownList<'a, T>
where T: 'a,
{ /* private fields */ }
Expand description

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

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

Implementations§

Source§

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

Source

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

Construct a new DropDownList.

Source

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

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

Source

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

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

Source

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

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

Source

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

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

Source

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

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.

Source

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

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

Source

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

Specify the width of the scrollbar.

Source

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

Specify the font used for displaying the label.

Source

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

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

Source

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

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

Source

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

Center the labels to the their Buttons’ surface.

Source

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

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

Source

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

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

Trait Implementations§

Source§

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

Source§

fn border(self, border: f64) -> DropDownList<'a, T>

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

Source§

fn border_color(self, border_color: Color) -> DropDownList<'a, T>

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

Source§

fn border_rgba(self, r: f32, g: f32, b: f32, a: f32) -> Self

Set the color of the widget’s border with rgba values.
Source§

fn border_rgb(self, r: f32, g: f32, b: f32) -> Self

Set the color of the widget’s border with rgb values.
Source§

fn border_hsla(self, h: f32, s: f32, l: f32, a: f32) -> Self

Set the color of the widget’s border with hsla values.
Source§

fn border_hsl(self, h: f32, s: f32, l: f32) -> Self

Set the color of the widget’s border with hsl values.
Source§

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

Source§

fn color(self, color: Color) -> DropDownList<'a, T>

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

Source§

fn rgba(self, r: f32, g: f32, b: f32, a: f32) -> Self

Set the color of the widget from rgba values.
Source§

fn rgb(self, r: f32, g: f32, b: f32) -> Self

Set the color of the widget from rgb values.
Source§

fn hsla(self, h: f32, s: f32, l: f32, a: f32) -> Self

Set the color of the widget from hsla values.
Source§

fn hsl(self, h: f32, s: f32, l: f32) -> Self

Set the color of the widget from hsl values.
Source§

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

Source§

fn common(&self) -> &CommonBuilder

Borrows the CommonBuilder field.
Source§

fn common_mut(&mut self) -> &mut CommonBuilder

Mutably borrows the CommonBuilder field.
Source§

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

Source§

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

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

Source§

fn label_color(self, label_color: Color) -> DropDownList<'a, T>

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

Source§

fn label_font_size(self, label_font_size: u32) -> DropDownList<'a, T>

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

Source§

fn label_rgba(self, r: f32, g: f32, b: f32, a: f32) -> Self

Set the color of the widget’s label from rgba values.
Source§

fn label_rgb(self, r: f32, g: f32, b: f32) -> Self

Set the color of the widget’s label from rgb values.
Source§

fn label_hsla(self, h: f32, s: f32, l: f32, a: f32) -> Self

Set the color of the widget’s label from hsla values.
Source§

fn label_hsl(self, h: f32, s: f32, l: f32) -> Self

Set the color of the widget’s label from hsl values.
Source§

fn small_font(self, ui: &Ui) -> Self

Set a “small” font size for the widget’s label.
Source§

fn medium_font(self, ui: &Ui) -> Self

Set a “medium” font size for the widget’s label.
Source§

fn large_font(self, ui: &Ui) -> Self

Set a “large” font size for the widget’s label.
Source§

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

Source§

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

Update the state of the DropDownList.

Source§

type State = State

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

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
Source§

type Event = Option<usize>

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

fn init_state( &self, id_gen: Generator<'_>, ) -> <DropDownList<'a, T> as Widget>::State

Return the initial State of the Widget. Read more
Source§

fn style(&self) -> <DropDownList<'a, T> as Widget>::Style

Return the styling of the widget. Read more
Source§

fn default_x_position(&self, ui: &Ui) -> Position

The default Position for the widget along the x axis. Read more
Source§

fn default_y_position(&self, ui: &Ui) -> Position

The default Position for the widget along the y axis. Read more
Source§

fn default_x_dimension(&self, ui: &Ui) -> Dimension

The default width for the Widget. Read more
Source§

fn default_y_dimension(&self, ui: &Ui) -> Dimension

The default height of the widget. Read more
Source§

fn drag_area( &self, _dim: [f64; 2], _style: &Self::Style, _theme: &Theme, ) -> Option<Rect>

If the widget is draggable, implement this method and return the position and dimensions of the draggable space. The position should be relative to the center of the widget.
Source§

fn kid_area(&self, args: KidAreaArgs<'_, Self>) -> KidArea

The area on which child widgets will be placed when using the Place Position methods.
Source§

fn is_over(&self) -> fn(&Container, [f64; 2], &Theme) -> IsOver

Returns either of the following: Read more
Source§

fn parent(self, parent_id: NodeIndex) -> Self

Set the parent widget for this Widget by passing the WidgetId of the parent. Read more
Source§

fn no_parent(self) -> Self

Specify that this widget has no parent widgets.
Source§

fn place_on_kid_area(self, b: bool) -> Self

Set whether or not the Widget should be placed on the kid_area. Read more
Source§

fn graphics_for(self, id: NodeIndex) -> Self

Indicates that the Widget is used as a non-interactive graphical element for some other widget. Read more
Source§

fn floating(self, is_floating: bool) -> Self

Set whether or not the widget is floating (the default is false). A typical example of a floating widget would be a pop-up or alert window. Read more
Source§

fn crop_kids(self) -> Self

Indicates that all widgets who are children of this widget should be cropped to the kid_area of this widget.
Source§

fn scroll_kids(self) -> Self

Makes the widget’s KidArea scrollable. Read more
Source§

fn scroll_kids_vertically(self) -> Self

Makes the widget’s KidArea scrollable. Read more
Source§

fn scroll_kids_horizontally(self) -> Self

Set whether or not the widget’s KidArea is scrollable (the default is false). Read more
Source§

fn and<F>(self, build: F) -> Self
where F: FnOnce(Self) -> Self,

A builder method that “lifts” the Widget through the given build function. Read more
Source§

fn and_mut<F>(self, mutate: F) -> Self
where F: FnOnce(&mut Self),

A builder method that mutates the Widget with the given mutate function. Read more
Source§

fn and_if<F>(self, cond: bool, build: F) -> Self
where F: FnOnce(Self) -> Self,

A method that conditionally builds the Widget with the given build function. Read more
Source§

fn and_then<T, F>(self, maybe: Option<T>, build: F) -> Self
where F: FnOnce(Self, T) -> Self,

A method that optionally builds the Widget with the given build function. Read more
Source§

fn set<'a, 'b>(self, id: NodeIndex, ui_cell: &'a mut UiCell<'b>) -> Self::Event

Note: There should be no need to override this method. Read more

Auto Trait Implementations§

§

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

§

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§

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<W> Positionable for W
where W: Widget,

Source§

fn x_position(self, x: Position) -> W

Build with the given Position along the x axis.
Source§

fn y_position(self, y: Position) -> W

Build with the given Position along the y axis.
Source§

fn get_x_position(&self, ui: &Ui) -> Position

Get the Position along the x axis.
Source§

fn get_y_position(&self, ui: &Ui) -> Position

Get the Position along the y axis.
Source§

fn depth(self, depth: f32) -> W

The depth at which the widget should be rendered relatively to its sibling widgets.
Source§

fn get_depth(&self) -> f32

Return the depth.
Source§

fn x(self, x: f64) -> Self

Build with the given Absolute Position along the x axis.
Source§

fn y(self, y: f64) -> Self

Build with the given Absolute Position along the y axis.
Source§

fn xy(self, point: [f64; 2]) -> Self

Set the Position with some Point.
Source§

fn x_y(self, x: f64, y: f64) -> Self

Set the Position with x y coordinates.
Source§

fn x_position_relative(self, x: Relative) -> Self

Set the x Position Relative to the previous widget.
Source§

fn y_position_relative(self, y: Relative) -> Self

Set the y Position Relative to the previous widget.
Source§

fn x_y_position_relative(self, x: Relative, y: Relative) -> Self

Set the x and y Positions Relative to the previous widget.
Source§

fn x_position_relative_to(self, other: NodeIndex, x: Relative) -> Self

Set the x Position Relative to the given widget.
Source§

fn y_position_relative_to(self, other: NodeIndex, y: Relative) -> Self

Set the y Position Relative to the given widget.
Source§

fn x_y_position_relative_to( self, other: NodeIndex, x: Relative, y: Relative, ) -> Self

Set the x and y Positions Relative to the given widget.
Source§

fn x_relative(self, x: f64) -> Self

Set the Position as a Scalar along the x axis Relative to the middle of previous widget.
Source§

fn y_relative(self, y: f64) -> Self

Set the Position as a Scalar along the y axis Relative to the middle of previous widget.
Source§

fn xy_relative(self, point: [f64; 2]) -> Self

Set the Position as a Point Relative to the middle of the previous widget.
Source§

fn x_y_relative(self, x: f64, y: f64) -> Self

Set the Position as Scalars along the x and y axes Relative to the middle of the previous widget.
Source§

fn x_relative_to(self, other: NodeIndex, x: f64) -> Self

Set the position relative to the widget with the given widget::Id.
Source§

fn y_relative_to(self, other: NodeIndex, y: f64) -> Self

Set the position relative to the widget with the given widget::Id.
Source§

fn xy_relative_to(self, other: NodeIndex, xy: [f64; 2]) -> Self

Set the position relative to the widget with the given widget::Id.
Source§

fn x_y_relative_to(self, other: NodeIndex, x: f64, y: f64) -> Self

Set the position relative to the widget with the given widget::Id.
Source§

fn x_direction(self, direction: Direction, x: f64) -> Self

Build with the Position along the x axis as some distance from another widget.
Source§

fn y_direction(self, direction: Direction, y: f64) -> Self

Build with the Position along the y axis as some distance from another widget.
Source§

fn down(self, y: f64) -> Self

Build with the Position as some distance below another widget.
Source§

fn up(self, y: f64) -> Self

Build with the Position as some distance above another widget.
Source§

fn left(self, x: f64) -> Self

Build with the Position as some distance to the left of another widget.
Source§

fn right(self, x: f64) -> Self

Build with the Position as some distance to the right of another widget.
Source§

fn x_direction_from( self, other: NodeIndex, direction: Direction, x: f64, ) -> Self

Build with the Position along the x axis as some distance from the given widget.
Source§

fn y_direction_from( self, other: NodeIndex, direction: Direction, y: f64, ) -> Self

Build with the Position along the y axis as some distance from the given widget.
Source§

fn down_from(self, other: NodeIndex, y: f64) -> Self

Build with the Position as some distance below the given widget.
Source§

fn up_from(self, other: NodeIndex, y: f64) -> Self

Build with the Position as some distance above the given widget.
Source§

fn left_from(self, other: NodeIndex, x: f64) -> Self

Build with the Position as some distance to the left of the given widget.
Source§

fn right_from(self, other: NodeIndex, x: f64) -> Self

Build with the Position as some distance to the right of the given widget.
Source§

fn x_align(self, align: Align) -> Self

Align the Position of the widget along the x axis.
Source§

fn y_align(self, align: Align) -> Self

Align the Position of the widget along the y axis.
Source§

fn align_left(self) -> Self

Align the position to the left (only effective for Up or Down Directions).
Source§

fn align_middle_x(self) -> Self

Align the position to the middle (only effective for Up or Down Directions).
Source§

fn align_right(self) -> Self

Align the position to the right (only effective for Up or Down Directions).
Source§

fn align_top(self) -> Self

Align the position to the top (only effective for Left or Right Directions).
Source§

fn align_middle_y(self) -> Self

Align the position to the middle (only effective for Left or Right Directions).
Source§

fn align_bottom(self) -> Self

Align the position to the bottom (only effective for Left or Right Directions).
Source§

fn x_align_to(self, other: NodeIndex, align: Align) -> Self

Align the Position of the widget with the given widget along the x axis.
Source§

fn y_align_to(self, other: NodeIndex, align: Align) -> Self

Align the Position of the widget with the given widget along the y axis.
Source§

fn align_left_of(self, other: NodeIndex) -> Self

Align the position to the left (only effective for Up or Down Directions).
Source§

fn align_middle_x_of(self, other: NodeIndex) -> Self

Align the position to the middle (only effective for Up or Down Directions).
Source§

fn align_right_of(self, other: NodeIndex) -> Self

Align the position to the right (only effective for Up or Down Directions).
Source§

fn align_top_of(self, other: NodeIndex) -> Self

Align the position to the top (only effective for Left or Right Directions).
Source§

fn align_middle_y_of(self, other: NodeIndex) -> Self

Align the position to the middle (only effective for Left or Right Directions).
Source§

fn align_bottom_of(self, other: NodeIndex) -> Self

Align the position to the bottom (only effective for Left or Right Directions).
Source§

fn x_place_on(self, other: NodeIndex, place: Place) -> Self

Place the widget at some position on the other Widget along the x axis.
Source§

fn y_place_on(self, other: NodeIndex, place: Place) -> Self

Place the widget at some position on the other Widget along the y axis.
Source§

fn middle_of(self, other: NodeIndex) -> Self

Place the widget in the middle of the given Widget.
Source§

fn top_left_of(self, other: NodeIndex) -> Self

Place the widget in the top left corner of the given Widget.
Source§

fn top_left_with_margin_on(self, other: NodeIndex, mgn: f64) -> Self

Place the widget in the top left corner of the given Widget with the given margin between both edges.
Source§

fn top_left_with_margins_on(self, other: NodeIndex, top: f64, left: f64) -> Self

Place the widget in the top left corner of the given Widget with the given margins between each respective edge.
Source§

fn top_right_of(self, other: NodeIndex) -> Self

Place the widget in the top right corner of the given Widget.
Source§

fn top_right_with_margin_on(self, other: NodeIndex, mgn: f64) -> Self

Place the widget in the top right corner of the given Widget with the given margin between both edges.
Source§

fn top_right_with_margins_on( self, other: NodeIndex, top: f64, right: f64, ) -> Self

Place the widget in the top right corner of the given Widget with the given margins between each respective edge.
Source§

fn bottom_left_of(self, other: NodeIndex) -> Self

Place the widget in the bottom left corner of the given Widget.
Source§

fn bottom_left_with_margin_on(self, other: NodeIndex, mgn: f64) -> Self

Place the widget in the bottom left corner of the given Widget with the given margin between both edges.
Source§

fn bottom_left_with_margins_on( self, other: NodeIndex, bottom: f64, left: f64, ) -> Self

Place the widget in the bottom left corner of the given Widget with the given margins between each respective edge.
Source§

fn bottom_right_of(self, other: NodeIndex) -> Self

Place the widget in the bottom right corner of the given Widget.
Source§

fn bottom_right_with_margin_on(self, other: NodeIndex, mgn: f64) -> Self

Place the widget in the bottom right corner of the given Widget with the given margin between both edges.
Source§

fn bottom_right_with_margins_on( self, other: NodeIndex, bottom: f64, right: f64, ) -> Self

Place the widget in the bottom right corner of the given Widget with the given margins between each respective edge.
Source§

fn mid_top_of(self, other: NodeIndex) -> Self

Place the widget in the middle of the top edge of the given Widget.
Source§

fn mid_top_with_margin_on(self, other: NodeIndex, mgn: f64) -> Self

Place the widget in the middle of the top edge of the given Widget with the given margin between the edges.
Source§

fn mid_bottom_of(self, other: NodeIndex) -> Self

Place the widget in the middle of the bottom edge of the given Widget.
Source§

fn mid_bottom_with_margin_on(self, other: NodeIndex, mgn: f64) -> Self

Place the widget in the middle of the bottom edge of the given Widget with the given margin between the edges.
Source§

fn mid_left_of(self, other: NodeIndex) -> Self

Place the widget in the middle of the left edge of the given Widget.
Source§

fn mid_left_with_margin_on(self, other: NodeIndex, mgn: f64) -> Self

Place the widget in the middle of the left edge of the given Widget with the given margin between the edges.
Source§

fn mid_right_of(self, other: NodeIndex) -> Self

Place the widget in the middle of the right edge of the given Widget.
Source§

fn mid_right_with_margin_on(self, other: NodeIndex, mgn: f64) -> Self

Place the widget in the middle of the right edge of the given Widget with the given margin between the edges.
Source§

fn x_place(self, place: Place) -> Self

Place the widget at some position on the Widget along the x axis.
Source§

fn y_place(self, place: Place) -> Self

Place the widget at some position on the Widget along the y axis.
Source§

fn middle(self) -> Self

Place the widget in the middle of the current parent Widget.
Source§

fn top_left(self) -> Self

Place the widget in the top left corner of the current parent Widget.
Source§

fn top_left_with_margin(self, mgn: f64) -> Self

Place the widget in the top left corner of the current parent Widget with the given margin between both edges.
Source§

fn top_left_with_margins(self, top: f64, left: f64) -> Self

Place the widget in the top left corner of the current parent Widget with the given margins between each respective edge.
Source§

fn top_right(self) -> Self

Place the widget in the top right corner of the current parent Widget.
Source§

fn top_right_with_margin(self, mgn: f64) -> Self

Place the widget in the top right corner of the current parent Widget with the given margin between both edges.
Source§

fn top_right_with_margins(self, top: f64, right: f64) -> Self

Place the widget in the top right corner of the current parent Widget with the given margins between each respective edge.
Source§

fn bottom_left(self) -> Self

Place the widget in the bottom left corner of the current parent Widget.
Source§

fn bottom_left_with_margin(self, mgn: f64) -> Self

Place the widget in the bottom left corner of the current parent Widget with the given margin between both edges.
Source§

fn bottom_left_with_margins(self, bottom: f64, left: f64) -> Self

Place the widget in the bottom left corner of the current parent Widget with the given margins between each respective edge.
Source§

fn bottom_right(self) -> Self

Place the widget in the bottom right corner of the current parent Widget.
Source§

fn bottom_right_with_margin(self, mgn: f64) -> Self

Place the widget in the bottom right corner of the current parent Widget with the given margin between both edges.
Source§

fn bottom_right_with_margins(self, bottom: f64, right: f64) -> Self

Place the widget in the bottom right corner of the current parent Widget with the given margins between each respective edge.
Source§

fn mid_top(self) -> Self

Place the widget in the middle of the top edge of the current parent Widget.
Source§

fn mid_top_with_margin(self, mgn: f64) -> Self

Place the widget in the middle of the top edge of the current parent Widget with the given margin from the edge.
Source§

fn mid_bottom(self) -> Self

Place the widget in the middle of the bottom edge of the current parent Widget.
Source§

fn mid_bottom_with_margin(self, mgn: f64) -> Self

Place the widget in the middle of the bottom edge of the current parent Widget with the given margin from the edge.
Source§

fn mid_left(self) -> Self

Place the widget in the middle of the left edge of the current parent Widget.
Source§

fn mid_left_with_margin(self, mgn: f64) -> Self

Place the widget in the middle of the left edge of the current parent Widget with the given margin from the edge.
Source§

fn mid_right(self) -> Self

Place the widget in the middle of the right edge of the current parent Widget.
Source§

fn mid_right_with_margin(self, mgn: f64) -> Self

Place the widget in the middle of the right edge of the current parent Widget with the given margin from the edge.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<W> Sizeable for W
where W: Widget,

Source§

fn get_x_dimension(&self, ui: &Ui) -> Dimension

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.
Source§

fn get_y_dimension(&self, ui: &Ui) -> Dimension

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.
Source§

fn x_dimension(self, w: Dimension) -> W

Set the length along the x axis.
Source§

fn y_dimension(self, h: Dimension) -> W

Set the length along the y axis.
Source§

fn w(self, w: f64) -> Self

Set the absolute width for the widget.
Source§

fn h(self, h: f64) -> Self

Set the absolute height for the widget.
Source§

fn wh(self, wh: [f64; 2]) -> Self

Set the dimensions for the widget.
Source§

fn w_h(self, width: f64, height: f64) -> Self

Set the width and height for the widget.
Source§

fn w_of(self, idx: NodeIndex) -> Self

Set the width as the width of the widget at the given index.
Source§

fn padded_w_of(self, idx: NodeIndex, pad: f64) -> Self

Set the width as the width of the widget at the given index padded at both ends by the given Scalar.
Source§

fn h_of(self, idx: NodeIndex) -> Self

Set the height as the height of the widget at the given index.
Source§

fn padded_h_of(self, idx: NodeIndex, pad: f64) -> Self

Set the height as the height of the widget at the given index padded at both ends by the given Scalar.
Source§

fn wh_of(self, idx: NodeIndex) -> Self

Set the dimensions as the dimensions of the widget at the given index.
Source§

fn padded_wh_of(self, idx: NodeIndex, pad: f64) -> Self

Set the dimensions as the dimensions of the widget at the given index with all four edges padded by the given scalar.
Source§

fn kid_area_w_of(self, idx: NodeIndex) -> Self

Set the width as the width of the padded area of the widget at the given index.
Source§

fn padded_kid_area_w_of(self, idx: NodeIndex, pad: f64) -> Self

Set the width as the KidArea width for the widget at the given index, padded at both ends by the given scalar.
Source§

fn kid_area_h_of(self, idx: NodeIndex) -> Self

Set the height as the KidArea height of the widget at the given index.
Source§

fn padded_kid_area_h_of(self, idx: NodeIndex, pad: f64) -> Self

Set the height as the KidArea height of the widget at the given index, padded at both ends by the given scalar.
Source§

fn kid_area_wh_of(self, idx: NodeIndex) -> Self

Set the dimensions as the KidArea dimensions of the widget at the given index.
Source§

fn padded_kid_area_wh_of(self, idx: NodeIndex, pad: f64) -> Self

Set the dimensions as the KidArea dimensions of the widget at the given index, padded at all four edges by the given scalar.
Source§

fn get_w(&self, ui: &Ui) -> Option<f64>

Get the absolute width of the widget as a Scalar value.
Source§

fn get_h(&self, ui: &Ui) -> Option<f64>

Get the height of the widget.
Source§

fn get_wh(&self, ui: &Ui) -> Option<[f64; 2]>

The dimensions for the widget.
Source§

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

Source§

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>,

Source§

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.
Source§

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

Source§

fn vzip(self) -> V