previous chapter contents page top page next chapter


ControlBar

February 29, 1996

inherits from Bar

Class Description

Class ControlBar is a highly specialized subclass of Bar. There is exactly one instance of this class in Magic Cap, the bar displayed at the bottom of the screen.

Programming information

Instantiate: never
Subclass: rarely
Call its methods: never

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

Methods defined by class ControlBar

Class ControlBar defines the following methods:

Method Description
CanAccept Overridden to place objects in unused slots.
ContentsCanHilite Overridden to return false.
SetContentsHilited Overridden to handle highlighting objects.
ConstrainHit Overridden to ensure touches on contained objects.
ConstrainToolTarget Overridden to prevent immobile objects from covering tool gadget.
Draw Overridden to draw control bar on the screen.
Touch Overridden to handle user touches appropriately.
MovedContents Overridden to center moved objects in their slots.
SetDisabled Overridden to disable and enable control bar items.
ContentsInTransit Overridden to prevent contents from being removed.

Fields defined by class ControlBar

Class ControlBar 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
Defined by ControlBar
separator Micron
hiliteIndex Unsigned

Method Descriptions

CanAccept

overrides CanAccept

Call: rarely
Override: sometimes

Class ControlBar overrides CanAccept to accept objects if the control bar has any empty slots.

ContentsCanHilite

overrides ContentsCanHilite

Call: rarely
Override: sometimes

Class NameBar overrides ContentsCanHilite to always return false.

SetContentsHilited

overrides SetContentsHilited

Call: rarely
Override: sometimes

Class NameBar overrides SetContentsHilited to handle highlighting the correct object.

ConstrainHit

overrides ConstrainHit

Call: rarely
Override: sometimes

Class NameBar overrides ConstrainHit to make sure that the user is touching an object that is in the control bar.

ConstrainToolTarget

overrides ConstrainToolTarget

Call: rarely
Override: sometimes

Class NameBar overrides ConstrainToolTarget to make sure that the user can move any objects that are placed over the tool gadget.

Draw

overrides Draw

Call: rarely
Override: sometimes

Class ControlBar overrides Draw to draw itself on the screen.

Touch

overrides Touch

Call: rarely
Override: sometimes

Class ControlBar overrides Touch to handle user touches on all parts of the control bar.

MovedContents

overrides MovedContents

Call: rarely
Override: sometimes

Class NameBar overrides MovedContents to center the moved object in its slot in the control bar.

SetDisabled

overrides SetDisabled

Call: rarely
Override: sometimes

Class NameBar overrides SetDisabled to hide or show all items in the control bar.

ContentsInTransit

overrides ContentsInTransit

Call: rarely
Override: sometimes

Class ControlBar overrides ContentsInTransit to always return true to indicate that its contents should not be moved.