Struct Slider

Source
pub struct Slider { /* private fields */ }

Implementations§

Source§

impl Slider

Source

pub fn active(self, value: i32) -> Self

Determines which slider step (by index starting from 0) is considered active.

Source

pub fn active_background_color(self, value: impl Color) -> Self

Sets the background color of the slider grip while dragging.

Source

pub fn background_color(self, value: impl Color) -> Self

Sets the background color of the slider.

Source

pub fn border_color(self, value: impl Color) -> Self

Sets the color of the border enclosing the slider.

Source

pub fn border_width(self, value: usize) -> Self

Sets the width (in px) of the border enclosing the slider.

Source

pub fn current_value(self, value: SliderCurrentValue) -> Self

Sets the current value display configuration.

Source

pub fn font(self, value: Font) -> Self

Sets the font of the slider step text.

Source

pub fn length(self, value: f64) -> Self

Sets the length of the slider.

Source

pub fn minor_tick_length(self, value: usize) -> Self

Sets the length in pixels of minor tick marks.

Source

pub fn name(self, value: impl AsRef<str>) -> Self

When used in a template, named items are created in the output figure in addition to any items the figure already has in this array.

Source

pub fn pad(self, value: Pad) -> Self

Sets the padding around the slider.

Source

pub fn steps(self, value: Vec<SliderStep>) -> Self

Sets the slider steps.

Source

pub fn template_item_name(self, value: impl AsRef<str>) -> Self

Used to refer to a named item in this array in the template.

Source

pub fn tick_color(self, value: impl Color) -> Self

Sets the color of the border enclosing the slider.

Source

pub fn tick_length(self, value: usize) -> Self

Sets the length in pixels of step tick marks.

Source

pub fn tick_width(self, value: usize) -> Self

Sets the tick width (in px).

Source

pub fn transition(self, value: SliderTransition) -> Self

Sets the transition configuration.

Source

pub fn visible(self, value: bool) -> Self

Determines whether or not the slider is visible.

Source

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

Sets the x position (in normalized coordinates) of the slider.

Source

pub fn x_anchor(self, value: Anchor) -> Self

Sets the slider’s horizontal position anchor.

Source

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

Sets the y position (in normalized coordinates) of the slider.

Source

pub fn y_anchor(self, value: Anchor) -> Self

Sets the slider’s vertical position anchor.

Source§

impl Slider

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl Clone for Slider

Source§

fn clone(&self) -> Slider

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Slider

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Slider

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Serialize for Slider

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Slider

§

impl !RefUnwindSafe for Slider

§

impl Send for Slider

§

impl Sync for Slider

§

impl Unpin for Slider

§

impl !UnwindSafe for Slider

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.