inherits from Bar
![]()
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.
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.
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. |
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 |
overrides CanAccept Call: rarely Override: sometimes
Class ControlBar overrides CanAccept to accept objects if the control bar has any empty slots.
overrides ContentsCanHilite Call: rarely Override: sometimes
Class NameBar overrides ContentsCanHilite to always return false.
overrides SetContentsHilited Call: rarely Override: sometimes
Class NameBar overrides SetContentsHilited to handle highlighting the correct object.
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.
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.
overrides Draw Call: rarely Override: sometimes
Class ControlBar overrides Draw to draw itself on the screen.
overrides Touch Call: rarely Override: sometimes
Class ControlBar overrides Touch to handle user touches on all parts of the control bar.
overrides MovedContents Call: rarely Override: sometimes
Class NameBar overrides MovedContents to center the moved object in its slot in the control bar.
overrides SetDisabled Call: rarely Override: sometimes
Class NameBar overrides SetDisabled to hide or show all items in the control bar.
overrides ContentsInTransit Call: rarely Override: sometimes
Class ControlBar overrides ContentsInTransit to always return true to indicate that its contents should not be moved.