previous chapter contents page top page next chapter


ScrollBox

February 29, 1996

inherits from Box;
inherits from Scroller;

Class Description

Class ScrollBox defines objects that can be used as containers for scrollable objects. You can use scroll boxes for objects with contents that don't fit completely on the screen. For more information about scroll boxes, see Magic Cap Concepts.

Programming information

Instantiate: rarely
Subclass: rarely
Call its methods: never

You might create an object of class ScrollBox if you want to have a container that can scroll its contents, such as the E-Mail drawer in the Stamps window.

Methods defined by class ScrollBox

Class ScrollBox defines the following methods:

Method Description
ArrowState Overridden to use current offset and lowest viewable.
ChangedContents Overridden to recompute position of lowest viewable.
MaximumScrollOffset Overridden to use position of lowest viewable.
MovedContents Overridden to ensure subview is in a grid position.
PageDown Overridden to move down by height of content.
PageUp Overridden to move up by height of content.
ScrollTrack Overridden to preserve scroll arrows.
Validate

Fields defined by class ScrollBox

Class ScrollBox 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 ScrollBox
maximumSubviewBottom Micron Used by Magic Cap
gridSize Dot Horizontal and vertical grid spacing
gridOffset Dot Offset of first grid position
topArrow Viewable Scroll-up arrow
bottomArrow Viewable Scroll-down arrow

Method Descriptions

ArrowState

overrides ArrowState

Call: rarely
Override: sometimes

Class ScrollBox overrides ArrowState to return the current scroll offset using the current offset and the position of the lowest subview.

ChangedContents

overrides ChangedContents

Call: rarely
Override: sometimes

Class ScrollBox overrides ChangedContents to recompute the position of the lowest subview.

MovedContents

overrides MovedContents

Call: rarely
Override: sometimes

Class ScrollBox overrides MovedContents to put the subview back in a grid position after it has been moved.

MaximumScrollOffset

overrides MaximumScrollOffset

Call: rarely
Override: sometimes

Class ScrollBox overrides MaximumScrollOffset to use the position of the lowest subview when computing its result.

PageDown

overrides PageDown

Call: rarely
Override: sometimes

Class ScrollBox overrides PageDown to scroll the subviews down by the height of the content with no overlap.

PageUp

overrides PageUp

Call: rarely
Override: sometimes

Class ScrollBox overrides PageUp to scroll the subviews up by the height of the content with no overlap.

ScrollTrack

overrides ScrollTrack

Call: rarely
Override: sometimes

Class ScrollBox overrides ScrollTrack to preserve the scroll arrows while calling its inherited implementation.