ardour
bundle_manager.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2007 Paul Davis
3 
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.
8 
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.
13 
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.
17 
18 */
19 
20 #ifndef __ardour_ui_bundle_manager_h__
21 #define __ardour_ui_bundle_manager_h__
22 
23 #include <gtkmm/entry.h>
24 #include <gtkmm/liststore.h>
25 #include <gtkmm/treeview.h>
26 
27 #include "ardour/user_bundle.h"
28 
29 #include "ardour_dialog.h"
30 #include "port_matrix.h"
31 
32 namespace ARDOUR {
33  class Session;
34  class Bundle;
35 }
36 
38 {
39  public:
41 
42  void set_state (ARDOUR::BundleChannel c[2], bool s);
44 
46 
52  void setup_ports (int);
53  bool list_is_global (int) const;
54 
55  std::string disassociation_verb () const;
56 
57  private:
58  enum {
59  OTHER = 0,
60  OURS = 1
61  };
62 
65 };
66 
67 class BundleEditor : public ArdourDialog
68 {
69  public:
71 
72  protected:
73  void on_map ();
74 
75  private:
76  void name_changed ();
78  void on_show ();
79 
82  Gtk::Entry _name;
83  Gtk::ComboBoxText _input_or_output;
84 };
85 
87 {
88  public:
90 
91  private:
92 
93  void new_clicked ();
94  void edit_clicked ();
95  void delete_clicked ();
98  void set_button_sensitivity ();
99  void row_activated (Gtk::TreeModel::Path const & p, Gtk::TreeViewColumn* c);
100 
101  class ModelColumns : public Gtk::TreeModelColumnRecord
102  {
103  public:
105  add (name);
106  add (bundle);
107  }
108 
109  Gtk::TreeModelColumn<std::string> name;
110  Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::UserBundle> > bundle;
111  };
112 
113  Gtk::TreeView _tree_view;
114  Glib::RefPtr<Gtk::ListStore> _list_model;
116  Gtk::Button edit_button;
117  Gtk::Button delete_button;
119 };
120 
122 {
123 public:
126 
127  std::string get_name () const;
128 
129 private:
130 
131  void setup ();
132 
134  Gtk::Entry _name;
135  bool _adding;
136 };
137 
138 #endif
void rename_channel(ARDOUR::BundleChannel)
void input_or_output_changed()
void add_channel(boost::shared_ptr< ARDOUR::Bundle >, ARDOUR::DataType)
void bundle_changed(ARDOUR::Bundle::Change, boost::shared_ptr< ARDOUR::UserBundle >)
boost::shared_ptr< ARDOUR::UserBundle > _bundle
bool can_add_channels(boost::shared_ptr< ARDOUR::Bundle >) const
std::string get_name() const
ModelColumns _list_model_columns
boost::shared_ptr< ARDOUR::Bundle > _bundle
PortMatrixNode::State get_state(ARDOUR::BundleChannel c[2]) const
Gtk::TreeModelColumn< std::string > name
Gtk::Button delete_button
PBD::ScopedConnectionList bundle_connections
Glib::RefPtr< Gtk::ListStore > _list_model
void remove_channel(ARDOUR::BundleChannel)
void set_state(ARDOUR::BundleChannel c[2], bool s)
bool list_is_global(int) const
void row_activated(Gtk::TreeModel::Path const &p, Gtk::TreeViewColumn *c)
BundleEditorMatrix _matrix
Definition: amp.h:29
std::string disassociation_verb() const
BundleManager(ARDOUR::Session *)
Gtk::TreeModelColumn< boost::shared_ptr< ARDOUR::UserBundle > > bundle
BundleEditor(ARDOUR::Session *, boost::shared_ptr< ARDOUR::UserBundle >)
Gtk::ComboBoxText _input_or_output
bool can_rename_channels(boost::shared_ptr< ARDOUR::Bundle >) const
Gtk::Entry _name
Gtk::TreeView _tree_view
void add_bundle(boost::shared_ptr< ARDOUR::Bundle >)
Gtk::Button edit_button
boost::shared_ptr< ARDOUR::Bundle > _bundle
void set_button_sensitivity()
BundleEditorMatrix(Gtk::Window *, ARDOUR::Session *, boost::shared_ptr< ARDOUR::Bundle >)
boost::shared_ptr< PortGroup > _port_group
bool can_remove_channels(boost::shared_ptr< ARDOUR::Bundle >) const