Add Zoom/Expand icon
[ardour.git] / libs / gtkmm2ext / gtkmm2ext / window_proxy.h
index c5949701d9369100a3bbc85f71f3ce4fee3c8622..2aa7aec6f2320e715ae4de7b8b4577b454fc55e8 100644 (file)
@@ -69,10 +69,21 @@ class LIBGTKMM2EXT_API WindowProxy : public PBD::StatefulDestructible, public vi
        virtual int set_state (const XMLNode&, int version);
        virtual XMLNode& get_state ();
 
+       enum StateMask {
+               Position = 0x1,
+               Size = 0x2
+       };
+
+       void set_state_mask (StateMask);
+       StateMask state_mask () const { return _state_mask; }
+
        operator bool() const { return _window != 0; }
 
        static std::string xml_node_name();
 
+       sigc::signal0<void> signal_map;
+       sigc::signal0<void> signal_unmap;
+
   protected:
        std::string  _name;
        std::string  _menu_name;
@@ -84,13 +95,21 @@ class LIBGTKMM2EXT_API WindowProxy : public PBD::StatefulDestructible, public vi
        mutable int  _width; ///< width
        mutable int  _height; ///< height
        Gtkmm2ext::VisibilityTracker* vistracker;
+       StateMask _state_mask;
+       sigc::connection delete_connection;
+       sigc::connection configure_connection;
+       sigc::connection map_connection;
+       sigc::connection unmap_connection;
+
 
        void save_pos_and_size ();
        void set_pos_and_size ();
        void set_pos ();
 
        virtual bool delete_event_handler (GdkEventAny *ev);
-
+       virtual bool configure_handler (GdkEventConfigure*);
+       void map_handler ();
+       void unmap_handler ();
        virtual void setup ();
        void toggle ();
 };