Public Member Functions | |
GraphicsWindowWin32 (osg::GraphicsContext::Traits *traits) | |
~GraphicsWindowWin32 () | |
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 () |
Realize 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 | setWindowRectangleImplementation (int x, int y, int width, int height) |
Set the window's position and size. | |
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 | requestWarpPointer (float x, float y) |
Override from GUIActionAdapter. | |
virtual void | setWindowName (const std::string &) |
Set the name of the window. | |
virtual void | useCursor (bool) |
Switch on/off the cursor. | |
virtual void | setCursor (MouseCursor cursor) |
Set mouse cursor to a specific shape. | |
virtual LRESULT | handleNativeWindowingEvent (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
Handle a native (Win32) windowing event as received from the system. | |
HWND | getHWND () const |
Get native window. | |
HDC | getHDC () const |
HGLRC | getWGLContext () const |
Get native OpenGL graphics context. | |
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 |
std::map < MouseCursor, HCURSOR > | _mouseCursorMap |
Classes | |
struct | WindowData |
WindowData is used to pass in the Win32 window handle attached the GraphicsContext::Traits structure. More... |
osgViewer::GraphicsWindowWin32::GraphicsWindowWin32 | ( | osg::GraphicsContext::Traits * | traits | ) |
osgViewer::GraphicsWindowWin32::~GraphicsWindowWin32 | ( | ) |
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 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 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.
virtual bool osgViewer::GraphicsWindowWin32::realizeImplementation | ( | ) | [virtual] |
virtual bool osgViewer::GraphicsWindowWin32::isRealizedImplementation | ( | ) | const [inline, virtual] |
Return true if the graphics context has been realised and is ready to use.
Reimplemented from osgViewer::GraphicsWindow.
virtual void osgViewer::GraphicsWindowWin32::closeImplementation | ( | ) | [virtual] |
virtual bool osgViewer::GraphicsWindowWin32::makeCurrentImplementation | ( | ) | [virtual] |
virtual bool osgViewer::GraphicsWindowWin32::releaseContextImplementation | ( | ) | [virtual] |
virtual void osgViewer::GraphicsWindowWin32::swapBuffersImplementation | ( | ) | [virtual] |
virtual void osgViewer::GraphicsWindowWin32::checkEvents | ( | ) | [virtual] |
virtual bool osgViewer::GraphicsWindowWin32::setWindowRectangleImplementation | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height | |||
) | [virtual] |
virtual bool osgViewer::GraphicsWindowWin32::setWindowDecorationImplementation | ( | bool | flag | ) | [virtual] |
virtual void osgViewer::GraphicsWindowWin32::grabFocus | ( | ) | [virtual] |
virtual void osgViewer::GraphicsWindowWin32::grabFocusIfPointerInWindow | ( | ) | [virtual] |
virtual void osgViewer::GraphicsWindowWin32::requestWarpPointer | ( | float | x, | |
float | y | |||
) | [virtual] |
virtual void osgViewer::GraphicsWindowWin32::setWindowName | ( | const std::string & | ) | [virtual] |
virtual void osgViewer::GraphicsWindowWin32::useCursor | ( | bool | ) | [virtual] |
virtual void osgViewer::GraphicsWindowWin32::setCursor | ( | MouseCursor | cursor | ) | [virtual] |
Set mouse cursor to a specific shape.
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.
HWND osgViewer::GraphicsWindowWin32::getHWND | ( | ) | const [inline] |
Get native window.
HDC osgViewer::GraphicsWindowWin32::getHDC | ( | ) | const [inline] |
HGLRC osgViewer::GraphicsWindowWin32::getWGLContext | ( | ) | const [inline] |
Get native OpenGL graphics context.
void osgViewer::GraphicsWindowWin32::init | ( | ) | [protected] |
bool osgViewer::GraphicsWindowWin32::registerWindowProcedure | ( | ) | [protected] |
bool osgViewer::GraphicsWindowWin32::unregisterWindowProcedure | ( | ) | [protected] |
bool osgViewer::GraphicsWindowWin32::createWindow | ( | ) | [protected] |
bool osgViewer::GraphicsWindowWin32::setWindow | ( | HWND | handle | ) | [protected] |
void osgViewer::GraphicsWindowWin32::destroyWindow | ( | bool | deleteNativeWindow = true |
) | [protected] |
void osgViewer::GraphicsWindowWin32::recreateWindow | ( | ) | [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] |
bool osgViewer::GraphicsWindowWin32::setPixelFormat | ( | ) | [protected] |
void osgViewer::GraphicsWindowWin32::adaptKey | ( | WPARAM | wParam, | |
LPARAM | lParam, | |||
int & | keySymbol, | |||
unsigned int & | modifierMask | |||
) | [protected] |
void osgViewer::GraphicsWindowWin32::transformMouseXY | ( | float & | x, | |
float & | y | |||
) | [protected] |
HCURSOR osgViewer::GraphicsWindowWin32::getOrCreateCursor | ( | MouseCursor | mouseShape | ) | [protected] |
HWND osgViewer::GraphicsWindowWin32::_hwnd [protected] |
HDC osgViewer::GraphicsWindowWin32::_hdc [protected] |
HGLRC osgViewer::GraphicsWindowWin32::_hglrc [protected] |
HCURSOR osgViewer::GraphicsWindowWin32::_currentCursor [protected] |
WNDPROC osgViewer::GraphicsWindowWin32::_windowProcedure [protected] |
double osgViewer::GraphicsWindowWin32::_timeOfLastCheckEvents [protected] |
int osgViewer::GraphicsWindowWin32::_screenOriginX [protected] |
int osgViewer::GraphicsWindowWin32::_screenOriginY [protected] |
unsigned int osgViewer::GraphicsWindowWin32::_screenWidth [protected] |
unsigned int osgViewer::GraphicsWindowWin32::_screenHeight [protected] |
int osgViewer::GraphicsWindowWin32::_windowOriginXToRealize [protected] |
int osgViewer::GraphicsWindowWin32::_windowOriginYToRealize [protected] |
unsigned int osgViewer::GraphicsWindowWin32::_windowWidthToRealize [protected] |
unsigned int osgViewer::GraphicsWindowWin32::_windowHeightToRealize [protected] |
bool osgViewer::GraphicsWindowWin32::_initialized [protected] |
bool osgViewer::GraphicsWindowWin32::_valid [protected] |
bool osgViewer::GraphicsWindowWin32::_realized [protected] |
bool osgViewer::GraphicsWindowWin32::_ownsWindow [protected] |
bool osgViewer::GraphicsWindowWin32::_closeWindow [protected] |
bool osgViewer::GraphicsWindowWin32::_destroyWindow [protected] |
bool osgViewer::GraphicsWindowWin32::_destroying [protected] |
std::map<MouseCursor,HCURSOR> osgViewer::GraphicsWindowWin32::_mouseCursorMap [protected] |