Zoomer(3X) manual page
Table of Contents
Zoomer, Enlarger, Reducer - classes for interactors that zoom
These
interactors do not comply with the OSF/Motif Certification Checklist. They
are provided for compatibility with existing InterViews programs, however
they may not behave as expected when used with InterViews Plus.
#include
<ivplus/adjuster.h>
Zoomers adjust their interactor’s perspective’s
curwidth and curheight member variables to suggest reduction or magnification.
The Enlarger class halves the perspective values while the Reducer class
doubles them. These classes are typically used in conjunction with graphics
applications.
Zoomer is an abstract base class.
Enlarger->Zoomer->Adjuster->Interactor
Reducer->Zoomer->Adjuster->Interactor
Since Zoomer is an abstract base class, these
constructors are protected.
Create an Enlarger object with
the given size which zooms the given interactor’s perspective.
Create
a Reducer object with the given size which zooms the given interactor’s
perspective.
Draws the interactor.
Sets the interactor’s shape according to the size
parameter in the constructor and sets its shape to be rigid.
Calculates the new values for curwidth,
curheight, curx and cury. Then suggests to its interactor’s perspective to
adopt the new perspective with a call to the Interactor function Adjust().
None.
// Zoomer Example
#include <ivplus/adjuster.h>
#include <ivplus/box.h>
#include <ivplus/frame.h>
#include <ivplus/glue.h>
#include <ivplus/message.h>
#include <ivplus/viewport.h>
#include <ivplus/world.h>
int main(int argc, char *argv[])
{
// Create the world to get the connection with the display.
World* world = new World("MyApp", argc, argv);
// Create a message.
Message* msg = new Message("Hello World\n...Bye World!");
// Create a Viewport with a Message.
// viewport should have something displayed so that the view can be
adjusted
Viewport* viewport = new Viewport(msg);
// Create an enlarger to zoom in the view.
Enlarger* enlarger = new Enlarger(viewport);
// Create a reducer to zoom out the view.
Reducer* reducer = new Reducer(viewport);
// Arrange the zoomer in a box with proper glue and orientation.
VBox* zoombox = new VBox(enlarger, reducer);
HBox* mainbox = new HBox(viewport, new HGlue, zoombox);
// Map the window.
world->InsertApplication(new Frame(mainbox, 1, BevelOut));
//Enter the event loop
world->Run();
return 0;
}
adjuster.h
adjuster.C
Adjuster(3X)
, Enlarger(3X)
, Interactor(3X)
, Mover(3X)
, Perspective(3X)
,
Reducer(3X)
.
Table of Contents