2 Copyright (C) 2007 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __ardour_ui_bundle_manager_h__
21 #define __ardour_ui_bundle_manager_h__
23 #include <gtkmm/treeview.h>
24 #include <gtkmm/liststore.h>
25 #include "ardour_dialog.h"
26 #include "port_matrix.h"
33 class BundleEditorMatrix : public PortMatrix
36 BundleEditorMatrix (ARDOUR::Session &, boost::shared_ptr<ARDOUR::Bundle>);
38 void set_state (int, std::string const &, bool);
39 bool get_state (int, std::string const &) const;
40 uint32_t n_rows () const;
41 uint32_t maximum_rows () const;
42 uint32_t minimum_rows () const;
43 std::string row_name (int) const;
45 void remove_row (int);
46 std::string row_descriptor () const;
50 boost::shared_ptr<ARDOUR::UserBundle> _bundle;
53 class BundleEditor : public ArdourDialog
56 BundleEditor (ARDOUR::Session &, boost::shared_ptr<ARDOUR::UserBundle>, bool);
63 void input_or_output_changed ();
66 BundleEditorMatrix _matrix;
67 boost::shared_ptr<ARDOUR::UserBundle> _bundle;
69 Gtk::ComboBoxText _input_or_output;
70 Gtk::ComboBoxText _type;
73 class BundleManager : public ArdourDialog
76 BundleManager (ARDOUR::Session &);
82 void delete_clicked ();
83 void add_bundle (boost::shared_ptr<ARDOUR::Bundle>);
84 void bundle_name_changed (boost::shared_ptr<ARDOUR::UserBundle>);
85 void set_button_sensitivity ();
87 class ModelColumns : public Gtk::TreeModelColumnRecord
95 Gtk::TreeModelColumn<Glib::ustring> name;
96 Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::UserBundle> > bundle;
99 Gtk::TreeView _tree_view;
100 Glib::RefPtr<Gtk::ListStore> _list_model;
101 ModelColumns _list_model_columns;
102 ARDOUR::Session& _session;
103 Gtk::Button edit_button;
104 Gtk::Button delete_button;