Ardour  8.12
add_route_dialog.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2017 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2005 Taybin Rutkin <taybin@taybin.com>
4  * Copyright (C) 2006-2014 David Robillard <d@drobilla.net>
5  * Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
6  * Copyright (C) 2014-2017 Robin Gareus <robin@gareus.org>
7  * Copyright (C) 2015 Nick Mainsbridge <mainsbridge@gmail.com>
8  * Copyright (C) 2017 Ben Loftis <ben@harrisonconsoles.com>
9  * Copyright (C) 2018 Len Ovens <len@ovenwerks.net>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; if not, write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25 
26 #ifndef __gtk_ardour_add_route_dialog_h__
27 #define __gtk_ardour_add_route_dialog_h__
28 
29 #include <string>
30 
31 #include <gtkmm/entry.h>
32 #include <gtkmm/dialog.h>
33 #include <gtkmm/frame.h>
34 #include <gtkmm/radiobutton.h>
35 #include <gtkmm/adjustment.h>
36 #include <gtkmm/spinbutton.h>
37 #include <gtkmm/button.h>
38 #include <gtkmm/combobox.h>
39 #include <gtkmm/comboboxtext.h>
40 #include <gtkmm/textview.h>
41 #include <gtkmm/treemodel.h>
42 #include <gtkmm/treeview.h>
43 #include <gtkmm/treestore.h>
44 #include <gtkmm/liststore.h>
45 #include <gtkmm/scrolledwindow.h>
46 
47 #include "ardour/plugin.h"
48 #include "ardour/types.h"
49 #include "ardour/template_utils.h"
50 #include "ardour/route_group.h"
51 
52 #include "ardour_dialog.h"
53 #include "instrument_selector.h"
54 #include "route_dialogs.h"
55 
56 class Editor;
57 class RouteGroupDialog;
58 
60 {
61 public:
64 
65  enum ResponseId {
66  Add,
68  };
69 
70  enum TypeWanted {
77  };
79 
81  uint32_t channel_count ();
82  int count ();
83 
84  std::string name_template () const;
85  bool name_template_is_default () const;
87 
90 
92  bool use_strict_io ();
93 
95 
96  std::string get_template_path ();
97 
99 
100 private:
120 
127  void group_changed ();
129  bool channel_separator (const Glib::RefPtr<Gtk::TreeModel>& m, const Gtk::TreeModel::iterator& i);
130  bool route_separator (const Glib::RefPtr<Gtk::TreeModel>& m, const Gtk::TreeModel::iterator& i);
133 
136  {
137  add (name);
138  add (path);
139  add (description);
140  add (modified_with);
141  }
142 
147  };
148 
150 
151  Glib::RefPtr<Gtk::TreeStore> trk_template_model;
153 
155 
159 
161  void on_show () override;
162  void on_response (int) override;
163 
164  struct ChannelSetup {
165  std::string name;
166  uint32_t channels;
167  };
168 
169  typedef std::vector<ChannelSetup> ChannelSetups;
171 
174 
175  static std::vector<std::pair<std::string, std::string>> builtin_types;
176  static std::vector<std::string> channel_combo_strings;
177  static std::vector<std::string> bus_mode_strings;
178 
180  void name_template_entry_insertion (Glib::ustring const&, int*);
182 };
183 
184 #endif /* __gtk_ardour_add_route_dialog_h__ */
Gtk::ComboBoxText route_group_combo
Gtk::ComboBoxText strict_io_combo
void new_group_dialog_finished(int, RouteGroupDialog *)
bool route_separator(const Glib::RefPtr< Gtk::TreeModel > &m, const Gtk::TreeModel::iterator &i)
bool name_template_is_default() const
void instrument_changed()
Gtk::Entry name_template_entry
void name_template_entry_deletion(int, int)
Gtk::Adjustment routes_adjustment
void group_changed()
std::string name_template() const
Gtk::Label name_label
Gtk::TreeView trk_template_chooser
Gtk::Frame trk_template_desc_frame
void refill_track_modes()
std::vector< ChannelSetup > ChannelSetups
static std::vector< std::pair< std::string, std::string > > builtin_types
bool use_strict_io()
bool channel_separator(const Glib::RefPtr< Gtk::TreeModel > &m, const Gtk::TreeModel::iterator &i)
Gtk::Label insert_label
uint32_t channel_count()
void reset_name_edited()
Gtk::TextView trk_template_desc
static std::vector< std::string > bus_mode_strings
void refill_channel_setups()
Gtk::Label manual_label
Gtk::Frame trk_template_outer_frame
static std::vector< std::string > channel_combo_strings
ARDOUR::TrackMode mode()
Gtk::ComboBoxText insert_at_combo
bool show_on_cue_page()
Gtk::ComboBoxText channel_combo
ARDOUR::PluginInfoPtr requested_instrument()
void on_response(int) override
This is a default handler for the signal signal_response().
Gtk::Label instrument_label
Gtk::Label add_label
void name_template_entry_insertion(Glib::ustring const &, int *)
Gtk::CheckButton show_on_cue_chkbox
void add_route_group(ARDOUR::RouteGroup *)
void trk_template_row_selected()
void channel_combo_changed()
void maybe_update_name_template_entry()
Gtk::Label configuration_label
ChannelSetups channel_setups
Gtk::Label group_label
InstrumentSelector instrument_combo
Gtk::Label mode_label
RouteDialogs::InsertAt insert_at()
void refill_route_groups()
TrackTemplateColumns track_template_columns
Gtk::ComboBoxText mode_combo
Glib::RefPtr< Gtk::TreeStore > trk_template_model
bool route_count_set_by_template
Gtk::Label strict_io_label
std::string get_template_path()
TypeWanted type_wanted()
ARDOUR::RouteGroup * route_group()
ARDOUR::ChanCount channels()
void track_type_chosen()
void on_show() override
This is a default handler for the signal signal_show().
std::string type_wanted_to_localized_string(TypeWanted type_wanted)
Gtk::SpinButton routes_spinner
Definition: editor.h:158
void add(TreeModelColumnBase &column)
std::shared_ptr< PluginInfo > PluginInfoPtr
Definition: plugin.h:66
Gtk::TreeModelColumn< std::string > modified_with
Gtk::TreeModelColumn< std::string > path
Gtk::TreeModelColumn< std::string > name
Gtk::TreeModelColumn< std::string > description