Mover(3X) manual page
Table of Contents
Mover, LeftMover, RightMover, UpMover, DownMover - interactors for
incremental scrolling
#include <ivplus/adjuster.h>
Mover
provides an incremental movement of a perspective in one of four directions:
left, right, up or down. When displayed, the mover looks like an arrowhead
(left arrow, right arrow, up arrow and down arrow). The user clicks on the
mover with the mouse to move the perspective. Movers are used in scrollbars.
The relationship between the scrollbar mover components and the perspective
of the subject interactor is not a subject-view. Each mover maintains a pointer
to the associated interactor’s perspective solely to enable the mover to
request the interactor to update its perspective. The movers do not need
to know when the associated interactor’s perspective actually changes.
Mover
is an abstract base class.
Mover -> Adjuster -> Interactor
Create an instance of a Mover object.
The
passed Interactor* is a pointer to the associated interactor whose perspective
will be moved.
The delay value is the delay, in tenths of a second, after
which the auto-repeat feature of the mover will begin, once the mover is
pressed. The left, right, up and down movers default to using a value of
NO_AUTOREPEAT.
The size value specifies the height and width in pixels
of the mover’s shape. The left, right, up and down movers default to using
a value of MoverSize.
The bg value is a pointer to the Painter to use
for drawing on the perspective’s canvas. The default value of bg is nil,
in which case a Painter* will be created by the mover for its use.
Since
Mover is an abstract base class, these constructors are protected.
Dimension, in pixels, of the mover’s
shape. By default, a mover’s shape is MoverSize*MoverSize pixels.
Specifies
the kind of mover when instantiating Mover rather than one of its subclasses.
The appearance and behavior of a mover created with type MoveUndef is undefined.
The NO_AUTOREPEAT
value is the default
value for the auto repeat feature. The auto repeat feature is activated
when the mover is pressed and held. After waiting a specified delay time,
the mover continues to move the perspective until it is released. The delay
value represents the length of time, in tenths of a second, to wait before
activating auto repeat. The default value of NO_AUTOREPEAT
disables the
auto repeat feature.
Evaluates
the event type and take appropriate action. If the event type is a DownEvent,
then Highlight(true) is called to invert the mover 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 mover based on the value of on(true:highlight, false:un-highlight).
Highlight(true) is called when the mouse button is pressed on the mover,
and Highlight(false) is called when the mouse button is released. By default,
the mover appears pressed when it is highlighted.
Sets
the natural size, shrinkability and stretchability values for the shape
of the mover to the values of the passed Shape s.
Stores
the kind of mover this instance is.
Stores the painter to use
when the mover draws itself.
Changes
the interactor’s perspective. This is called after the mover is pressed and
released, or called repeatedly during auto-repeat. If the Shift Key is pressed,
the perspective is adjusted in large increments, otherwise it is adjusted
in small increments.
Performs the auto-repeat
feature, moving the view on the perspective while the mouse button is held
down on the mover.
Flashes the highlight of the mover
by calling Highlight(false) followed by Highlight(true).
Handles
the calling of the AutoRepeat() function and monitors enter and leave
events in the mover so auto-repeat can be turned off if the mouse leaves
the mover and turned back on when the mouse enters the mover. Called after
a DownEvent in the mover.
Set the
width and height of the mover’s shape and check the status of the mover’s
Painter bg. If bg is nil, bg is set to the default Painter, output.
Called when
some portion of the mover needs to be redrawn, presumably because it was
previously obscured or it has been pressed. If the mover is highlighted
(pressed), the mover is drawn with the pressed in appearance. If the mover
is not highlighted, it is drawn with its normal appearance. The mover evaluates
which type of mover it is (left, right, up or down) and draws the appropriate
shape (left arrow, right arrow, up arrow and down arrow).
Tells
the mover that a delay value greater than zero has been passed to the
constructor which should be used in timing the auto-repeat function.
Tells the mover that no delay should be used in the
auto-repeat function.
None.
No example for this abstract
base class. See Adjuster(3X)
for examples.
adjuster.h
adjuster.C
Adjuster(3X)
, Interactor(3X)
, Perspective(3X)
, Shape(3X)
.
Table of Contents
- Name
- Synopsis
- Description
- Class Hierarchy
- Constructors
- DownMover(Interactor*, int delay = NO_AUTOREPEAT, int size = MoverSize, Painter* bg = nil)
- DownMover(const char* instanceName, Interactor*, int delay = NO_AUTOREPEAT, int size = MoverSize, Painter* bg = nil)
- LeftMover(Interactor*, int delay = NO_AUTOREPEAT, int size = MoverSize, Painter* bg = nil)
- LeftMover(const char* instanceName, Interactor*, int delay = NO_AUTOREPEAT, int size = MoverSize, Painter* bg = nil)
- RightMover(Interactor*, int delay = NO_AUTOREPEAT, int size = MoverSize, Painter* bg = nil)
- RightMover(const char* instanceName, Interactor*, int delay = NO_AUTOREPEAT, int size = MoverSize, Painter* bg = nil)
- UpMover(Interactor*, int delay = NO_AUTOREPEAT, int size = MoverSize, Painter* bg = nil)
- UpMover(const char* instanceName, Interactor*, int delay = NO_AUTOREPEAT, int size = MoverSize, Painter* bg = nil)
- Public Data
- Public Operations
- Protected Data
- Protected Operations
- void AdjustView(Event&)
- void Adjuster::AutoRepeat()
- void Adjuster::Flash()
- void Adjuster::HandlePress()
- Mover(Interactor*, int delay, int moveType, int size, Painter* bg)
- Mover (const char* instanceName, Interactor*, int delay, int moveType, int size, Painter* bg)
- virtual void Reconfig()
- virtual void Redraw(IntCoord l, IntCoord b, IntCoord r, IntCoord t)
- void Adjuster::TimerOn()
- void Adjuster::TimerOff()
- X Resources
- Examples
- Files
- See Also