Adjuster(3X) manual page
Table of Contents
Adjuster - base class for interactors that provide scrolling and
zooming; controls for other interactors which maintain a perspective
#include
<ivplus/adjuster.h>
Adjuster objects manipulate a perspective using
a pushbutton-like interface. Adjusters provide auto-repeat. Pressing and holding
down any mouse button on an adjuster for a specified time causes it to
repeatedly perform its operation. The auto-repeat stops when the button
is released.
Zoomer and Mover are derived from Adjuster. Zoomers adjust
the perspective’s curwidth and curheight member variables to suggest reduction
or magnification. The Enlarger zoomer derived class halves the perspective
values while the Reducer zoomer derived class doubles them. There are four
kinds of movers Left, Right, Down, and Up which adjust the perspective.
Adjusters work by requesting their subject interactor to change its perspective.
This is done by calling the interactor’s Adjust() member function. Adjuster
is an abstract base class.
Adjuster -> Interactor
Adjuster constructors take a pointer to the interactor
whose perspective will be adjusted and a delay, (in tenths of a second)
after which auto-repeat will begin once the adjuster is pressed. The value
NO_AUTOREPEAT
disables the auto-repeat feature. A positive value enables
the auto-repeat feature, setting the delay to the passed value.
Since Adjuster
is an abstract base class, these constructors are protected.
Evaluates
the event type and takes appropriate action. If the event type is a DownEvent,
then Highlight(true) is called to invert the adjuster and TimerOn() is
called to activate the auto-repeat feature. If the event type is an UpEvent,
then Highlight(false) is called and TimerOff() is called to turn off
the auto-repeat timer.
Highlights or un-highlights
the Adjuster based on the value of on (true:highlight, false:un-highlight).
Highlight(true) is called when the mouse button is pressed on the adjuster,
and Highlight(false) is called when the mouse button is released. By default,
the adjuster appears pressed when it is highlighted.
Sets the natural size, shrinkability and stretchability values for the
Shape of the adjuster to the values of the passed shape s.
Always returns false since Adjuster is an abstract base class
and cannot be traversed.
Autorepeat delay in tenths
of a second.
Used to determine how the adjuster is to
be drawn.
A pointer to a copy of the associated interactor’s
current perspective. This is used to reflect the adjuster’s view of the associated
interactor’s perspective. shown is used to compute new perspective values
which are then passed to the associated interactor by calling its Adjust()
member function.
Stores the width and height of the adjuster’s shape.
Stores the setting specified by the TimerOn() and TimerOff()
operations. If timer is true, the delay is used when autorepeating.
Pointer to the associated interactor.
Defines how the adjuster changes the interactor’s perspective.
It is called after the adjuster is pressed and released, or called repeatedly
during auto-repeat. Derived classes should redefine this function to implement
the desired behavior.
Performs the auto-repeat feature,
adjusting the view on the perspective while the mouse button is held down
on the adjuster.
Flashes the highlight of the adjuster by calling
Highlight(false) followed by Highlight(true).
Handles
calling the AutoRepeat() function. Monitors enter and leave events in the
adjuster so auto-repeat can be turned off if the mouse leaves the adjuster
and turned back on when the mouse enters the adjuster. Called after a DownEvent
in the adjuster.
Tells the adjuster that no delay should
be used in the auto-repeat function.
Tells the adjuster that
a delay value greater than 0 has been passed to the constructor which should
be used in timing the auto-repeat function.
None.
No example
for this abstract base class. See Mover(3X)
and Zoomer(3X)
for examples.
adjuster.h
adjuster.C
Interactor(3X)
, Mover(3X)
, Perspective(3X)
, Zoomer(3X)
.
Table of Contents