table of contents
Panner(3I) | InterViews Reference Manual | Panner(3I) |
NAME¶
Panner - two-dimensional scrolling and zooming
SYNOPSIS¶
#include <InterViews/panner.h>
DESCRIPTION¶
A panner is an interactor that manipulates the perspective of another interactor to provide two-dimensional scrolling and zooming. A panner is composed of a slider and several adjusters, including two zoomers and four movers. The slider's position and size reflect the current origin, size, and aspect ratio in the interactor's perspective. Dragging the slider around with the mouse changes the perspective's curx and cury members.
PUBLIC OPERATIONS¶
- Panner(Interactor*, int size = 0)
- Create a panner for the given interactor, optionally with the given width. If the size is 0, a reasonable default size is used. The panner's aspect ratio reflects that of the perspective.
- Slider(Interactor*)
- Slider::Handle(Event&)
- Slider::Reshape(Shape&)
- Slider::Update()
- A slider reflects and lets the user specify the visible portion of the view. A rectangle represents the visible area, while the area surrounding it represents the total area. Clicking and holding down any mouse button on the rectangle allows you to drag it to a different position within the total area. The perspective's current origin is shifted to reflect the new position when the button is released. Holding down the shift key while dragging the rectangle constrains its motion horizontally or vertically. Clicking outside the rectangle moves it in the corresponding one of eight directions; for example, clicking to the right of the rectangle moves it to the right. If the left mouse button is used, the movement increment equals the perspective's sx or sy member variables. The middle mouse button increments by lx or ly, and the right mouse button centers the rectangle around the cursor. The Reshape call sets the width of the slider to that of the passed Shape and calls Change on the parent interactor. Update redisplays the slider to reflect a change in the interactor's perspective.
X DEFAULTS¶
The ``syncScroll'' resource specifies whether the slider should work in real-time or not. When synchronized scrolling is employed the interactor scrolls synchronously as the slider is dragged; otherwise the slider's outline follows the mouse during dragging, and the interactor is scrolled only after the user stops dragging the slider. Sliders will scroll synchronously if their syncScroll resource is set to ``on'' or ``true.''
SEE ALSO¶
Adjuster(3I), Interactor(3I), Perspective(3I)
15 January 1988 | InterViews |