pfGTKViewer(3pf) OpenGL Performer 3.2.2 libpfx C++ Reference Pages
NAMEpfGTKViewer - pfViewer based on GTK+ GUI toolkit
FUNCTION SPECIFICATION
#include <Performer/pfx/pfGTKViewer.h>
pfGTKViewer::pfGTKViewer(GtkWidget* parent = NULL,
pfPipe* p = NULL, int numChannels = 1,
int stereoMode = PFVIEWER_MONO, int *attr = NULL);
static pfType * pfGTKViewer::getClassType(void);
PARENT CLASS FUNCTIONS
The OpenGL Performer class pfGTKViewer is derived from the parent class
pfGUIViewer, so each of these member functions of class pfGUIViewer are
also directly usable with objects of class pfGTKViewer. 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 pfGTKViewer can also be used with these
functions designed for objects of class pfViewer.
pfLightSource* pfViewer::getHeadLight() const;
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);
Page 1
pfGTKViewer(3pf) OpenGL Performer 3.2.2 libpfx C++ Reference Pages
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 pfGTKViewer 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);
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 pfGTKViewer 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);
Page 2
pfGTKViewer(3pf) OpenGL Performer 3.2.2 libpfx C++ Reference Pages
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 pfGTKViewer creates and returns a handle to a pfGTKViewer. Like other
pfGUIViewers, pfGTKViewers are always allocated from shared memory and
can be deleted by the calling pfViewerManager::removeViewer(). The
optional argument parent in the constructor for the pfGTKViewer indicates
what the parent widget is. If none is specified, a new GTK window of type
GTK_WINDOW_TOPLEVEL is created and may be retrieved by casting the return
value from pfGTKViewer::getMainWindow() to a GtkWidget pointer.
NOTES
In order to build the GTK based examples located in
/usr/share/Performer/src/pguide/libpfx you must first set the environment
variable PFDOGTK to 1 and then modify the makefile to specify the
location of the gtkgl library via the variable GTKGLLIB. Note that the
gtkgl library is available for download at the following URL:
http://www.student.oulu.fi/~jlof/gtkglarea/.
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
GTK+, toolkit, home:, http://www.gtk.org, pfViewerManager, pfGUIViewer,
pfViewer
Page 3