previous chapter contents page top page next chapter


AttributeStamp

March 15, 1996

inherits from Stamp;

Class Description

Magic Cap defines a special class of stamps, called attribute stamps, that affect the objects on which they appear. Attribute stamps work by applying a given attribute to their card, scene, or superview.

Programming information

Instantiate: sometimes
Subclass: rarely
Call its methods: never

Magic Cap provides several kinds of attribute stamps, including the confidential, urgent, and save stamps. You can create your own attribute stamps. You might create a subclass of AttributeStamp if you wanted to specialize its behavior. For example, Magic Cap defines delivery report stamps as a subclass of AttributeStamp.

Methods defined by class AttributeStamp

Class AttributeStamp defines the following methods:

Method Description
CanPlaceOnLockedCard Overridden to allow save stamp on locked cards.
ChangedContainers Overridden to set target attribute of old and new container.
DroppedFromWindow Overridden to display window if attribute stamps conflict.
Pressed Overridden to display window if attribute stamps conflict.
RemoveConflicts Makes conflicting attribute stamps hop to trash.
TargetAttribute Returns this stamp's target attribute.
SetTargetAttribute Sets this stamp's target attribute.

Fields defined by class AttributeStamp

Class AttributeStamp 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 Flags Property settings
labelStyle TextStyle Text style of object's label
color Color Color of object's content
shadow Shadow Shadow drawn with object
sound Sound Sound associated with object
Inherited from Stamp
image Image
Defined by AttributeStamp
targetAttribute OperationNumber Attribute associated with this stamp
applyMode Unsigned Object that will be affected: 0 = none, 1 = superview, 2 = card, 3 = scene
comingValue Unsigned Value to set when stamp is placed
goingValue Unsigned Value to set when stamp is removed

Method Descriptions

CanPlaceOnLockedCard

overrides CanPlaceOnLockedCard
Call: rarely
Override: sometimes

Class AttributeStamp overrides CanPlaceOnLockedCard to return true if the target attribute is operation_DontPurge and false otherwise. This allows the save stamp to be placed on locked cards, such as telecards that have been sent.

ChangedContainers

overrides ChangedContainers
Call: rarely
Override: sometimes

Class AttributeStamp overrides ChangedContainers to set the target attribute of the new container to field comingValue and the target attribute of the old container to field goingValue.

DroppedFromWindow

overrides DroppedFromWindow
Call: rarely
Override: sometimes

Class AttributeStamp overrides DroppedFromWindow to check whether this stamp conflicts with another attribute stamp. If so, Magic Cap puts up a window asking the user which one to keep.

Pressed

overrides Pressed
Call: rarely
Override: sometimes

Class AttributeStamp overrides Pressed to check whether this stamp conflicts with another attribute stamp. If so, Magic Cap puts up a window asking the user which one to keep.

RemoveConflicts

operation RemoveConflicts()
Call: rarely
Override: rarely

If two attribute stamps conflict and the user chooses one to keep, Magic Cap calls RemoveConflicts to discard the other stamp by hopping it to the trash.

TargetAttribute

attribute TargetAttribute: OperationNumber
// operation TargetAttribute():OperationNumber
// operation SetTargetAttribute(newValue)
Call: rarely
Override: rarely

The attribute TargetAttribute refers to the attribute that will be set by this attribute stamp.