Object <- Viewable <- Stamp <- AttributeStamp |
|
|
CanApplyAttributeStamp CanPlaceOnLockedCard DroppedFromWindow FindMatchingAttributeStamp Pressed RemoveConflicts TargetFromContainer |
|
TargetAttribute TargetClass |
| Field | Type | |
|---|---|---|
| Viewable: | superview: | Viewable |
| relativeOrigin: | Dot | |
| contentSize: | Dot | |
| viewFlags: | Flags | |
| labelStyle: | TextStyle | |
| color: | Unsigned | |
| altColor: | Unsigned | |
| shadow: | Shadow | |
| sound: | Playable | |
| Stamp: | image: | Image |
| AttributeStamp: | targetAttribute: | OperationNumber |
| targetClass: | ClassNumber | |
| applyMode: | Unsigned |
Define Class AttributeStamp; abstract; inherits from Stamp; field targetAttribute: OperationNumber, getter, setter; // which attribute number to affect field targetClass: ClassNumber, getter, setter; // class number to which this stamp can be applied field applyMode: Unsigned; // what object to affect (0,1,2,3 = none, superview, card, scene) operation CanApplyAttributeStamp(object: Viewable): Boolean; // returns true if object implements <targetClass> operation FindMatchingAttributeStamp(whereToLook: Card; useValue: Boolean): Object, noMethod; // search all subviews of whereToLook for an attribute stamp that matches self // compare targetAttribute and applyMode, compare comingValue if useValue is true overrides CanPlaceOnLockedCard; // returns true if target attribute is operation_DontPurge; otherwise returns false overrides DroppedFromWindow; // if self conflicts with another attribute stamp, displays window to make user choose which one to keep overrides Pressed; // if self conflicts with another attribute stamp, displays window to make user choose which one to keep operation RemoveConflicts(), noMethod; // call to hop to trash attribute stamps that conflict with this one attribute TargetAttribute: OperationNumber; attribute TargetClass: ClassNumber; operation TargetFromContainer(container: Object): Object; end class;