previous chapter contents page top page next chapter

OverlaidImageButton

inherits from SpecialButton;

Class Description

An overlaid image button is a special button that includes an image that depends on its target.

Programming information

Instantiate: sometimes
Subclass: sometimes
Call its methods: often

You will rarely create custom subclasses of class OverlaidImageButton. You're most likely to use overlaid image button objects in your object definition files.

Methods defined by class OverlaidImageButton

Class OverlaidImageButton defines the following methods:

Method Description
UpdateButton Set the image of the button based on its target
Draw Overridden to call inherited then draw the overlay image

Fields defined by class OverlaidImageButton

Class OverlaidImageButton 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 OverlaidImageButton
overlayImage Image Optional image to superimpose after drawing rest of button

Method Descriptions

UpdateButton

overrides UpdateButton

Call: rarely
Override: rarely

The system calls UpdateButton at idle time to check the button's target or do other work to change the button. Class OverlaidImageButton overrides UpdateButton to update the button's image. If the target has an image, UpdateButton grabs that image. For some kinds of targets, such as ListViews, UpdateButton uses the target's content icon.