OpenSceneGraph 2.8.4
Classes | Public Member Functions | Protected Member Functions | Protected Attributes
osgViewer::GraphicsWindowX11 Class Reference
Inheritance diagram for osgViewer::GraphicsWindowX11:
Inheritance graph
[legend]

List of all members.

Classes

struct  WindowData
 WindowData is used to pass in the X11 window handle attached the GraphicsContext::Traits structure. More...

Public Member Functions

 GraphicsWindowX11 (osg::GraphicsContext::Traits *traits)
virtual bool isSameKindAs (const Object *object) const
virtual const char * libraryName () const
 return the name of the object's library.
virtual const char * className () const
 return the name of the object's class type.
virtual bool valid () const
 Create a new mouse cursor from the usual bitmap data.
virtual bool realizeImplementation ()
 Realise the GraphicsContext.
virtual bool isRealizedImplementation () const
 Return true if the graphics context has been realised and is ready to use.
virtual void closeImplementation ()
 Close the graphics context.
virtual bool makeCurrentImplementation ()
 Make this graphics context current.
virtual bool releaseContextImplementation ()
 Release the graphics context.
virtual void swapBuffersImplementation ()
 Swap the front and back buffers.
virtual void checkEvents ()
 Check to see if any events have been generated.
virtual bool setWindowDecorationImplementation (bool flag)
 Set Window decoration.
virtual void grabFocus ()
 Get focus.
virtual void grabFocusIfPointerInWindow ()
 Get focus on if the pointer is in this window.
virtual void raiseWindow ()
 Raise specified window.
virtual void requestWarpPointer (float x, float y)
 requestWarpPointer(int,int) is requesting a repositioning of the mouse pointer to a specified x,y location on the window.
virtual bool setWindowRectangleImplementation (int x, int y, int width, int height)
 Set the window's position and size.
virtual void setWindowName (const std::string &name)
 Set the name of the window.
virtual void setCursor (MouseCursor cursor)
 Set mouse cursor to a specific shape.
Display * getDisplay () const
Display * getEventDisplay () const
Display * getDisplayToUse () const
Window & getParent ()
Window & getWindow ()
GLXContext & getGLXContext ()
Cursor getCurrentCursor ()

Protected Member Functions

 ~GraphicsWindowX11 ()
Cursor getOrCreateCursor (MouseCursor mouseShape)
bool createVisualInfo ()
bool createWindow ()
bool setWindow (Window window)
void init ()
bool checkAndSendEventFullScreenIfNeeded (Display *display, int x, int y, int width, int height, bool windowDecoration)
void transformMouseXY (float &x, float &y)
void adaptKey (XKeyEvent &keyevent, int &keySymbol)
void forceKey (int key, double time, bool state)
void rescanModifierMapping ()
void getModifierMap (char *keymap) const
int getModifierMask () const
void syncLocks ()
void flushKeyEvents ()

Protected Attributes

bool _valid
Display * _display
Display * _eventDisplay
Window _parent
Window _window
XVisualInfo * _visualInfo
GLXContext _glxContext
Cursor _currentCursor
Atom _deleteWindow
bool _initialized
bool _realized
bool _ownsWindow
double _timeOfLastCheckEvents
int _lastEventType
int _modifierState
int _numLockMask
char _keyMap [32]
std::map< MouseCursor, Cursor > _mouseCursorMap

Constructor & Destructor Documentation

osgViewer::GraphicsWindowX11::GraphicsWindowX11 ( osg::GraphicsContext::Traits traits) [inline]
osgViewer::GraphicsWindowX11::~GraphicsWindowX11 ( ) [protected]

Member Function Documentation

void osgViewer::GraphicsWindowX11::adaptKey ( XKeyEvent &  keyevent,
int &  keySymbol 
) [protected]
bool osgViewer::GraphicsWindowX11::checkAndSendEventFullScreenIfNeeded ( Display *  display,
int  x,
int  y,
int  width,
int  height,
bool  windowDecoration 
) [protected]
virtual void osgViewer::GraphicsWindowX11::checkEvents ( ) [virtual]

Check to see if any events have been generated.

Reimplemented from osgViewer::GraphicsWindow.

virtual const char* osgViewer::GraphicsWindowX11::className ( ) const [inline, virtual]

return the name of the object's class type.

Must be defined by derived classes.

Reimplemented from osgViewer::GraphicsWindow.

virtual void osgViewer::GraphicsWindowX11::closeImplementation ( ) [virtual]

Close the graphics context.

Reimplemented from osgViewer::GraphicsWindow.

bool osgViewer::GraphicsWindowX11::createVisualInfo ( ) [protected]
bool osgViewer::GraphicsWindowX11::createWindow ( ) [protected]
void osgViewer::GraphicsWindowX11::flushKeyEvents ( ) [protected]
void osgViewer::GraphicsWindowX11::forceKey ( int  key,
double  time,
bool  state 
) [protected]
Cursor osgViewer::GraphicsWindowX11::getCurrentCursor ( ) [inline]
Display* osgViewer::GraphicsWindowX11::getDisplay ( ) const [inline]
Display* osgViewer::GraphicsWindowX11::getDisplayToUse ( ) const
Display* osgViewer::GraphicsWindowX11::getEventDisplay ( ) const [inline]
GLXContext& osgViewer::GraphicsWindowX11::getGLXContext ( ) [inline]
void osgViewer::GraphicsWindowX11::getModifierMap ( char *  keymap) const [protected]
int osgViewer::GraphicsWindowX11::getModifierMask ( ) const [protected]
Cursor osgViewer::GraphicsWindowX11::getOrCreateCursor ( MouseCursor  mouseShape) [protected]
Window& osgViewer::GraphicsWindowX11::getParent ( ) [inline]
Window& osgViewer::GraphicsWindowX11::getWindow ( ) [inline]
virtual void osgViewer::GraphicsWindowX11::grabFocus ( ) [virtual]

Get focus.

Reimplemented from osgViewer::GraphicsWindow.

virtual void osgViewer::GraphicsWindowX11::grabFocusIfPointerInWindow ( ) [virtual]

Get focus on if the pointer is in this window.

Reimplemented from osgViewer::GraphicsWindow.

void osgViewer::GraphicsWindowX11::init ( ) [protected]
virtual bool osgViewer::GraphicsWindowX11::isRealizedImplementation ( ) const [inline, virtual]

Return true if the graphics context has been realised and is ready to use.

Reimplemented from osgViewer::GraphicsWindow.

virtual bool osgViewer::GraphicsWindowX11::isSameKindAs ( const Object *  object) const [inline, virtual]

Reimplemented from osgViewer::GraphicsWindow.

virtual const char* osgViewer::GraphicsWindowX11::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 osgViewer::GraphicsWindow.

virtual bool osgViewer::GraphicsWindowX11::makeCurrentImplementation ( ) [virtual]

Make this graphics context current.

Reimplemented from osgViewer::GraphicsWindow.

virtual void osgViewer::GraphicsWindowX11::raiseWindow ( ) [virtual]

Raise specified window.

Reimplemented from osgViewer::GraphicsWindow.

virtual bool osgViewer::GraphicsWindowX11::realizeImplementation ( ) [virtual]

Realise the GraphicsContext.

Reimplemented from osgViewer::GraphicsWindow.

virtual bool osgViewer::GraphicsWindowX11::releaseContextImplementation ( ) [virtual]

Release the graphics context.

Reimplemented from osgViewer::GraphicsWindow.

virtual void osgViewer::GraphicsWindowX11::requestWarpPointer ( float  x,
float  y 
) [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.

Reimplemented from osgViewer::GraphicsWindow.

void osgViewer::GraphicsWindowX11::rescanModifierMapping ( ) [protected]
virtual void osgViewer::GraphicsWindowX11::setCursor ( MouseCursor  cursor) [virtual]

Set mouse cursor to a specific shape.

Reimplemented from osgViewer::GraphicsWindow.

bool osgViewer::GraphicsWindowX11::setWindow ( Window  window) [protected]
virtual bool osgViewer::GraphicsWindowX11::setWindowDecorationImplementation ( bool  flag) [virtual]

Set Window decoration.

Reimplemented from osgViewer::GraphicsWindow.

virtual void osgViewer::GraphicsWindowX11::setWindowName ( const std::string &  name) [virtual]

Set the name of the window.

Reimplemented from osgViewer::GraphicsWindow.

virtual bool osgViewer::GraphicsWindowX11::setWindowRectangleImplementation ( int  x,
int  y,
int  width,
int  height 
) [virtual]

Set the window's position and size.

Reimplemented from osgViewer::GraphicsWindow.

virtual void osgViewer::GraphicsWindowX11::swapBuffersImplementation ( ) [virtual]

Swap the front and back buffers.

Reimplemented from osgViewer::GraphicsWindow.

void osgViewer::GraphicsWindowX11::syncLocks ( ) [protected]
void osgViewer::GraphicsWindowX11::transformMouseXY ( float &  x,
float &  y 
) [protected]
virtual bool osgViewer::GraphicsWindowX11::valid ( ) const [inline, virtual]

Create a new mouse cursor from the usual bitmap data.

Return whether a valid and usable GraphicsContext has been created.

Reimplemented from osgViewer::GraphicsWindow.


Member Data Documentation


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

osg logo
Generated at Sun Jan 8 2012 13:17:04 for the OpenSceneGraph by doxygen 1.7.4.