25 #ifndef WGEGRAPHICSWINDOW_H
26 #define WGEGRAPHICSWINDOW_H
28 #include <boost/shared_ptr.hpp>
29 #include <osgViewer/GraphicsWindow>
31 #include "WGraphicsEngineMode.h"
50 WGEGraphicsWindow( osg::ref_ptr<osg::Referenced> wdata,
int x,
int y,
int width,
int height );
77 MOUSEPRESS, MOUSERELEASE, MOUSEDOUBLECLICK, MOUSEMOVE, MOUSESCROLL
86 virtual void resize(
int width,
int height );
125 virtual void setClosed(
bool closed =
true );
132 #ifdef WGEMODE_MULTITHREADED
160 #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.