Class: Toybox.WatchUi.Selectable
- Inherits:
-
Toybox.WatchUi.Drawable
Overview
A representation of an on-screen selectable object with defined states depending on selection mode.
See Also:
See the Selectable sample distributed with the SDK for an example of the use of the Selectable class
Direct Known Subclasses
Instance Member Summary collapse
-
stateDefault as Graphics.ColorType or WatchUi.Drawable or Null
The default state of a Selectable object.
-
stateDisabled as Graphics.ColorType or WatchUi.Drawable or Null
The disabled state of a Selectable object.
-
stateHighlighted as Graphics.ColorType or WatchUi.Drawable or Null
The highlighted state of a Selectable object.
-
stateSelected as Graphics.ColorType or WatchUi.Drawable or Null
The selected state of a Selectable object.
Instance Method Summary collapse
-
draw(dc as Graphics.Dc) as Void
Draw the Selectable to the device context (Dc).
-
getState() as Lang.Symbol
Get the current state of a Selectable object.
-
initialize(options as { :locX as Lang.Numeric, :locY as Lang.Numeric, :width as Lang.Numeric, :height as Lang.Numeric, :stateDefault as Graphics.ColorType or WatchUi.Drawable, :stateHighlighted as Graphics.ColorType or WatchUi.Drawable, :stateSelected as Graphics.ColorType or WatchUi.Drawable, :stateDisabled as Graphics.ColorType or WatchUi.Drawable, :identifier as Lang.Object, :visible as Lang.Boolean })
Constructor.
-
setState(state as Lang.Symbol) as Void
Set the current state of a Selectable object.
Instance Attribute Details
var stateDefault as Graphics.ColorType or WatchUi.Drawable or Null
The default state of a Selectable object.
A Drawable, Graphics.COLOR_* constant, or 24-bit integer of the form 0xRRGGBB representing the default state of the Selectable
var stateDisabled as Graphics.ColorType or WatchUi.Drawable or Null
The disabled state of a Selectable object.
A Drawable, Graphics.COLOR_* constant, or 24-bit integer of the form 0xRRGGBB representing the disabled state of the Selectable
var stateHighlighted as Graphics.ColorType or WatchUi.Drawable or Null
The highlighted state of a Selectable object.
A Drawable, Graphics.COLOR_* constant, or 24-bit integer of the form 0xRRGGBB representing the highlighted state of the Selectable
var stateSelected as Graphics.ColorType or WatchUi.Drawable or Null
The selected state of a Selectable object.
A Drawable, Graphics.COLOR_* constant, or 24-bit integer of the form 0xRRGGBB representing the selected state of the Selectable
Instance Method Details
draw(dc as Graphics.Dc) as Void
Draw the Selectable to the device context (Dc).
This method assumes that the device context has already been configured to the proper options.
getState() as Lang.Symbol
Get the current state of a Selectable object.
initialize(options as { :locX as Lang.Numeric, :locY as Lang.Numeric, :width as Lang.Numeric, :height as Lang.Numeric, :stateDefault as Graphics.ColorType or WatchUi.Drawable, :stateHighlighted as Graphics.ColorType or WatchUi.Drawable, :stateSelected as Graphics.ColorType or WatchUi.Drawable, :stateDisabled as Graphics.ColorType or WatchUi.Drawable, :identifier as Lang.Object, :visible as Lang.Boolean })
Constructor
setState(state as Lang.Symbol) as Void
Set the current state of a Selectable object.