[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    Scroller(3X) manual page Table of Contents

Name

Scroller - bar of a scrollbar

Synopsis

#include <ivplus/scroller.h>

Description

Scroller is an interactor that manipulates the perspective of another interactor. This interactor is referred to as the associated interactor. The scroller is composed of a bar whose position and size proportionately reflect the current location and the size of the displayed date in the interactor’s perspective, and a trough in which the bar appears to slide. Clicking and dragging in the scroller modifies the associated interactor’s perspective.

Scroller is an abstract base class. There are two classes derived from Scroller: VScroller and HScroller.

The behavior of the scroller in response to mouse clicks or drags in the areas of the scroller is described in the following table:

Mouse ButtonScroller Area Behavior
Left Press
Left Drag
Ctrl Left Press
Middle Drag


When the bar tracks the position of the mouse pointer in a vertical scroller,
the y-component of the mouse pointer position is tracked. In a horizontal
scroller, the x-component of the mouse pointer position is tracked.

The relationship between the scroller component and the perspective it
manipulates, is one of subject-view. The perspective of the associated
interactor is the subject. The scroller is the view of that subject. The
scroller is responsible for the trough and the sliding bar. When the user
clicks, drags or uses keyboard translation on a part of the scroller, the
scroller computes a new perspective and requests the associated interactor
to adjust its perspective to the new perspective. When the associated
interactor’s perspective is actually changed, the scroller is notified,
and
it then redraws the trough and the bar, if necessary. The associated
interactor’s perspective may also change in response to user interaction
with the interactor directly, or in response to programmatic requests.
In any case, the scroller will be notified and it will update itself to
be in
sync with the associated interactor’s current perspective.


Class HierarchyScroller->Interactor 
ConstructorsScroller (Interactor*, int
size);Scroller(const char* instanceName, Interactor*, int size)Create a
scroller with a size of  int size and associate it with the given interactor.
Since  Scroller is an abstract base class, these constructors are protected.

Public OperationsNone. 
Protected DataInteractor* interactorPointer to the
associated interactor. 
int sizeStores the width of a vertical scrollbar
or the height of a horizontal scrollbar. 
Perspective* viewA pointer to the
associated interactor’s current perspective. 
Perspective* shownA pointer
to a copy of the associated interactor’s old perspective. This is used to
reflect what perspective the scroller is currently showing via the size
and location of the bar in the trough. When the contents of view and shown
are different, the scroller is redrawn and shown is updated from view. 
double
scaleThe ratio of the width of the trough to the width of the manipulated
perspective. 
Protected Operationsvoid Background(IntCoord l, IntCoord b,
IntCoord r, IntCoord t)This operation draws the trough of the scroller
with the passed left, bottom, right and top coordinates.  
virtual void Resize()Sets
the scroller’s perspective to be the same as the associated interactor’s
perspective.  
virtual boolean Traversable()Always returns false. 
Default
Keyboard TranslationsSee VScroller(3X) and HScroller(3X). X ResourcesNone.

ExamplesNo example for this abstract base class. See VScroller(3x) and HScroller(3x)
for examples. 
Files
scroller.h 

See Also

HScrollBar(3X) , HScroller(3X) , Interactor(3X) , Perspective(3X) , ScrollBar(3X) , VScrollBar(3X) , VScroller(3X) .


Table of Contents