pub struct UpdateMenu { /* private fields */ }
Implementations§
Source§impl UpdateMenu
impl UpdateMenu
Sourcepub fn active(self, value: i32) -> Self
pub fn active(self, value: i32) -> Self
Determines which button (by index starting from 0) is considered active.
Sourcepub fn background_color(self, value: impl Color) -> Self
pub fn background_color(self, value: impl Color) -> Self
Sets the background color of the update menu buttons.
Sourcepub fn border_color(self, value: impl Color) -> Self
pub fn border_color(self, value: impl Color) -> Self
Sets the color of the border enclosing the update menu.
Sourcepub fn border_width(self, value: usize) -> Self
pub fn border_width(self, value: usize) -> Self
Sets the width (in px) of the border enclosing the update menu.
Sourcepub fn direction(self, value: UpdateMenuDirection) -> Self
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.
Sourcepub fn name(self, value: impl AsRef<str>) -> Self
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.
Sourcepub fn show_active(self, value: bool) -> Self
pub fn show_active(self, value: bool) -> Self
Highlights active dropdown item or active button if true.
Sourcepub fn template_item_name(self, value: impl AsRef<str>) -> Self
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
.
Sourcepub fn ty(self, value: UpdateMenuType) -> Self
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
Sourcepub fn visible(self, value: bool) -> Self
pub fn visible(self, value: bool) -> Self
Determines whether or not the update menu is visible.
Sourcepub fn x(self, value: f64) -> Self
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.
Sourcepub fn x_anchor(self, value: Anchor) -> Self
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§impl UpdateMenu
impl UpdateMenu
Trait Implementations§
Source§impl Clone for UpdateMenu
impl Clone for UpdateMenu
Source§fn clone(&self) -> UpdateMenu
fn clone(&self) -> UpdateMenu
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more