adjust plugin-UI height when toggling expanders
[ardour.git] / gtk2_ardour / selectable.h
index fdd6f7ff9f1fc298a29e45ae60aab8f4cbede3cc..2ffac879291d46ea4767a564e22cdf4dbf71a3c6 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2004 Paul Davis 
+    Copyright (C) 2004 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
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #ifndef __ardour_gtk_selectable_h__
 #define __ardour_gtk_selectable_h__
 
-class Selectable 
+#include <sigc++/signal.h>
+
+class Selectable : public virtual sigc::trackable
 {
   public:
        Selectable() {
@@ -30,8 +31,14 @@ class Selectable
 
        virtual ~Selectable() {}
 
-       virtual void set_selected (bool) {
-               _selected = true;
+       virtual void set_selected (bool yn) {
+               if (yn != _selected) {
+                       _selected = yn;
+               }
+       }
+
+       virtual bool selected() const {
+               return _selected;
        }
 
   protected: