osgViewer::GraphicsWindow Class Reference

Inheritance diagram for osgViewer::GraphicsWindow:
osg::GraphicsContext osgGA::GUIActionAdapter osg::Object osg::Referenced osgViewer::GraphicsWindowEmbedded osgViewer::GraphicsWindowWin32 osgViewer::GraphicsWindowX11

List of all members.

Public Types

enum  MouseCursor {
  InheritCursor, NoCursor, RightArrowCursor, LeftArrowCursor,
  InfoCursor, DestroyCursor, HelpCursor, CycleCursor,
  SprayCursor, WaitCursor, TextCursor, CrosshairCursor,
  UpDownCursor, LeftRightCursor, TopSideCursor, BottomSideCursor,
  LeftSideCursor, RightSideCursor, TopLeftCorner, TopRightCorner,
  BottomRightCorner, BottomLeftCorner
}

Public Member Functions

 GraphicsWindow ()
virtual bool isSameKindAs (const Object *object) const
virtual const char * libraryName () const
virtual const char * className () const
void setEventQueue (osgGA::EventQueue *eventQueue)
osgGA::EventQueuegetEventQueue ()
const osgGA::EventQueuegetEventQueue () const
virtual void checkEvents ()
void setWindowRectangle (int x, int y, int width, int height)
virtual bool setWindowRectangleImplementation (int, int, int, int)
virtual void getWindowRectangle (int &x, int &y, int &width, int &height)
void setWindowDecoration (bool flag)
virtual bool setWindowDecorationImplementation (bool)
virtual bool getWindowDecoration () const
virtual void grabFocus ()
virtual void grabFocusIfPointerInWindow ()
virtual void raiseWindow ()
virtual void setWindowName (const std::string &)
virtual std::string getWindowName ()
virtual void useCursor (bool cursorOn)
virtual void setCursor (MouseCursor)
virtual bool valid () const
virtual bool realizeImplementation ()
virtual bool isRealizedImplementation () const
virtual void closeImplementation ()
virtual bool makeCurrentImplementation ()
virtual bool makeContextCurrentImplementation (GraphicsContext *)
virtual bool releaseContextImplementation ()
virtual void bindPBufferToTextureImplementation (GLenum)
virtual void swapBuffersImplementation ()
virtual void requestRedraw ()
virtual void requestContinuousUpdate (bool=true)
virtual void requestWarpPointer (float, float)

Protected Attributes

osg::ref_ptr< osgGA::EventQueue_eventQueue

Detailed Description

Base class for providing Windowing API agnostic access to creating and managing graphics window and events. Note, the GraphicsWindow is subclassed from osg::GraphicsContext, and to provide an implemention you'll need to implement its range of pure virtual functions, you'll find these all have naming convention methodNameImplemention(..). GraphicsWindow adds the event queue on top of the GraphicsContext, thereby adding a mechanism for adapting Windowing events as well as basics graphics context work, you should wire up custom GraphicsWindowImplementation to push their events through into the EventQueue.


Member Enumeration Documentation

Mouse cursor types, the same ones already present with ancient glut ...

Enumerator:
InheritCursor 
NoCursor 
RightArrowCursor 
LeftArrowCursor 
InfoCursor 
DestroyCursor 
HelpCursor 
CycleCursor 
SprayCursor 
WaitCursor 
TextCursor 
CrosshairCursor 
UpDownCursor 
LeftRightCursor 
TopSideCursor 
BottomSideCursor 
LeftSideCursor 
RightSideCursor 
TopLeftCorner 
TopRightCorner 
BottomRightCorner 
BottomLeftCorner 

Constructor & Destructor Documentation

osgViewer::GraphicsWindow::GraphicsWindow (  )  [inline]

Member Function Documentation

virtual void osgViewer::GraphicsWindow::bindPBufferToTextureImplementation ( GLenum   )  [inline, virtual]

Pure virtual, Bind the graphics context to associated texture implementation. Pure virtual - must be implemented by concrete implementations of GraphicsContext.

Implements osg::GraphicsContext.

References osg::NOTICE, and osg::notify().

virtual void osgViewer::GraphicsWindow::checkEvents (  )  [inline, virtual]
virtual const char* osgViewer::GraphicsWindow::className (  )  const [inline, virtual]

return the name of the object's class type. Must be defined by derived classes.

Reimplemented from osg::GraphicsContext.

Reimplemented in osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, and osgViewer::GraphicsWindowEmbedded.

virtual void osgViewer::GraphicsWindow::closeImplementation (  )  [inline, virtual]

Close the graphics context implementation. Pure virtual - must be implemented by concrete implementations of GraphicsContext.

Implements osg::GraphicsContext.

Reimplemented in osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, and osgViewer::GraphicsWindowEmbedded.

References osg::NOTICE, and osg::notify().

const osgGA::EventQueue* osgViewer::GraphicsWindow::getEventQueue (  )  const [inline]
osgGA::EventQueue* osgViewer::GraphicsWindow::getEventQueue (  )  [inline]
virtual bool osgViewer::GraphicsWindow::getWindowDecoration (  )  const [inline, virtual]

Set Window decoration.

virtual std::string osgViewer::GraphicsWindow::getWindowName (  )  [inline, virtual]

Return the name of the window

virtual void osgViewer::GraphicsWindow::getWindowRectangle ( int &  x,
int &  y,
int &  width,
int &  height 
) [inline, virtual]

Get the window's position and size.

virtual void osgViewer::GraphicsWindow::grabFocus (  )  [inline, virtual]
virtual void osgViewer::GraphicsWindow::grabFocusIfPointerInWindow (  )  [inline, virtual]

Get focus on if the pointer is in this window.

Reimplemented in osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, and osgViewer::GraphicsWindowEmbedded.

References osg::NOTICE, and osg::notify().

virtual bool osgViewer::GraphicsWindow::isRealizedImplementation (  )  const [inline, virtual]

Return true if the graphics context has been realized, and is ready to use, implementation. Pure virtual - must be implemented by concrete implementations of GraphicsContext.

Implements osg::GraphicsContext.

Reimplemented in osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, and osgViewer::GraphicsWindowEmbedded.

References osg::NOTICE, and osg::notify().

virtual bool osgViewer::GraphicsWindow::isSameKindAs ( const Object *  object  )  const [inline, virtual]
virtual const char* osgViewer::GraphicsWindow::libraryName (  )  const [inline, virtual]

return the name of the object's library. Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name.

Reimplemented from osg::GraphicsContext.

Reimplemented in osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, and osgViewer::GraphicsWindowEmbedded.

virtual bool osgViewer::GraphicsWindow::makeContextCurrentImplementation ( GraphicsContext *   )  [inline, virtual]

Make this graphics context current with specified read context implementation. Pure virtual - must be implemented by concrete implementations of GraphicsContext.

References osg::NOTICE, and osg::notify().

virtual bool osgViewer::GraphicsWindow::makeCurrentImplementation (  )  [inline, virtual]

Make this graphics context current implementation. Pure virtual - must be implemented by concrete implementations of GraphicsContext.

Implements osg::GraphicsContext.

Reimplemented in osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, and osgViewer::GraphicsWindowEmbedded.

References osg::NOTICE, and osg::notify().

virtual void osgViewer::GraphicsWindow::raiseWindow (  )  [inline, virtual]
virtual bool osgViewer::GraphicsWindow::realizeImplementation (  )  [inline, virtual]

Realize the GraphicsContext implementation, Pure virtual - must be implemented by concrete implementations of GraphicsContext.

Implements osg::GraphicsContext.

Reimplemented in osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, and osgViewer::GraphicsWindowEmbedded.

References osg::NOTICE, and osg::notify().

virtual bool osgViewer::GraphicsWindow::releaseContextImplementation (  )  [inline, virtual]

Release the graphics context.

Implements osg::GraphicsContext.

Reimplemented in osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, and osgViewer::GraphicsWindowEmbedded.

References osg::NOTICE, and osg::notify().

virtual void osgViewer::GraphicsWindow::requestContinuousUpdate ( bool  needed = true  )  [inline, virtual]

requestContinousUpdate(bool) is for en/disabling a throw or idle callback to be requested by a GUIEventHandler (typically a MatrixManipulator, though other GUIEventHandler's may also provide functionality). GUI toolkits can respond to this immediately by registering an idle/timed callback, or can delay setting the callback and update at their own leisure.

Implements osgGA::GUIActionAdapter.

virtual void osgViewer::GraphicsWindow::requestRedraw (  )  [inline, virtual]

requestRedraw() requests a single redraw.

Implements osgGA::GUIActionAdapter.

virtual void osgViewer::GraphicsWindow::requestWarpPointer ( float  x,
float  y 
) [inline, virtual]

requestWarpPointer(int,int) is requesting a repositioning of the mouse pointer to a specified x,y location on the window. This is used by some camera manipulators to initialise the mouse pointer when mouse position relative to a controls neutral mouse position is required, i.e when mimicking a aircrafts joystick.

Implements osgGA::GUIActionAdapter.

Reimplemented in osgViewer::GraphicsWindowWin32, and osgViewer::GraphicsWindowX11.

virtual void osgViewer::GraphicsWindow::setCursor ( MouseCursor   )  [inline, virtual]

Set mouse cursor to a specific shape.

Reimplemented in osgViewer::GraphicsWindowX11.

References osg::NOTICE, and osg::notify().

void osgViewer::GraphicsWindow::setEventQueue ( osgGA::EventQueue eventQueue  )  [inline]
void osgViewer::GraphicsWindow::setWindowDecoration ( bool  flag  )  [inline]

Set Window decoration.

virtual bool osgViewer::GraphicsWindow::setWindowDecorationImplementation ( bool   )  [inline, virtual]

implementation of setWindowDecoration, should be implemented by derived classes

Reimplemented in osgViewer::GraphicsWindowWin32, and osgViewer::GraphicsWindowX11.

References osg::NOTICE, and osg::notify().

virtual void osgViewer::GraphicsWindow::setWindowName ( const std::string &   )  [inline, virtual]

Set the name of the window

Reimplemented in osgViewer::GraphicsWindowWin32, and osgViewer::GraphicsWindowX11.

References osg::NOTICE, and osg::notify().

void osgViewer::GraphicsWindow::setWindowRectangle ( int  x,
int  y,
int  width,
int  height 
) [inline]

Set the window's position and size.

virtual bool osgViewer::GraphicsWindow::setWindowRectangleImplementation ( int  ,
int  ,
int  ,
int   
) [inline, virtual]

implementation of setWindowRectangle, should be implemented by derived classes

Reimplemented in osgViewer::GraphicsWindowWin32, and osgViewer::GraphicsWindowX11.

References osg::NOTICE, and osg::notify().

virtual void osgViewer::GraphicsWindow::swapBuffersImplementation (  )  [inline, virtual]

Swap the front and back buffers implementation. Pure virtual - must be implemented by concrete implementations of GraphicsContext.

Implements osg::GraphicsContext.

Reimplemented in osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, and osgViewer::GraphicsWindowEmbedded.

References osg::NOTICE, and osg::notify().

virtual void osgViewer::GraphicsWindow::useCursor ( bool  cursorOn  )  [inline, virtual]

Switch on/off the cursor.

Reimplemented in osgViewer::GraphicsWindowWin32.

virtual bool osgViewer::GraphicsWindow::valid (  )  const [inline, virtual]

Create a new mouse cursor from the usual bitmap data. Return whether a valid and usable GraphicsContext has been created.

Implements osg::GraphicsContext.

Reimplemented in osgViewer::GraphicsWindowWin32, osgViewer::GraphicsWindowX11, and osgViewer::GraphicsWindowEmbedded.

References osg::NOTICE, and osg::notify().


Member Data Documentation


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2