fix up big clock aspect ratio; fix color handling in audio clocks
[ardour.git] / gtk2_ardour / window_proxy.h
index e2b015c27b22758593339b1f14456ca2274c8f2c..10ff25ced652853f5c7b86913fe1270eeb4e5016 100755 (executable)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2010 Paul Davis 
+    Copyright (C) 2010 Paul Davis
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ class XMLNode;
  *  Subclasses of WindowProxy handle windows that are created in different
  *  ways.
  */
+
 class WindowProxyBase
 {
 public:
@@ -43,7 +43,7 @@ public:
        std::string name () const {
                return _name;
        }
-       
+
        void maybe_show ();
        XMLNode* get_state () const;
        void setup ();
@@ -51,15 +51,21 @@ public:
        /** Show this window */
        virtual void show () = 0;
 
+       /** @return true if the configuration for this window should be
+        *  global (ie across all sessions), otherwise false if it should
+        *  be session-specific.
+        */
+       virtual bool rc_configured () const = 0;
+
        virtual Gtk::Window* get_gtk_window () const = 0;
 
 private:
        XMLNode* state_node (bool, int, int, int, int) const;
-       
+
        std::string _name; ///< internal unique name for this window
        bool _visible; ///< true if the window should be visible on startup
        int _x_off; ///< x position
-       int _y_off; ///< y position 
+       int _y_off; ///< y position
        int _width; ///< width
        int _height; ///< height
 };
@@ -73,7 +79,7 @@ public:
                : WindowProxyBase (name, node)
                , _window (0)
        {
-               
+
        }
 
        Gtk::Window* get_gtk_window () const {
@@ -84,10 +90,12 @@ public:
                return _window;
        }
 
-       /** Set the window and set it up.  To be used after initial window creation */
-       void set (T* w) {
+       /** Set the window and maybe set it up.  To be used after initial window creation */
+       void set (T* w, bool s = true) {
                _window = w;
-               setup ();
+               if (s) {
+                       setup ();
+               }
        }
 
 private:
@@ -111,7 +119,7 @@ public:
                : WindowProxy<T> (name, node)
                , _action (action)
        {
-               
+
        }
 
        void show () {
@@ -124,6 +132,10 @@ public:
                }
        }
 
+       bool rc_configured () const {
+               return true;
+       }
+
 private:
        std::string _action;
 };