OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SingleWindow.h
Go to the documentation of this file.
1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2  *
3  * This library is open source and may be redistributed and/or modified under
4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5  * (at your option) any later version. The full license is in LICENSE file
6  * included with this distribution, and on the openscenegraph.org website.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * OpenSceneGraph Public License for more details.
12 */
13 
14 #ifndef OSGVIEWER_SingleWindow
15 #define OSGVIEWER_SingleWindow 1
16 
17 #include <osgViewer/View>
18 
19 namespace osgViewer {
20 
23 {
24  public:
25 
26  SingleWindow():_x(0),_y(0),_width(-1),_height(-1),_screenNum(0),_windowDecoration(true),_overrideRedirect(false) {}
27  SingleWindow(int x, int y, int width, int height, unsigned int screenNum=0):_x(x),_y(y),_width(width),_height(height),_screenNum(screenNum),_windowDecoration(true),_overrideRedirect(false) {}
28  SingleWindow(const SingleWindow& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):ViewConfig(rhs,copyop), _x(rhs._x),_y(rhs._y),_width(rhs._width),_height(rhs._height),_screenNum(rhs._screenNum),_windowDecoration(rhs._windowDecoration), _overrideRedirect(rhs._overrideRedirect) {}
29 
31 
32  virtual void configure(osgViewer::View& view) const;
33 
34  void setX(int x) { _x = x; }
35  int getX() const { return _x; }
36 
37  void setY(int y) { _y = y; }
38  int getY() const { return _y; }
39 
40  void setWidth(int w) { _width = w; }
41  int getWidth() const { return _width; }
42 
43  void setHeight(int h) { _height = h; }
44  int getHeight() const { return _height; }
45 
46  void setScreenNum(unsigned int sn) { _screenNum = sn; }
47  unsigned int getScreenNum() const { return _screenNum; }
48 
49  void setWindowDecoration(bool wd) { _windowDecoration = wd; }
50  bool getWindowDecoration() const { return _windowDecoration; }
51 
52  void setOverrideRedirect(bool override) { _overrideRedirect = override; }
53  bool getOverrideRedirect() const { return _overrideRedirect; }
54 
55  protected:
56 
57  int _x, _y, _width, _height;
58  unsigned int _screenNum;
61 };
62 
63 }
64 
65 #endif
bool getWindowDecoration() const
Definition: SingleWindow.h:50
#define OSGVIEWER_EXPORT
Definition: Export.h:40
void setOverrideRedirect(bool override)
Definition: SingleWindow.h:52
int getHeight() const
Definition: SingleWindow.h:44
unsigned int getScreenNum() const
Definition: SingleWindow.h:47
void setWindowDecoration(bool wd)
Definition: SingleWindow.h:49
#define META_Object(library, name)
Definition: Object.h:42
GLint GLenum GLsizei width
Definition: GLU.h:71
SingleWindow(int x, int y, int width, int height, unsigned int screenNum=0)
Definition: SingleWindow.h:27
bool getOverrideRedirect() const
Definition: SingleWindow.h:53
GLint GLenum GLsizei GLsizei height
Definition: GLU.h:71
void setScreenNum(unsigned int sn)
Definition: SingleWindow.h:46
unsigned int _screenNum
Definition: SingleWindow.h:58
SingleWindow(const SingleWindow &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Definition: SingleWindow.h:28