25 #include <gtkmm/table.h>
26 #include <gtkmm/stock.h>
27 #include <gtkmm/messagedialog.h>
44 , _initial_name (g->
name ())
45 , _active (
_(
"Active"))
47 , _relative (
_(
"Relative"))
49 , _solo (
_(
"Soloing"))
50 , _rec_enable (
_(
"Record enable"))
51 , _select (
_(
"Selection"))
52 , _route_active (
_(
"Active state"))
53 , _share_color (
_(
"Color"))
54 , _share_monitoring (
_(
"Monitoring"))
57 set_skip_taskbar_hint (
true);
59 set_name (
N_(
"RouteGroupDialog"));
61 VBox* main_vbox = manage (
new VBox);
64 get_vbox()->set_spacing (4);
66 main_vbox->set_spacing (18);
67 main_vbox->set_border_width (5);
69 HBox* hbox = manage (
new HBox);
70 hbox->set_spacing (6);
71 l = manage (
new Label (
_(
"Name:"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER,
false ));
73 hbox->pack_start (*l,
false,
true);
74 hbox->pack_start (
_name,
true,
true);
76 VBox* top_vbox = manage (
new VBox);
77 top_vbox->set_spacing (4);
79 top_vbox->pack_start (*hbox,
false,
true);
82 l = manage (
new Label (
_(
"Color"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER,
false));
83 hbox = manage (
new HBox);
84 hbox->set_spacing (12);
85 hbox->pack_start (*l,
false,
false);
86 hbox->pack_start (
_color,
false,
false);
87 top_vbox->pack_start (*hbox,
false,
false);
89 main_vbox->pack_start (*top_vbox,
false,
false);
97 VBox* options_box = manage (
new VBox);
98 options_box->set_spacing (6);
100 l = manage (
new Label (
_(
"<b>Sharing</b>"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER,
false ));
101 l->set_use_markup ();
102 options_box->pack_start (*l,
false,
true);
125 _name.signal_activate ().connect (sigc::bind (sigc::mem_fun (*
this, &Dialog::response), RESPONSE_OK));
141 Table* table = manage (
new Table (11, 4,
false));
142 table->set_row_spacings (6);
144 l = manage (
new Label (
"", Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER,
false));
145 l->set_padding (8, 0);
146 table->attach (*l, 0, 1, 0, 8, Gtk::FILL, Gtk::FILL, 0, 0);
148 table->attach (
_gain, 1, 3, 1, 2, Gtk::FILL, Gtk::FILL, 0, 0);
150 l = manage (
new Label (
"", Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER,
false));
151 l->set_padding (0, 0);
152 table->attach (*l, 1, 2, 2, 3, Gtk::FILL, Gtk::FILL, 0, 0);
153 table->attach (
_relative, 2, 3, 2, 3, Gtk::FILL, Gtk::FILL, 0, 0);
155 table->attach (
_mute, 1, 3, 3, 4, Gtk::FILL, Gtk::FILL, 0, 0);
156 table->attach (
_solo, 1, 3, 4, 5, Gtk::FILL, Gtk::FILL, 0, 0);
157 table->attach (
_rec_enable, 1, 3, 5, 6, Gtk::FILL, Gtk::FILL, 0, 0);
158 table->attach (
_select, 1, 3, 6, 7, Gtk::FILL, Gtk::FILL, 0, 0);
159 table->attach (
_route_active, 1, 3, 7, 8, Gtk::FILL, Gtk::FILL, 0, 0);
160 table->attach (
_share_color, 1, 3, 8, 9, Gtk::FILL, Gtk::FILL, 0, 0);
163 options_box->pack_start (*table,
false,
true);
164 main_vbox->pack_start (*options_box,
false,
true);
166 get_vbox()->pack_start (*main_vbox,
false,
false);
171 add_button (Stock::CANCEL, RESPONSE_CANCEL);
172 add_button (Stock::NEW, RESPONSE_OK);
173 set_default_response (RESPONSE_OK);
175 add_button (Stock::CLOSE, RESPONSE_CLOSE);
176 set_default_response (RESPONSE_CLOSE);
179 show_all_children ();
187 int const r = run ();
188 if (r == Gtk::RESPONSE_CANCEL) {
190 return Gtk::RESPONSE_CANCEL;
200 _(
"The group name is not unique. Please use a different name."),
246 if (name.empty())
return false;
248 list<RouteGroup*>::iterator i = route_groups.begin ();
249 while (i != route_groups.end() && ((*i)->name() != name || *i ==
_group)) {
253 return (i == route_groups.end ());
Session & session() const
bool unique_name(std::string const name) const
static void set_group_color(ARDOUR::RouteGroup *, uint32_t)
Gtk::CheckButton _rec_enable
Gtk::CheckButton _route_active
RouteGroupDialog(ARDOUR::RouteGroup *, bool)
LIBARDOUR_API PBD::PropertyDescriptor< bool > gain
Gtk::CheckButton _share_color
virtual bool apply_changes(PropertyBase const &)
uint32_t gdk_color_to_rgba(Gdk::Color const &)
void set_color_from_rgba(Gdk::Color &, uint32_t)
std::list< RouteGroup * > const & route_groups() const
Gtk::CheckButton _relative
LIBARDOUR_API PBD::PropertyDescriptor< bool > recenable
LIBARDOUR_API PBD::PropertyDescriptor< bool > route_active
virtual bool set_name(const std::string &str)
bool is_route_active() const
bool is_recenable() const
std::string _initial_name
LIBARDOUR_API PBD::PropertyDescriptor< bool > mute
LIBARDOUR_API PBD::PropertyDescriptor< bool > active
LIBARDOUR_API std::string bump_name_number(const std::string &s)
bool is_monitoring() const
static uint32_t group_color(ARDOUR::RouteGroup *)
LIBARDOUR_API PBD::PropertyDescriptor< bool > solo
LIBARDOUR_API PBD::PropertyDescriptor< bool > relative
ARDOUR::RouteGroup * _group
LIBARDOUR_API PBD::PropertyDescriptor< bool > select
Gtk::CheckButton _share_monitoring
bool add(PropertyBase *prop)
LIBARDOUR_API PBD::PropertyDescriptor< bool > color
LIBARDOUR_API PBD::PropertyDescriptor< bool > monitoring