Added setWindowRectangle implementation for GraphicsWindowWin32, and
place holder for setWindowRectangle implementation for GraphicsWindowCarbon.
This commit is contained in:
@@ -81,6 +81,9 @@ class GraphicsWindowCarbon : public osgViewer::GraphicsWindow
|
||||
/** Check to see if any events have been generated.*/
|
||||
virtual void checkEvents();
|
||||
|
||||
/** Set the window's position and size.*/
|
||||
virtual void setWindowRectangle(int x, int y, int width, int height);
|
||||
|
||||
/** Set Window decoration.*/
|
||||
virtual void setWindowDecoration(bool flag);
|
||||
|
||||
|
||||
@@ -60,6 +60,9 @@ class GraphicsWindowWin32 : public osgViewer::GraphicsWindow
|
||||
/** Check to see if any events have been generated.*/
|
||||
virtual void checkEvents();
|
||||
|
||||
/** Set the window's position and size.*/
|
||||
virtual void setWindowRectangle(int x, int y, int width, int height);
|
||||
|
||||
/** Set Window decoration.*/
|
||||
virtual void setWindowDecoration(bool flag);
|
||||
|
||||
|
||||
@@ -1060,6 +1060,11 @@ void GraphicsWindowCarbon::checkEvents()
|
||||
}
|
||||
|
||||
|
||||
void GraphicsWindowCarbon::setWindowRectangle(int x, int y, int width, int height)
|
||||
{
|
||||
// TODO: implement
|
||||
osg::notify(osg::NOTICE)<<"GraphicsWindowCarbon::setWindowRectangle(..) not implemented."<<std::endl;
|
||||
}
|
||||
|
||||
void GraphicsWindowCarbon::grabFocus()
|
||||
{
|
||||
|
||||
@@ -1708,6 +1708,14 @@ void GraphicsWindowWin32::requestWarpPointer( float x, float y )
|
||||
getEventQueue()->mouseWarped(x,y);
|
||||
}
|
||||
|
||||
void GraphicsWindowWin32::setWindowRectangle(int x, int y, int width, int height)
|
||||
{
|
||||
if (!::SetWindowPos(_hwnd, HWND_TOP, x, y, width, height, SWP_SHOWWINDOW | SWP_FRAMECHANGED))
|
||||
{
|
||||
reportErrorForScreen("GraphicsWindowWin32::setWindowRectangle() - Unable to set new window position and size", _traits->screenNum, ::GetLastError());
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsWindowWin32::useCursor( bool cursorOn )
|
||||
{
|
||||
_traits->useCursor = cursorOn;
|
||||
|
||||
Reference in New Issue
Block a user