diff --git a/include/osgWidget/WindowManager b/include/osgWidget/WindowManager index 1a70a1b87..3a77c2a69 100644 --- a/include/osgWidget/WindowManager +++ b/include/osgWidget/WindowManager @@ -305,8 +305,6 @@ class OSGWIDGET_EXPORT WindowManager: public osg::Switch, public UIObjectParent< point_type _height; point_type _windowWidth; point_type _windowHeight; - matrix_type _numForeground; - matrix_type _numBackground; unsigned int _flags; unsigned int _nodeMask; osgViewer::View* _view; diff --git a/src/osgWidget/Frame.cpp b/src/osgWidget/Frame.cpp index 2cd944ba5..e1d04ccb8 100644 --- a/src/osgWidget/Frame.cpp +++ b/src/osgWidget/Frame.cpp @@ -165,13 +165,14 @@ bool Frame::Border::mouseDrag(double x, double y, const WindowManager* wm) } Frame::Frame(const std::string& name, unsigned int flags): -Table (name, 3, 3), -_flags (flags) + Table (name, 3, 3), + _flags (flags) { } Frame::Frame(const Frame& frame, const osg::CopyOp& co): -Table(frame, co) + Table(frame, co), + _flags(frame._flags) { } diff --git a/src/osgWidget/Window.cpp b/src/osgWidget/Window.cpp index 14d1bd655..a729f41b4 100644 --- a/src/osgWidget/Window.cpp +++ b/src/osgWidget/Window.cpp @@ -139,20 +139,21 @@ void Window::EmbeddedWindow::updateSizeFromWindow() { } Window::Window(const std::string& name): -_parent (0), -_wm (0), -_index (0), -_x (0.0f), -_y (0.0f), -_z (0.0f), -_zRange (0.0f), -_strata (STRATA_NONE), -_vis (VM_FULL), -_r (0.0f), -_s (1.0f), -_scaleDenom (100.0f), -_vAnchor (VA_NONE), -_hAnchor (HA_NONE) { + _parent (0), + _wm (0), + _index (0), + _x (0.0f), + _y (0.0f), + _z (0.0f), + _zRange (0.0f), + _strata (STRATA_NONE), + _vis (VM_FULL), + _r (0.0f), + _s (1.0f), + _scaleDenom (100.0f), + _vAnchor (VA_NONE), + _hAnchor (HA_NONE) +{ _name = name.size() ? name : generateRandomName("Window"); // TODO: Fix the "bg" name. @@ -177,25 +178,27 @@ _hAnchor (HA_NONE) { } Window::Window(const Window& window, const osg::CopyOp& co): -MatrixTransform (window, co), -EventInterface (window), -StyleInterface (window), -_parent (0), -_wm (0), -_x (window._x), -_y (window._y), -_z (window._z), -_zRange (window._zRange), -_strata (window._strata), -_vis (window._vis), -_r (window._r), -_s (window._s), -_scaleDenom (window._scaleDenom), -_width (window._width), -_height (window._height), -_vAnchor (window._vAnchor), -_hAnchor (window._hAnchor), -_visibleArea (window._visibleArea) { + MatrixTransform (window, co), + EventInterface (window), + StyleInterface (window), + _parent (0), + _wm (0), + _index (0), + _x (window._x), + _y (window._y), + _z (window._z), + _zRange (window._zRange), + _strata (window._strata), + _vis (window._vis), + _r (window._r), + _s (window._s), + _scaleDenom (window._scaleDenom), + _width (window._width), + _height (window._height), + _vAnchor (window._vAnchor), + _hAnchor (window._hAnchor), + _visibleArea (window._visibleArea) +{ // Construct our vector of Widgets for easier use. :) // TODO: I almost certainly will need to use the getPosition() thing here eventually // for things to work 100% properly. For example, some Geodes may contain labels, diff --git a/src/osgWidget/WindowManager.cpp b/src/osgWidget/WindowManager.cpp index 9f3520a34..ea605ad2a 100644 --- a/src/osgWidget/WindowManager.cpp +++ b/src/osgWidget/WindowManager.cpp @@ -25,8 +25,6 @@ _width (width), _height (height), _windowWidth (width), _windowHeight (height), -_numForeground (0.0f), -_numBackground (0.0f), _flags (flags), _nodeMask (nodeMask), _view (view), @@ -89,10 +87,31 @@ _styleManager (new StyleManager()) { } WindowManager::WindowManager(const WindowManager& wm, const osg::CopyOp& co): -osg::Switch(wm, co) { + osg::Switch(wm, co), + _width (wm._width), + _height (wm._height), + _windowWidth (wm._width), + _windowHeight (wm._height), + _flags (wm._flags), + _nodeMask (wm._nodeMask), + _view (wm._view), + _lastX (0.0f), + _lastY (0.0f), + _lastEvent (0), + _lastPush (0), + _lastVertical (PD_NONE), + _lastHorizontal (PD_NONE), + _focusMode (PFM_FOCUS), + _leftDown (false), + _middleDown (false), + _rightDown (false), + _scrolling (osgGA::GUIEventAdapter::SCROLL_NONE), + _styleManager (new StyleManager()) +{ } -WindowManager::~WindowManager() { +WindowManager::~WindowManager() +{ if(_flags & WM_USE_LUA) _lua->close(); if(_flags & WM_USE_PYTHON) _python->close();