25 #ifndef WGEGRAPHICSWINDOW_H
26 #define WGEGRAPHICSWINDOW_H
29 #include <boost/shared_ptr.hpp>
31 #include <osgViewer/GraphicsWindow>
33 #include "WGraphicsEngineMode.h"
52 WGEGraphicsWindow( osg::ref_ptr<osg::Referenced> wdata,
int x,
int y,
int width,
int height );
79 MOUSEPRESS, MOUSERELEASE, MOUSEDOUBLECLICK, MOUSEMOVE, MOUSESCROLL
88 virtual void resize(
int width,
int height );
127 virtual void setClosed(
bool closed =
true );
134 #ifdef WGEMODE_MULTITHREADED
162 #endif // WGEGRAPHICSWINDOW_H
osg::ref_ptr< osgViewer::GraphicsWindow > m_GraphicsWindow
OpenSceneGraph render window.
KeyEvents
Event types for the keyEvent() handler.
virtual bool isClosed() const
Check if the windows is open.
virtual ~WGEGraphicsWindow()
Destructor.
virtual void close()
Initiates a close event for this viewer.
osg::ref_ptr< osg::GraphicsContext > m_GraphicsContext
OpenSceneGraph render context.
virtual void mouseEvent(MouseEvents eventType, int x, int y, int button)
Handles mouse events forwarded from widget.
MouseEvents
Mouse event types for the mouseEvent() handler.
WGEGraphicsWindow(osg::ref_ptr< osg::Referenced > wdata, int x, int y, int width, int height)
Default constructor.
Class managing a single graphics context and OSG GraphicsWindow.
virtual void keyEvent(KeyEvents eventType, int key)
Handles key events (if forwarded to this Viewer instance).
virtual void setClosed(bool closed=true)
Set closed state.
osg::ref_ptr< osg::Referenced > m_WindowData
Widget window data.
virtual void resize(int width, int height)
Updates size information.
bool m_closed
Mark the window opened or closed.
osg::ref_ptr< osgViewer::GraphicsWindow > getGraphicsWindow()
Getter for m_GraphicsWindow.
void createContext(int x, int y, int width, int height)
Creates a new OpenGL context in the calling thread.