previous chapter contents page top page next chapter


ModalScene

February 29, 1996

inherits from StackScene;

Class Description

Magic Cap defines class ModalScene for scenes that contain several screens of information, like stacks of cards, but have little in common among the screens. Magic Cap's phone is an example of a modal scene.

Programming information

Instantiate: rarely
Subclass: rarely
Call its methods: rarely

You might create an object of class ModalScene if you want your scene to have several screens of information that have little in common. You might create a subclass of ModalScene if you wanted to specialize its behavior for your scene.

Methods defined by class ModalScene

Class ModalScene defines the following methods:

Method Description
CaptionInfo Overridden to use current card name as caption.
GoToVia Overridden to decide which card to go to.
ViewMode Indicates which card is current.
SetViewMode Sets which card is current.
MakeContentProxyChoices Overridden to disallow printing or faxing all cards at once.
TypeKeys Overridden to prevent arrow keys from changing cards.
Info Overridden to provide info for current card.
InstallAdditions Overridden to install current card's scene additions.
InstallCurrentCard Overridden to call InstallAdditions.
InstallInto Overridden to install into one card or entire scene.
RemoveCurrentCard Overridden to remove scene additions.

Fields defined by class ModalScene

Class ModalScene 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 Various 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 HasBorder:
border Border Border drawn around object
Inherited from Scene:
sceneFlags Unsigned Various scene settings
stepBackScene Scene Scene to step back to (at right of name bar)
stepBackSpot Viewable Place to zoom to on step back
image Image Image for scene's snapshots
additions SceneAdditions First in list of scene-specific commands
screen Buffer Cached bits to draw scene
Inherited from StackScene:
stack Stack Stack associated with scene
cardNum Unsigned Index of current card
Defined by ModalScene
modalAdditions ObjectList SceneAdditions for each mode
modalInfoList ObjectList Help info for each mode

Method Descriptions

CaptionInfo

overrides CaptionInfo

Call: rarely
Override: sometimes

Class ModalScene overrides CaptionInfo to use the name of the current card as the caption.

GoToVia

overrides GoToVia

Call: rarely
Override: sometimes

Class ModalScene overrides GoToVia to decide which card to show by examining where the user came from.

ViewMode

attribute ViewMode: Unsigned
// operation ViewMode():Unsigned
// operation SetViewMode(newValue)

Call: rarely
Override: rarely

The attribute ViewMode corresponds to the card number of the current card.

MakeContentProxyChoices

overrides MakeContentProxyChoices

Call: rarely
Override: sometimes

Class ModalScene overrides MakeContentProxyChoices to disallow printing or faxing all the cards in the scene as a single stack.

TypeKeys

overrides TypeKeys

Call: rarely
Override: sometimes

Class ModalScene overrides TypeKeys to prevent arrow keys from moving to another card and changing the mode.

Info

overrides Info

Call: rarely
Override: sometimes

Class ModalScene overrides Info to return help information about the mode represented by the current card.

GoToVia

overrides GoToVia

Call: rarely
Override: sometimes

Class ModalScene overrides GoToVia to decide which card to show by examining where the user came from.

InstallAdditions

overrides InstallAdditions

Call: rarely
Override: sometimes

Class ModalScene overrides InstallAdditions to install the scene additions that belong to the current mode.

InstallCurrentCard

overrides InstallCurrentCard

Call: rarely
Override: sometimes

Class ModalScene overrides InstallCurrentCard to call InstallAdditions, adding the commands that are appropriate for the current mode.

InstallInto

overrides InstallInfo

Call: rarely
Override: sometimes

Class ModalScene overrides InstallInto to install items. If an item's parameter is a card in the scene, the item is installed only for that card. If an item's parameter is an integer, the item is installed only for the card represented by that card number. Otherwise, the item is installed for all cards.

RemoveCurrentCard

overrides RemoveCurrentCard

Call: rarely
Override: sometimes