Added support for getting all windows and hiding the cursor
This commit is contained in:
@@ -51,6 +51,9 @@ class OSGVIEWER_EXPORT GraphicsWindow : public osg::GraphicsContext, public osgG
|
||||
/** Get focus on if the pointer is in this window.*/
|
||||
virtual void grabFocusIfPointerInWindow() {}
|
||||
|
||||
/** Switch on/off the cursor.*/
|
||||
virtual void useCursor(bool /*cursorOn*/) {}
|
||||
|
||||
public:
|
||||
|
||||
/** Realise the GraphicsContext implementation,
|
||||
|
||||
@@ -89,6 +89,21 @@ class GraphicsWindowX11 : public osgViewer::GraphicsWindow
|
||||
// Override from GUIActionAdapter
|
||||
virtual void requestWarpPointer(float x,float y);
|
||||
|
||||
/** Switch on/off the cursor.*/
|
||||
virtual void useCursor(bool cursorOn);
|
||||
|
||||
public:
|
||||
|
||||
// X11 specific aces functions
|
||||
|
||||
Display* getDisplay() { return _display; }
|
||||
Window& getParent() { return _parent; }
|
||||
Window& getWindow() { return _window; }
|
||||
|
||||
Cursor& getDefaultCursor() { return _defaultCursor; }
|
||||
Cursor& getNullCursor() { return _nullCursor; }
|
||||
Cursor& getCurrentCursor() { return _nullCursor; }
|
||||
|
||||
protected:
|
||||
|
||||
bool createVisualInfo();
|
||||
|
||||
@@ -58,13 +58,16 @@ class OSGVIEWER_EXPORT Viewer : public osgViewer::View
|
||||
osg::Camera* getCameraWithFocus() { return _cameraWithFocus.get(); }
|
||||
const osg::Camera* getCameraWithFocus() const { return _cameraWithFocus.get(); }
|
||||
|
||||
typedef std::vector<osg::GraphicsContext*> Contexts;
|
||||
void getContexts(Contexts& contexts);
|
||||
|
||||
typedef std::vector<osgViewer::GraphicsWindow*> Windows;
|
||||
void getWindows(Windows& windows);
|
||||
|
||||
public:
|
||||
|
||||
void init();
|
||||
|
||||
typedef std::vector<osg::GraphicsContext*> Contexts;
|
||||
void getContexts(Contexts& contexts);
|
||||
|
||||
bool _firstFrame;
|
||||
bool _done;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user