From Daniel Sjölie, support for controlling which viewports are focusable i.e.

recive mouse/keyboard events.
This commit is contained in:
Robert Osfield
2003-01-22 15:44:22 +00:00
parent 6fd27a4b59
commit ea35796526
2 changed files with 9 additions and 1 deletions

View File

@@ -93,6 +93,10 @@ class OSGGLUT_EXPORT Viewer : public Window, public osgGA::GUIActionAdapter
void selectCameraManipulator(unsigned int pos,
unsigned int viewport = 0);
/// Set focusable
void setFocusable( unsigned int viewp, bool focusable )
{ _viewportList[viewp]._focusable = focusable; };
void prependEventHandler(osgGA::GUIEventHandler* handler,unsigned int viewport = 0);
void appendEventHandler(osgGA::GUIEventHandler* handler,unsigned int viewport = 0);
@@ -147,6 +151,8 @@ class OSGGLUT_EXPORT Viewer : public Window, public osgGA::GUIActionAdapter
osg::ref_ptr<osgUtil::SceneView> sceneView;
float viewport[4]; // Win-size-relative [0,1]
bool _focusable;
osg::ref_ptr<osgGA::CameraManipulator> _cameraManipulator;
CameraManipList _cameraManipList;