/*
- 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() {
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: