From David Callu, adding support for GraphicsWindowX11 window inhertance and
setWindowName() method.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <osgViewer/Export>
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
typedef void (* CGraphicsWindowFunction) (void);
|
||||
@@ -113,6 +114,13 @@ class OSGVIEWER_EXPORT GraphicsWindow : public osg::GraphicsContext, public osgG
|
||||
BottomRightCorner,
|
||||
BottomLeftCorner
|
||||
};
|
||||
|
||||
/** Set the name of the window */
|
||||
virtual void setWindowName(const std::string& /*name*/) { osg::notify(osg::NOTICE)<<"GraphicsWindow::setWindowName(..) not implemented."<<std::endl; }
|
||||
|
||||
/** Return the name of the window */
|
||||
virtual std::string getWindowName() { return _traits.valid() ? _traits->windowName : ""; }
|
||||
|
||||
/** Switch on/off the cursor.*/
|
||||
virtual void useCursor(bool cursorOn) { setCursor(cursorOn ? InheritCursor : NoCursor); }
|
||||
|
||||
|
||||
@@ -78,6 +78,9 @@ class OSGVIEWER_EXPORT GraphicsWindowWin32 : public osgViewer::GraphicsWindow
|
||||
|
||||
/** Override from GUIActionAdapter.*/
|
||||
virtual void requestWarpPointer(float x,float y);
|
||||
|
||||
/** Set the name of the window */
|
||||
virtual void setWindowName(const std::string& /*name*/);
|
||||
|
||||
/** Switch on/off the cursor.*/
|
||||
virtual void useCursor(bool /*cursorOn*/);
|
||||
|
||||
@@ -110,6 +110,9 @@ class OSGVIEWER_EXPORT GraphicsWindowX11 : public osgViewer::GraphicsWindow
|
||||
/** Set the window's position and size.*/
|
||||
virtual bool setWindowRectangleImplementation(int x, int y, int width, int height);
|
||||
|
||||
/** Set the name of the window */
|
||||
virtual void setWindowName(const std::string& name);
|
||||
|
||||
/** Set mouse cursor to a specific shape.*/
|
||||
virtual void setCursor(MouseCursor cursor);
|
||||
|
||||
@@ -144,6 +147,10 @@ class OSGVIEWER_EXPORT GraphicsWindowX11 : public osgViewer::GraphicsWindow
|
||||
Cursor getOrCreateCursor(MouseCursor mouseShape);
|
||||
|
||||
bool createVisualInfo();
|
||||
|
||||
bool createWindow();
|
||||
|
||||
bool setWindow(Window window);
|
||||
|
||||
void init();
|
||||
|
||||
@@ -164,6 +171,7 @@ class OSGVIEWER_EXPORT GraphicsWindowX11 : public osgViewer::GraphicsWindow
|
||||
|
||||
bool _initialized;
|
||||
bool _realized;
|
||||
bool _ownsWindow;
|
||||
|
||||
double _timeOfLastCheckEvents;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user