compilable version of WindowProxy
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 3 Jul 2015 19:06:59 +0000 (15:06 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 22 Feb 2016 20:31:21 +0000 (15:31 -0500)
libs/gtkmm2ext/gtkmm2ext/window_proxy.h
libs/gtkmm2ext/window_proxy.cc

index 3ec208092800e5b45e1ad9e5ef78c324ef433e7c..aefe38a07fbb9c7058b81ac603250fb19aeb4387 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #ifndef __gtkmm2ext_window_proxy_h__
+#define __gtkmm2ext_window_proxy_h__
 
 #include <string>
 #include <gdkmm/event.h>
@@ -40,6 +41,7 @@ class VisibilityTracker;
 class LIBGTKMM2EXT_API WindowProxy : public virtual sigc::trackable
 {
   public:
+       WindowProxy ();
        WindowProxy (const std::string& name, const std::string& menu_name);
        WindowProxy (const std::string& name, const std::string& menu_name, const XMLNode&);
        virtual ~WindowProxy();
@@ -51,6 +53,7 @@ class LIBGTKMM2EXT_API WindowProxy : public virtual sigc::trackable
        void maybe_show ();
     
        bool visible() const { return _visible; }
+       bool not_visible() const { return !_visible; }
        const std::string& name() const { return _name; }
        const std::string& menu_name() const { return _menu_name; }
     
@@ -65,7 +68,7 @@ class LIBGTKMM2EXT_API WindowProxy : public virtual sigc::trackable
     
        virtual void toggle ();
     
-       virtual void set_state (const XMLNode&);
+       virtual int set_state (const XMLNode&);
        virtual XMLNode& get_state () const;
     
        operator bool() const { return _window != 0; }
index b01fc6c62850b0395ef5fbca99036f899d80599e..08dd2aedb0a1977c8466e57f246aec34d0132210 100644 (file)
@@ -32,6 +32,17 @@ using namespace Gtk;
 using namespace Gtkmm2ext;
 using namespace PBD;
 
+WindowProxy::WindowProxy ()
+       : _window (0)
+       , _visible (false)
+       , _x_off (-1)
+       , _y_off (-1)
+       , _width (-1)
+       , _height (-1) 
+       , vistracker (0)
+{
+}
+
 WindowProxy::WindowProxy (const std::string& name, const std::string& menu_name)
        : _name (name)
        , _menu_name (menu_name)
@@ -65,7 +76,7 @@ WindowProxy::~WindowProxy ()
        delete _window;
 }
 
-void
+int
 WindowProxy::set_state (const XMLNode& node)
 {
        XMLNodeList children = node.children ();
@@ -114,6 +125,8 @@ WindowProxy::set_state (const XMLNode& node)
        if (_window) {
                setup ();
        }
+
+       return 0;
 }
 
 void