previous chapter contents page top page next chapter


ListWindow

March 15, 1996

inherits from GadgetWindow;

Class Description

Magic Cap defines class ListWindow for windows that contain a list of items obtained from a target object. Magic Cap uses list windows for various purposes, such as the directories in the hallway and downtown and the card catalog in the library.

Programming information

Instantiate: sometimes
Subclass: rarely
Call its methods: rarely

You might create an object of class ListWindow if you wanted a window that displays a list of items obtained from a target object.

Methods defined by class ListWindow

Class ListWindow defines the following methods:

Method Description
Choices Returns list displayed by the list view that is responder's suview.
SetChoices Stores the list of items into associated list view.
AdjustSize Overridden to shrink content to fit subviews.
Appear Overriddden to act if adjustPosition flag is set.
Disappear Overridden to act if transientChoices flag is set.
SetTarget Overridden to act if window has TargetedListView.
GetListView Returns the list view that is a subview of the list window.

Fields defined by class ListWindow

Class ListWindow 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
Defined by ListWindow
listWindowFlags Unsigned Various settings for window behavior

Method Descriptions

Choices

attribute Choices: Object
// operation Choices():Object
// operation SetChoices(newValue)
Call: rarely
Override: rarely

The attribute Choices refers to the items displayed in the list view that is a subview of the list window.

AdjustSize

overrides AdjustSize
Call: rarely
Override: sometimes

Class ListWindow overrides AdjustSize to shrink the content of the list window to fit its subviews.

Appear

overrides Appear
Call: rarely
Override: sometimes

Class ListWindow overrides Appear to call the inherited implementation if the window's adjustPositionMask is set and TitledWindow_Appear otherwise.

Disappear

overrides Disappear
Call: rarely
Override: sometimes

Class ListWindow overrides Disappear to destroy the choices object if the transientChoices flag is set.

SetTarget

overrides SetTarget
Call: rarely
Override: sometimes

Class ListWindow overrides SetTarget to check to see if the list window's subview is a targeted list view. If so, SetTarget sets the list view's target as well as the list window's.

GetListView

systemVector GetListView(self: ListWindow): Object
Call: rarely
Override: never

Call GetListView to return the list view that is the first subview of this window. The list view contains the choices displayed in the window.