previous chapter contents page top page next chapter

StickyButton

inherits from Button

Class Description

Sticky buttons are a bit like attribute text objects: they watch targets and update as their targets change. They can also change their targets when they're tapped.

Programming information

Instantiate: sometimes
Subclass: sometimes
Call its methods: often

Sticky button objects must point at a target object and a target attribute. The target attribute must be a Boolean attribute, or at least an unsigned byte, which is indistinguishable from a Boolean attribute.

Methods defined by class StickyButton

Class StickyButton defines the following methods:

Method Description
AboutToShow Overridden to start observing the button's target
AboutToHide Overridden to stop observing the button's target
Notice Overridden to update the button when the target changes
Touch Overridden to change the target's attribute to the opposite of whatever it was

Fields defined by class StickyButton

Class StickyButton defines the following fields: :

Field Type Description
Inherited from SingleLinkable
next Object Next item in view list
Inherited from Linkable
previous Object Previous item in view list
Inherited from Viewable
superview Viewable Container for this object
subview Viewable Object contained by this object
relativeOrigin Dot Origin relative to superview
contentSize Dot Size of content rectangle
viewFlags Unsigned Property settings
labelStyle TextStyle Text style of object's label
color Unsigned Color of object's content
altColor Unsigned Not used by button
shadow Shadow Shadow drawn with object
sound Sound Sound associated with object
Inherited from Stamp
image Image Image used to draw stamp
Inherited from HasBorder
border Border The button's border
Defined by StickyButton
target Object The target to watch and change
targetAttribute Unsigned The attribute of interest
reverseSense Boolean True if the button should highlight when the target attribute value is false

Attributes defined by class StickyButton

Class StickyButton defines the following attributes:

Attribute Type Description
Target Object The target of interest to the button
TargetAttribute Unsigned The attribute to check
ReverseSense Boolean True when the button meaning should be the opposite of the target attribute value