Struct UpdateMenu

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

Implementations§

Source§

impl UpdateMenu

Source

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

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

Source

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

Sets the background color of the update menu buttons.

Source

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

Sets the color of the border enclosing the update menu.

Source

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

Sets the width (in px) of the border enclosing the update menu.

Source

pub fn buttons(self, value: Vec<Button>) -> Self

Source

pub fn direction(self, value: UpdateMenuDirection) -> Self

Determines the direction in which the buttons are laid out, whether in a dropdown menu or a row/column of buttons. For left and up, the buttons will still appear in left-to-right or top-to-bottom order respectively.

Source

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

Sets the font of the update menu button text.

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. You can modify these items in the output figure by making your own item with templateitemname matching this name alongside your modifications (including visible: false or enabled: false to hide it). Has no effect outside of a template.

Source

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

Sets the padding around the buttons or dropdown menu.

Source

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

Highlights active dropdown item or active button if true.

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. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with templateitemname matching its name, alongside your modifications (including visible: false or enabled: false to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with visible: true.

Source

pub fn ty(self, value: UpdateMenuType) -> Self

Determines whether the buttons are accessible via a dropdown menu or whether the buttons are stacked horizontally or vertically

Source

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

Determines whether or not the update menu is visible.

Source

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

Type: number between or equal to -2 and 3 Default: -0.05 Sets the x position (in normalized coordinates) of the update menu.

Source

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

Sets the update menu’s horizontal position anchor. This anchor binds the x position to the “left”, “center” or “right” of the range selector. Default: “right”

Source

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

Type: number between or equal to -2 and 3 Default: 1 Sets the y position (in normalized coordinates) of the update menu.

Source

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

Sets the update menu’s vertical position anchor This anchor binds the y position to the “top”, “middle” or “bottom” of the range selector. Default: “top”

Source§

impl UpdateMenu

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl Clone for UpdateMenu

Source§

fn clone(&self) -> UpdateMenu

Returns a copy 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 UpdateMenu

Source§

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

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

impl Default for UpdateMenu

Source§

fn default() -> Self

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

impl Serialize for UpdateMenu

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§

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

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

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

Source§

fn vzip(self) -> V