13
0

compilable version of WindowProxy

This commit is contained in:
Paul Davis 2015-07-03 15:06:59 -04:00
parent a29f76c1c4
commit 85eee3b09d
2 changed files with 18 additions and 2 deletions

View 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; }

View 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