Class: Toybox.WatchUi.CustomMenuItem
- Inherits:
-
Toybox.WatchUi.MenuItem
Overview
A representation of a custom item in a CustomMenu.
A CustomMenuItem is a element of a CustomMenu View that represents one of the items in the menu. When selected, the onSelect() delegate callback will be invoked. The selected state of the item may change when it is being selected. This state can be evaluated using the isSelected() method and can be used to control the look of a selected item.
A CustomMenuItem can be added to a CustomMenu using the addItem() method.
See Also:
Instance Method Summary collapse
-
draw(dc as Graphics.Dc) as Void
Draw method for a CustomMenuItem.
-
initialize(identifier, options as { :alignment as MenuItem.Alignment, :drawable as WatchUi.Drawable, :icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol })
Constructor.
-
isFocused() as Lang.Boolean
Get the CustomMenuItem focus state.
-
isSelected() as Lang.Boolean
Get the CustomMenuItem selected state.
-
setDrawable(drawable as WatchUi.Drawable) as Void
Set a CustomMenuItem Drawable.
Instance Method Details
draw(dc as Graphics.Dc) as Void
Draw method for a CustomMenuItem.
This is called when a menu item is rendering.
initialize(identifier, options as { :alignment as MenuItem.Alignment, :drawable as WatchUi.Drawable, :icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol })
Constructor
The :icon
option is only used on ConnectIQ 3.4.0 devices with subscreen support.
isFocused() as Lang.Boolean
Get the CustomMenuItem focus state.
isSelected() as Lang.Boolean
Get the CustomMenuItem selected state.
setDrawable(drawable as WatchUi.Drawable) as Void
Set a CustomMenuItem Drawable.