pfMotifViewer(3pf) OpenGL Performer 3.2.2 libpfx C++ Reference Pages
NAMEpfMotifViewer - pfViewer based on OSF/Motif GUI Toolkit
FUNCTION SPECIFICATION
#include <Performer/pfx/pfMotifViewer.h>
pfMotifViewer::pfMotifViewer(Widget parent = NULL,
pfPipe* p = NULL, int numChannels = 1,
int stereoMode = PFVIEWER_MONO, int *attr = NULL);
pfMotifViewer::pfMotifViewer(char ,
Widget parent = NULL, pfPipe* p = NULL,
int numChannels = 1, int stereoMode = PFVIEWER_MONO,
int *attr = NULL);
static pfType* pfMotifViewer::getClassType(void);
virtual void pfMotifViewer::guiMainLoop();
virtual void pfMotifViewer::show();
Widget pfMotifViewer::getTopLevelWidget();
void pfMotifViewer::setTopLevelWidget(Widget topLevel);
XtAppContext pfMotifViewer::getAppContext();
void pfMotifViewer::setAppContext(XtAppContext appContext);
PARENT CLASS FUNCTIONS
The OpenGL Performer class pfMotifViewer is derived from the parent class
pfGUIViewer, so each of these member functions of class pfGUIViewer are
also directly usable with objects of class pfMotifViewer. This is also
true for ancestor classes of class pfGUIViewer.
virtual void pfGUIViewer::addWorkProc() = 0;
virtual void pfGUIViewer::removeWorkProc() = 0;
virtual void pfGUIViewer::guiMainLoop() = 0;
virtual void pfGUIViewer::show() = 0;
int pfGUIViewer::mapUnmapCB(int evenType);
void* pfGUIViewer::getWidget();
void pfGUIViewer::setWidget(void* widget);
void pfGUIViewer::getMainWindow();
Since the class pfGUIViewer is itself derived from the parent class
pfViewer, objects of class pfMotifViewer can also be used with these
functions designed for objects of class pfViewer.
pfLightSource* pfViewer::getHeadLight() const;
Page 1
pfMotifViewer(3pf) OpenGL Performer 3.2.2 libpfx C++ Reference Pages
void pfViewer::setHeadLight(pfLightSource *headlight);
pfEarthSky * pfViewer::getESky() const;
void pfViewer::setESky(pfEarthSky *eSky);
void pfViewer::loadModel(char *filename, int optimize = 1);
void pfViewer::setSceneGraph(pfNode *newRoot,
int optimize = 0);
pfNode * pfViewer::getSceneGraph() const;
pfChannel * pfViewer::getChannel(int i = 0);
int pfViewer::getNumChannels() const;
pfPipeWindow* pfViewer::getPipeWindow() const;
void pfViewer::resetToHomePosition();
void pfViewer::saveHomePosition();
pfScene* pfViewer::getScene(int whichChannel = 0) const;
int pfViewer::getWidth() const;
int pfViewer::getHeight() const;
void pfViewer::setWidth(int width);
void pfViewer::setHeight(int height);
void pfViewer::setWinSizes(int width, int height);
void pfViewer::setOriginSize(int origX, int origY,
orig width, int height);
void pfViewer::getXOrigin() const;
void pfViewer::getYOrigin() const;
Window pfViewer::getXWin();
Window pfViewer::getGXWin();
void pfViewer::setDisplay(Display *);
Display* pfViewer::getDisplay() const;
pfCoord& pfViewer::getView();
void pfViewer::setInterOcularDistance(float distance);
void pfViewer::setConvergenceRatio(float ratio);
void pfViewer::setView(pfCoord& view);
pfDrawAction * pfViewer::getDrawAction(int i = 0);
void pfViewer::setDrawAction(int i,
pfDrawAction *drawAction);
int pfViewer::getStereoMode();
void viewAll();
virtual void pfViewer::show();
void pfViewer::setLoadNewModelFlag(int flag);
void pfViewer::setLoadFilename(const char *filename);
void pfViewer::setXWin(Window win);
void pfViewer::setGXWin(Window win);
Since the class pfViewer is itself derived from the parent class
pfObject, objects of class pfMotifViewer can also be used with these
functions designed for objects of class pfObject.
void* pfObject::operator new(size_t);
void* pfObject::operator new(size_t, pfFluxMemory *fmem);
void pfObject::setUserData(void *data);
void pfObject::setUserData(int slot, void *data);
Page 2
pfMotifViewer(3pf) OpenGL Performer 3.2.2 libpfx C++ Reference Pages
void* pfObject::getUserData(pfObject *obj);
void* pfObject::getUserData(pfObject *obj, int slot);
int pfObject::getNumUserData();
Since the class pfObject is itself derived from the parent class
pfMemory, objects of class pfMotifViewer can also be used with these
functions designed for objects of class pfMemory.
void* pfMemory::getData(const void *ptr);
pfType * pfMemory::getType();
int pfMemory::isOfType(pfType *type);
int pfMemory::isExactType(pfType *type);
const char * pfMemory::getTypeName();
int pfMemory::copy(pfMemory *src);
int pfMemory::compare(const pfMemory *mem);
void pfMemory::print(uint which, uint verbose, char *prefix,
FILE *file);
int pfMemory::getArena(void *ptr);
void* pfMemory::getArena();
int pfMemory::ref();
int pfMemory::unref();
int pfMemory::unrefDelete();
int pfMemory::unrefGetRef();
int pfMemory::getRef();
int pfMemory::checkDelete();
int pfMemory::isFluxed();
void * pfMemory::getArena();
int pfMemory::getSize();
DESCRIPTION
new pfMotifViewer creates and returns a handle to a pfMotifViewer. Like
other pfGUIViewers, pfMotifViewers are always allocated from shared
memory and can be deleted by the calling pfViewerManager::removeViewer().
The optional argument parent in the constructor for the pfMotifViewer
indicates what the parent widget is. If none is specified, a new top
level widget is created and it's may be retrieved by calling
pfMotifViewer::getTopLevelWidget().
If you wish to extend the functionality of the pfMotifViewer class by
using a toolkit built on top of OSF/Motif (such as Viewkit) then you will
need to use the second constructor which takes as first argument a char.
In addition, you will need to set the top level widget via
pfMotifViewer::setTopLevelWidet() and the application context via
pfMotifViewer::setAppContext(). Last but not least, you will need to set
the GL widget via pfMotifViewer::setWidget() and add an event handler for
the mapping and unmapping of the window (see pfGUIViewer::mapUnmap() for
more information.)
The methods pfMotifViewer::getTopLevelWidget() and
pfMotifViewer::getAppContext() are simply convenience functions, provided
to help simplify the task of retrieving these values which are deduced
Page 3
pfMotifViewer(3pf) OpenGL Performer 3.2.2 libpfx C++ Reference Pages
based on the value of the parent widget passed to the constructor for
this class.
The method pfMotifViewer::guiMainLoop() is provided here but because it
is virtual it may be overridden by classes which derived from it and this
is exactly what the pfViewkitViewer does. The same reasoning applies to
pfMotifViewer::show().
NOTES
The libpfx source code, object code and documentation are provided as
unsupported software. Routines are subject to change in future releases.
The most recent version of this software may be found at the following
URL: http://oss.sgi.com/projects/performer/.
SEE ALSO
pfViewkitViewer, pfViewerManager, pfGUIViewer, pfViewer
Page 4