pub struct ImageSlider<T, K> {
    common: CommonBuilder,
    value: T,
    min: T,
    max: T,
    soft_max: T,
    skew: f32,
    track: Track,
    slider: Slider,
    kind: PhantomData<K>,
}
Expand description

Linear value selection.

If the slider’s width is greater than its height, it will automatically become a horizontal slider, otherwise it will be a vertical slider.

Its reaction is triggered if the value is updated or if the mouse button is released while the cursor is above the rectangle.

Fields§

§common: CommonBuilder§value: T§min: T§max: T§soft_max: T§skew: f32

The amount in which the slider’s display should be skewed.

Higher skew amounts (above 1.0) will weigh lower values.

Lower skew amounts (below 1.0) will weigh higher values.

All skew amounts should be greater than 0.0.

§track: Track§slider: Slider§kind: PhantomData<K>

Implementations§

source§

impl<T, K> ImageSlider<T, K>

source

pub fn skew(self, skew: f32) -> Self

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

source

pub fn soft_max(self, soft_max: T) -> Self

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

source

pub fn pad_track(self, pad_track: (f32, f32)) -> Self

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

source

pub fn hover_image(self, hover_image: Id) -> Self

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

source

pub fn press_image(self, press_image: Id) -> Self

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

source

pub fn track_breadth(self, track_breadth: f32) -> Self

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

source

pub fn slider_length(self, slider_length: f32) -> Self

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

source

pub fn track_color(self, track_color: Color) -> Self

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

source

pub fn slider_color(self, slider_color: Color) -> Self

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

source

fn new( value: T, min: T, max: T, slider_image_id: Id, track_image_id: Id ) -> Self
where T: Copy,

source§

impl<T> ImageSlider<T, Continuous>
where T: Float,

source

pub fn continuous( value: T, min: T, max: T, slider_image_id: Id, track_image_id: Id ) -> Self

source§

impl<T> ImageSlider<T, Discrete>
where T: Integer + Copy,

source

pub fn discrete( value: T, min: T, max: T, slider_image_id: Id, track_image_id: Id ) -> Self

Trait Implementations§

source§

impl<T, K> Colorable for ImageSlider<T, K>

source§

fn color(self, color: Color) -> Self

Set the color of the widget.
§

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

Set the color of the widget from rgba values.
§

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

Set the color of the widget from rgb values.
§

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

Set the color of the widget from hsla values.
§

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

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

impl<T, K> Common for ImageSlider<T, K>

source§

fn common(&self) -> &CommonBuilder

Borrows the CommonBuilder field.
source§

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

Mutably borrows the CommonBuilder field.
source§

impl<T, K> Widget for ImageSlider<T, K>
where T: NumCast + Num + Copy + PartialOrd, K: ValueFromPercent<T>,

source§

fn update(self, args: UpdateArgs<'_, '_, '_, '_, Self>) -> Self::Event

Update the state of the Slider.

§

type Event = Option<T>

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

type State = State

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

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

fn init_state(&self, id_gen: Generator<'_>) -> Self::State

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

fn style(&self) -> Self::Style

Return the styling of the widget. Read more
§

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

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

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

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

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

The default width for the Widget. Read more
§

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

The default height of the widget. Read more
§

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

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

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

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

Returns either of the following: Read more
§

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

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

fn no_parent(self) -> Self

Specify that this widget has no parent widgets.
§

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

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

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
§

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
§

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

fn scroll_kids(self) -> Self

Makes the widget’s KidArea scrollable. Read more
§

fn scroll_kids_vertically(self) -> Self

Makes the widget’s KidArea scrollable. Read more
§

fn scroll_kids_horizontally(self) -> Self

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

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
§

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
§

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
§

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
§

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<T, K> RefUnwindSafe for ImageSlider<T, K>

§

impl<T, K> Send for ImageSlider<T, K>
where K: Send, T: Send,

§

impl<T, K> Sync for ImageSlider<T, K>
where K: Sync, T: Sync,

§

impl<T, K> Unpin for ImageSlider<T, K>
where K: Unpin, T: Unpin,

§

impl<T, K> UnwindSafe for ImageSlider<T, K>
where K: UnwindSafe, T: UnwindSafe,

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
§

impl<T, U> Cast<U> for T
where U: FromCast<T>,

§

fn cast(self) -> U

Numeric cast from self to T.
§

impl<T> Chain<T> for T

§

fn len(&self) -> usize

The number of items that this chain link consists of.
§

fn append_to(self, v: &mut Vec<T>)

Append the elements in this link to the chain.
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromCast<T> for T

§

fn from_cast(t: T) -> T

Numeric cast from T to Self.
§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

§

impl<T> GetSetFdFlags for T

§

fn get_fd_flags(&self) -> Result<FdFlags, Error>
where T: AsFilelike,

Query the “status” flags for the self file descriptor.
§

fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>
where T: AsFilelike,

Create a new SetFdFlags value for use with set_fd_flags. Read more
§

fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>
where T: AsFilelike,

Set the “status” flags for the self file descriptor. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<W> ItemTooltipable for W
where W: Widget,

source§

fn with_item_tooltip<I, 'a>( self, tooltip_manager: &'a mut ItemTooltipManager, items: I, prices: &'a Option<SitePrices>, tooltip: &'a ItemTooltip<'a> ) -> ItemTooltipped<'a, W, I>

§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> Pointee for T

§

type Pointer = u32

§

fn debug( pointer: <T as Pointee>::Pointer, f: &mut Formatter<'_> ) -> Result<(), Error>

source§

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

source§

fn position(self, request: PositionSpecifier) -> W

§

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

§

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

Build with the given Position along the x axis.
§

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

Build with the given Position along the y axis.
§

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

Get the Position along the x axis.
§

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

Get the Position along the y axis.
§

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

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

fn get_depth(&self) -> f32

Return the depth.
§

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

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

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

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

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

Set the Position with some Point.
§

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

Set the Position with x y coordinates.
§

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

Set the x Position Relative to the previous widget.
§

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

Set the y Position Relative to the previous widget.
§

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

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

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

Set the x Position Relative to the given widget.
§

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

Set the y Position Relative to the given widget.
§

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn align_left(self) -> Self

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

fn align_middle_x(self) -> Self

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

fn align_right(self) -> Self

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

fn align_top(self) -> Self

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

fn align_middle_y(self) -> Self

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

fn align_bottom(self) -> Self

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn middle(self) -> Self

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

fn top_left(self) -> Self

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

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

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

fn top_right(self) -> Self

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

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

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

fn bottom_left(self) -> Self

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

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

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

fn bottom_right(self) -> Self

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

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

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

fn mid_top(self) -> Self

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

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

fn mid_bottom(self) -> Self

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

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

fn mid_left(self) -> Self

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

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

fn mid_right(self) -> Self

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

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

§

type Output = T

Should always be Self
§

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

§

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

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

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

Set the length along the x axis.
§

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

Set the length along the y axis.
§

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

Set the absolute width for the widget.
§

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

Set the absolute height for the widget.
§

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

Set the dimensions for the widget.
§

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

Set the width and height for the widget.
§

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Get the height of the widget.
§

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

The dimensions for the widget.
source§

impl<Context> SubContext<Context> for Context

source§

fn sub_context(self) -> Context

§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

source§

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

source§

fn with_tooltip<'a>( self, tooltip_manager: &'a mut TooltipManager, title_text: &'a str, desc_text: &'a str, tooltip: &'a Tooltip<'a>, title_col: Color ) -> Tooltipped<'a, W>

§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

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

§

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

§

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

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> Any for T
where T: Any,

§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

§

impl<T> Event for T
where T: Send + Sync + 'static,

§

impl<T> Resource for T
where T: Any + Send + Sync,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSync for T
where T: Sync,