From 85eee3b09dd53f6f5d1803f2b585270ab535e16f Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 3 Jul 2015 15:06:59 -0400 Subject: [PATCH] compilable version of WindowProxy --- libs/gtkmm2ext/gtkmm2ext/window_proxy.h | 5 ++++- libs/gtkmm2ext/window_proxy.cc | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/libs/gtkmm2ext/gtkmm2ext/window_proxy.h b/libs/gtkmm2ext/gtkmm2ext/window_proxy.h index 3ec2080928..aefe38a07f 100644 --- a/libs/gtkmm2ext/gtkmm2ext/window_proxy.h +++ b/libs/gtkmm2ext/gtkmm2ext/window_proxy.h @@ -18,6 +18,7 @@ */ #ifndef __gtkmm2ext_window_proxy_h__ +#define __gtkmm2ext_window_proxy_h__ #include #include @@ -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; } diff --git a/libs/gtkmm2ext/window_proxy.cc b/libs/gtkmm2ext/window_proxy.cc index b01fc6c628..08dd2aedb0 100644 --- a/libs/gtkmm2ext/window_proxy.cc +++ b/libs/gtkmm2ext/window_proxy.cc @@ -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