previous chapter contents page top page next chapter


MagicWindow

February 29, 1996

inherits from GadgetWindow;
inherits from InfoTopic;

Class Description

Class MagicWindow is a subclass of Window that defines the window that appears when the user touches the stamper or Magic Hat. There is only one object of this class in Magic Cap.

Programming information

Instantiate: never
Subclass: never
Call its methods: never

You probably won't ever create an object or a subclass of class MagicWindow. The information in this chapter is provided for debugging and curiosity only.

Methods defined by class MagicWindow

Class MagicWindow defines the following methods:

Method Description
CategoryBox Refers to the category box that owns the current viewables.
SetCategoryBox Set the category box that owns the current viewables.
CloseCategory Called by Magic Cap when setting top level.
Appear Overridden to show default or last if option key is down.
Disappear Overridden to restore tool.
CanAccept Overridden to reject objects if writing or touch tool.
CanAcceptCoupon Overridden to accept coupons if option key is down.
ConstrainToolTarget Overridden to set self as tool.
DisplayInfo Overridden to get info from current category.
Draw Overridden to draw title bar including step-back image.
InstallEntrance Overridden to install category box.
Tap Overridden to handle user taps.
TouchTarget Overridden to drop a copy of viewable that user touched.
SetAuthoringMode Overridden to set highest level when user switches authoring mode.

Fields defined by class MagicWindow

Class MagicWindow 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 HasBorder
border Border Framed border drawn around object
Inherited from Window
windowFlags Flags Stores various boolean attributes of the window
Inherited from TitledWindow
titleColor Unsigned RGB color for title box
titleHeight Micron Height of title box
dependents ObjectList List of dependent windows
Inherited from BalloonSpout
balloonDot Dot Cached dot position, used by Magic Cap
inherited from GadgetWindow
target Object Target for this window
inherited from InfoTopic
info Object Text or viewables to display for this topic
Defined by MagicWindow
categoryBox CategoryBox Category box associated with current viewables
userLevelList ObjectList Viewables for top level of normal and authoring modes
authoringMode Boolean Indicates whether window is showing authoring mode

Method Descriptions

CategoryBox

attribute CategoryBox: CategoryBox

// operation CategoryBox():CategoryBox
// operation SetCategoryBox(newValue)

Call: rarely
Override: rarely

The attribute CategoryBox refers to the category box object that contains the viewables currently displayed in the Magic Window.

CloseCategory

operation CloseCategory()

Call: rarely
Override: rarely

Magic Cap calls CloseCategory when the user displays the top level of window contents.

Appear

overrides Appear

Call: rarely
Override: sometimes

Class MagicWindow overrides Appear to have the window show its default contents unless the user is holding down the option key, in which case the previous setting is shown again.

Disappear

overrides Disappear

Call: rarely
Override: sometimes

Class MagicWindow overrides Disappear to restore the current tool to its setting when the window appeared.

CanAccept

overrides CanAccept

Call: rarely
Override: sometimes

Class MagicWindow overrides CanAccept to reject items if the current tool is a writing or touch tool.

CanAcceptCoupon

overrides CanAcceptCoupon

Call: rarely
Override: sometimes

Class MagicWindow overrides CanAcceptCoupon to accept coupons only if the option key is down.

ConstrainToolTarget

overrides ConstrainToolTarget

Call: rarely
Override: sometimes

Class MagicWindow overrides ConstrainToolTarget to set the window itself as the tool and its first subview as the target.

DisplayInfo

overrides DisplayInfo

Call: rarely
Override: sometimes

Class MagicWindow overrides DisplayInfo to get help information from the current category for display.

Draw

overrides Draw

Call: rarely
Override: sometimes

Class MagicWindow overrides Draw to draw the items in the window's title bar, including the step-back hand if necessary.

InstallEntrance

overrides InstallEntrance

Call: rarely
Override: sometimes

Class MagicWindow overrides InstallEntrance to install a new category box.

Tap

overrides Tap

Call: rarely
Override: sometimes

Class MagicWindow overrides Tap to handle user taps in the title bar.

TouchTarget

overrides TouchTarget

Call: rarely
Override: sometimes

Class MagicWindow overrides TouchTarget to drop a copy of the target out of the window when the user touches it.

SetAuthoringMode

overrides SetAuthoringMode

Call: rarely
Override: sometimes

Class MagicWindow overrides SetAuthoringMode to switch to the top level of contents when the user switches into or out of authoring mode.