Object <- Viewable <- Stamp <- Button |
|
|
AdjustSize CalcContentBox CalcInsidePart CalcLabelBox CalcOpaqueBox CanAcceptCoupon ContentSize Draw |
ErasablePiece ImageOrigin MatchImage PartColor SetPartColor TimedAction Touch |
|
AutoMove Border Border CanContain CanDrawIn CanStretch Highlighted Highlighted UseScaledText |
| Field | Type | |
|---|---|---|
| Viewable: | superview: | Viewable |
| relativeOrigin: | Dot | |
| contentSize: | Dot | |
| viewFlags: | Flags | |
| labelStyle: | TextStyle | |
| color: | Unsigned | |
| altColor: | Unsigned | |
| shadow: | Shadow | |
| sound: | Playable | |
| Stamp: | image: | Image |
| HasBorder: | border: | Border |
instance Button tag; relativeOrigin: <0.0,0.0>; contentSize: <0.0,0.0>; viewFlags: 0x00000000; labelStyle: nilObject; color: 0; altColor: 0; shadow: nilObject; sound: nilObject; image: nilObject; border: nilObject; end instance;
Define Class Button; inherits from Stamp; inherits from HasBorder, HasTimedAction; overrides AdjustSize; overrides AutoMove; // returns false overrides Border; overrides CanDrawIn; overrides CanStretch; // returns true overrides Draw; overrides ErasablePiece; // returns nilObject if self is current button; else returns self overrides Highlighted; // returns TRUE if object is highlighted (checks view flag) overrides SetHighlighted; overrides TimedAction; overrides Touch; overrides MatchImage; // overridden to return false if self is disabled overrides CalcContentBox; overrides CalcInsidePart; overrides CalcLabelBox; // computes label's box for standard positions; override if subclass defines nonstandard label positions overrides CalcOpaqueBox; // empty if no border overrides ContentSize; overrides ImageOrigin; // bases image origin on label position overrides PartColor; overrides SetBorder, SetPartColor; #ifdef SCALED_SCREEN overrides UseScaledText; #endif overrides CanAcceptCoupon; overrides CanContain; end class;