Allow strips to add or remove personal sends
[ardour.git] / gtk2_ardour / processor_selection.h
index a7d10894e972255480bd02c4a4ac485c9d3a4836..7de1c4735e2370a2f8fc6139aa89b6400009a6f4 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2000-2007 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
 #ifndef __ardour_gtk_processor_selection_h__
 #define __ardour_gtk_processor_selection_h__
 
+#include <vector>
+
+#include "pbd/signals.h"
 #include "pbd/xml++.h"
 
-class ProcessorSelection {
+class XMLProcessorSelection {
   public:
-    ProcessorSelection() : node (0) {}
-    ~ProcessorSelection() { if (node) { delete node; } }
-
-    void set (XMLNode* n) {
-           if (node) {
-                   delete node;
-           }
-           node = n;
-    }
-
-    void add (XMLNode* newchild) {
-           if (!node) {
-                   node = new XMLNode ("add");
-           }
-           node->add_child_nocopy (*newchild);
-    }
-
-    void clear () { 
-           if (node) { 
-                   delete node;
-                   node = 0;
-           }
-    }
-
-    bool empty () const { return node == 0 || node->children().empty(); }
-           
-    const XMLNode& get_node() const { return *node; }
+       XMLProcessorSelection() : node (0) {}
+       ~XMLProcessorSelection() { if (node) { delete node; } }
+
+       void set (XMLNode* n) {
+               if (node) {
+                       delete node;
+               }
+               node = n;
+       }
+
+       void add (XMLNode* newchild) {
+               if (!node) {
+                       node = new XMLNode ("add");
+               }
+               node->add_child_nocopy (*newchild);
+       }
+
+       void clear () {
+               if (node) {
+                       delete node;
+                       node = 0;
+               }
+       }
+
+       bool empty () const { return node == 0 || node->children().empty(); }
+
+       const XMLNode& get_node() const { return *node; }
 
   private:
-    XMLNode* node;
+       XMLNode* node;
+};
+
+class ProcessorSelection : public PBD::ScopedConnectionList, public sigc::trackable
+{
+  public:
+       ProcessorSelection () {}
+
+       XMLProcessorSelection processors;
+       sigc::signal<void> ProcessorsChanged;
+
+
+       void clear ();
+       bool empty();
+
+       void set (XMLNode* node);
+       void add (XMLNode* node);
+
+       void clear_processors ();
+
+       private:
+       ProcessorSelection& operator= (const ProcessorSelection& other);
+       ProcessorSelection (ProcessorSelection const&);
 };
 
+bool operator==(const ProcessorSelection& a, const ProcessorSelection& b);
+
 #endif /* __ardour_gtk_processor_selection_h__ */