UpdateMenu
public struct UpdateMenu : Encodable
Undocumented
-
Determines whether or not the update menu is visible.
Declaration
Swift
public var visible: Bool?
-
Determines whether the buttons are accessible via a dropdown menu or whether the buttons are stacked horizontally or vertically
See moreDeclaration
Swift
public enum Layout.UpdateMenu.`Type` : String, Encodable
-
Determines whether the buttons are accessible via a dropdown menu or whether the buttons are stacked horizontally or vertically
Declaration
Swift
public var type: Type?
-
Determines the direction in which the buttons are laid out, whether in a dropdown menu or a row/column of buttons.
For
See moreleft
andup
, the buttons will still appear in left-to-right or top-to-bottom order respectively.Declaration
Swift
public enum Direction : String, Encodable
-
Determines the direction in which the buttons are laid out, whether in a dropdown menu or a row/column of buttons.
For
left
andup
, the buttons will still appear in left-to-right or top-to-bottom order respectively.Declaration
Swift
public var direction: Direction?
-
Determines which button (by index starting from 0) is considered active.
Declaration
Swift
public var active: Int?
-
Highlights active dropdown item or active button if true.
Declaration
Swift
public var showActive: Bool?
-
Undocumented
See moreDeclaration
Swift
public struct Button : Encodable
-
Undocumented
Declaration
Swift
public var buttons: [Button]?
-
Sets the x position (in normalized coordinates) of the update menu.
Declaration
Swift
public var x: Double?
-
Sets the update menu’s horizontal position anchor.
This anchor binds the
x
position to the left, center or right of the range selector.Declaration
Swift
public var xAnchor: XAutoAnchor?
-
Sets the y position (in normalized coordinates) of the update menu.
Declaration
Swift
public var y: Double?
-
Sets the update menu’s vertical position anchor This anchor binds the
y
position to the top, middle or bottom of the range selector.Declaration
Swift
public var yAnchor: YAutoAnchor?
-
Sets the padding around the buttons or dropdown menu.
Declaration
Swift
public var padding: Padding?
-
Sets the font of the update menu button text.
Declaration
Swift
public var font: Font?
-
Sets the background color of the update menu buttons.
Declaration
Swift
public var backgroundColor: Color?
-
Sets the color of the border enclosing the update menu.
Declaration
Swift
public var borderColor: Color?
-
Sets the width (in px) of the border enclosing the update menu.
Declaration
Swift
public var borderWidth: Double?
-
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 thisname
alongside your modifications (includingvisible: false
orenabled: false
to hide it). Has no effect outside of a template.Declaration
Swift
public var name: String?
-
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 itsname
, alongside your modifications (includingvisible: false
orenabled: false
to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it withvisible: true
.Declaration
Swift
public var templateItemName: String?
-
init(visible:
type: direction: active: showActive: buttons: x: xAnchor: y: yAnchor: padding: font: backgroundColor: borderColor: borderWidth: name: templateItemName: ) Creates
UpdateMenu
object with specified properties.Declaration
Swift
public init(visible: Bool? = nil, type: `Type`? = nil, direction: Direction? = nil, active: Int? = nil, showActive: Bool? = nil, buttons: [Button]? = nil, x: Double? = nil, xAnchor: XAutoAnchor? = nil, y: Double? = nil, yAnchor: YAutoAnchor? = nil, padding: Padding? = nil, font: Font? = nil, backgroundColor: Color? = nil, borderColor: Color? = nil, borderWidth: Double? = nil, name: String? = nil, templateItemName: String? = nil)
Parameters
visible
Determines whether or not the update menu is visible.
type
Determines whether the buttons are accessible via a dropdown menu or whether the buttons are stacked horizontally or vertically
direction
Determines the direction in which the buttons are laid out, whether in a dropdown menu or a row/column of buttons.
active
Determines which button (by index starting from 0) is considered active.
showActive
Highlights active dropdown item or active button if true.
buttons
x
Sets the x position (in normalized coordinates) of the update menu.
xAnchor
Sets the update menu’s horizontal position anchor.
y
Sets the y position (in normalized coordinates) of the update menu.
yAnchor
Sets the update menu’s vertical position anchor This anchor binds the
y
position to the top, middle or bottom of the range selector.padding
Sets the padding around the buttons or dropdown menu.
font
Sets the font of the update menu button text.
backgroundColor
Sets the background color of the update menu buttons.
borderColor
Sets the color of the border enclosing the update menu.
borderWidth
Sets the width (in px) of the border enclosing the update menu.
name
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.
templateItemName
Used to refer to a named item in this array in the template.