osgViewer::GraphicsWindowWin32 Class Reference

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

List of all members.

Classes

struct  WindowData

Public Member Functions

 GraphicsWindowWin32 (osg::GraphicsContext::Traits *traits)
 ~GraphicsWindowWin32 ()
virtual bool isSameKindAs (const Object *object) const
virtual const char * libraryName () const
virtual const char * className () const
virtual bool valid () const
virtual bool realizeImplementation ()
virtual bool isRealizedImplementation () const
virtual void closeImplementation ()
virtual bool makeCurrentImplementation ()
virtual bool releaseContextImplementation ()
virtual void swapBuffersImplementation ()
virtual void checkEvents ()
virtual bool setWindowRectangleImplementation (int x, int y, int width, int height)
virtual bool setWindowDecorationImplementation (bool flag)
virtual void grabFocus ()
virtual void grabFocusIfPointerInWindow ()
virtual void requestWarpPointer (float x, float y)
virtual void raiseWindow ()
virtual void setWindowName (const std::string &)
virtual void useCursor (bool)
virtual void setCursor (MouseCursor cursor)
virtual LRESULT handleNativeWindowingEvent (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
HWND getHWND () const
HDC getHDC () const
HGLRC getWGLContext () const

Protected Member Functions

void init ()
bool registerWindowProcedure ()
bool unregisterWindowProcedure ()
bool createWindow ()
bool setWindow (HWND handle)
void destroyWindow (bool deleteNativeWindow=true)
void recreateWindow ()
bool determineWindowPositionAndStyle (unsigned int screenNum, int clientAreaX, int clientAreaY, unsigned int clientAreaWidth, unsigned int clientAreaHeight, bool decorated, int &x, int &y, unsigned int &w, unsigned int &h, unsigned int &style, unsigned int &extendedStyle)
bool setPixelFormat ()
void adaptKey (WPARAM wParam, LPARAM lParam, int &keySymbol, unsigned int &modifierMask)
void transformMouseXY (float &x, float &y)
HCURSOR getOrCreateCursor (MouseCursor mouseShape)

Protected Attributes

HWND _hwnd
HDC _hdc
HGLRC _hglrc
HCURSOR _currentCursor
WNDPROC _windowProcedure
double _timeOfLastCheckEvents
int _screenOriginX
int _screenOriginY
unsigned int _screenWidth
unsigned int _screenHeight
int _windowOriginXToRealize
int _windowOriginYToRealize
unsigned int _windowWidthToRealize
unsigned int _windowHeightToRealize
bool _initialized
bool _valid
bool _realized
bool _ownsWindow
bool _closeWindow
bool _destroyWindow
bool _destroying
MouseCursor _mouseCursor
MouseCursor _appMouseCursor
 Persist which mouse cursor was used before switching to the resize cursors.
std::map< MouseCursor, HCURSOR > _mouseCursorMap
std::map< int, bool > _keyMap
bool _applyWorkaroundForMultimonitorMultithreadNVidiaWin32Issues

Constructor & Destructor Documentation

osgViewer::GraphicsWindowWin32::GraphicsWindowWin32 ( osg::GraphicsContext::Traits traits  ) 
osgViewer::GraphicsWindowWin32::~GraphicsWindowWin32 (  ) 

Member Function Documentation

void osgViewer::GraphicsWindowWin32::adaptKey ( WPARAM  wParam,
LPARAM  lParam,
int &  keySymbol,
unsigned int &  modifierMask 
) [protected]
virtual void osgViewer::GraphicsWindowWin32::checkEvents (  )  [virtual]

Check to see if any events have been generated.

Reimplemented from osgViewer::GraphicsWindow.

virtual const char* osgViewer::GraphicsWindowWin32::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::GraphicsWindowWin32::closeImplementation (  )  [virtual]

Close the graphics context.

Reimplemented from osgViewer::GraphicsWindow.

bool osgViewer::GraphicsWindowWin32::createWindow (  )  [protected]
void osgViewer::GraphicsWindowWin32::destroyWindow ( bool  deleteNativeWindow = true  )  [protected]
bool osgViewer::GraphicsWindowWin32::determineWindowPositionAndStyle ( unsigned int  screenNum,
int  clientAreaX,
int  clientAreaY,
unsigned int  clientAreaWidth,
unsigned int  clientAreaHeight,
bool  decorated,
int &  x,
int &  y,
unsigned int &  w,
unsigned int &  h,
unsigned int &  style,
unsigned int &  extendedStyle 
) [protected]
HDC osgViewer::GraphicsWindowWin32::getHDC (  )  const [inline]
HWND osgViewer::GraphicsWindowWin32::getHWND (  )  const [inline]

Get native window.

HCURSOR osgViewer::GraphicsWindowWin32::getOrCreateCursor ( MouseCursor  mouseShape  )  [protected]
HGLRC osgViewer::GraphicsWindowWin32::getWGLContext (  )  const [inline]

Get native OpenGL graphics context.

virtual void osgViewer::GraphicsWindowWin32::grabFocus (  )  [virtual]

Get focus.

Reimplemented from osgViewer::GraphicsWindow.

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

Get focus on if the pointer is in this window.

Reimplemented from osgViewer::GraphicsWindow.

virtual LRESULT osgViewer::GraphicsWindowWin32::handleNativeWindowingEvent ( HWND  hwnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
) [virtual]

Handle a native (Win32) windowing event as received from the system

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

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

Reimplemented from osgViewer::GraphicsWindow.

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

Reimplemented from osgViewer::GraphicsWindow.

virtual const char* osgViewer::GraphicsWindowWin32::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::GraphicsWindowWin32::makeCurrentImplementation (  )  [virtual]

Make this graphics context current.

Reimplemented from osgViewer::GraphicsWindow.

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

Raise specified window

Reimplemented from osgViewer::GraphicsWindow.

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

Realize the GraphicsContext.

Reimplemented from osgViewer::GraphicsWindow.

void osgViewer::GraphicsWindowWin32::recreateWindow (  )  [protected]
bool osgViewer::GraphicsWindowWin32::registerWindowProcedure (  )  [protected]
virtual bool osgViewer::GraphicsWindowWin32::releaseContextImplementation (  )  [virtual]

Release the graphics context.

Reimplemented from osgViewer::GraphicsWindow.

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

Override from GUIActionAdapter.

Reimplemented from osgViewer::GraphicsWindow.

virtual void osgViewer::GraphicsWindowWin32::setCursor ( MouseCursor  cursor  )  [virtual]

Set mouse cursor to a specific shape.

bool osgViewer::GraphicsWindowWin32::setPixelFormat (  )  [protected]
bool osgViewer::GraphicsWindowWin32::setWindow ( HWND  handle  )  [protected]
virtual bool osgViewer::GraphicsWindowWin32::setWindowDecorationImplementation ( bool  flag  )  [virtual]

Set Window decoration.

Reimplemented from osgViewer::GraphicsWindow.

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

Set the name of the window

Reimplemented from osgViewer::GraphicsWindow.

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

Set the window's position and size.

Reimplemented from osgViewer::GraphicsWindow.

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

Swap the front and back buffers.

Reimplemented from osgViewer::GraphicsWindow.

void osgViewer::GraphicsWindowWin32::transformMouseXY ( float &  x,
float &  y 
) [protected]
bool osgViewer::GraphicsWindowWin32::unregisterWindowProcedure (  )  [protected]
virtual void osgViewer::GraphicsWindowWin32::useCursor ( bool   )  [virtual]

Switch on/off the cursor.

Reimplemented from osgViewer::GraphicsWindow.

virtual bool osgViewer::GraphicsWindowWin32::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

Persist which mouse cursor was used before switching to the resize cursors.

std::map<int, bool> osgViewer::GraphicsWindowWin32::_keyMap [protected]

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

Generated by  doxygen 1.6.2