Repeat INSENSITIVE colors instead of relying on inheritance
[ardour.git] / libs / canvas / canvas / canvas.h
index c7054e4c01ec49b214ae44f4b1d1c01c152d87ad..b818c7eb4170ae38dee28d2fd13eba8a73d958fd 100644 (file)
@@ -59,7 +59,7 @@ class ScrollGroup;
  *  of screen pixels, with an origin of (0, 0) at the top left.  x increases
  *  rightwards and y increases downwards.
  */
-       
+
 class LIBCANVAS_API Canvas
 {
 public:
@@ -114,7 +114,7 @@ public:
 
         void scroll_to (Coord x, Coord y);
        void add_scroller (ScrollGroup& i);
-        
+
         virtual Rect  visible_area () const = 0;
         virtual Coord width () const = 0;
         virtual Coord height () const = 0;
@@ -137,7 +137,7 @@ public:
        Duple clamp_to_window (Duple const& winpos, Duple border = Duple());
 
         void zoomed();
-    
+
         std::string indent() const;
         std::string render_indent() const;
         void dump (std::ostream&) const;
@@ -153,7 +153,7 @@ public:
        /** Set the timeout used to display tooltips, in milliseconds
         */
        static void set_tooltip_timeout (uint32_t msecs);
-       
+
 protected:
        Root  _root;
         Color _bg_color;
@@ -172,6 +172,7 @@ class LIBCANVAS_API GtkCanvas : public Canvas, public Gtk::EventBox
 {
 public:
        GtkCanvas ();
+       ~GtkCanvas () { _in_dtor = true ; }
 
        void request_redraw (Rect const &);
        void request_size (Duple);
@@ -205,12 +206,12 @@ protected:
        bool on_motion_notify_event (GdkEventMotion *);
         bool on_enter_notify_event (GdkEventCrossing*);
         bool on_leave_notify_event (GdkEventCrossing*);
-       
+
        bool button_handler (GdkEventButton *);
        bool motion_notify_handler (GdkEventMotion *);
         bool deliver_event (GdkEvent *);
         void deliver_enter_leave (Duple const & point, int state);
-    
+
         void pick_current_item (int state);
         void pick_current_item (Duple const &, int state);
 
@@ -228,7 +229,7 @@ private:
        Item * _grabbed_item;
         /** the item that currently has key focus or 0 */
        Item * _focused_item;
-       
+
        bool _single_exposure;
 
        sigc::connection tooltip_timeout_connection;
@@ -238,10 +239,12 @@ private:
        bool show_tooltip ();
        void hide_tooltip ();
        bool really_start_tooltip_timeout ();
+
+       bool _in_dtor;
 };
 
 /** A GTK::Alignment with a GtkCanvas inside it plus some Gtk::Adjustments for
- *   scrolling. 
+ *   scrolling.
  *
  * This provides a GtkCanvas that can be scrolled. It does NOT implement the
  * Gtk::Scrollable interface.