2 Copyright (C) 2001 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.
21 #ifndef __gtk_ardour_option_editor_h__
22 #define __gtk_ardour_option_editor_h__
24 #include <gtkmm/notebook.h>
25 #include <gtkmm/checkbutton.h>
26 #include <gtkmm/table.h>
27 #include <gtkmm/entry.h>
28 #include <gtkmm/box.h>
29 #include <gtkmm/label.h>
30 #include <gtkmm/adjustment.h>
31 #include <gtkmm/scale.h>
32 #include <gtkmm/spinbutton.h>
33 #include <gtkmm/radiobutton.h>
34 #include <gtkmm/comboboxtext.h>
36 #include <ardour/session.h>
38 #include "ardour_dialog.h"
40 #include "audio_clock.h"
49 class OptionEditor : public ArdourDialog
52 OptionEditor (ARDOUR_UI&, PublicEditor&, Mixer_UI&);
55 void set_session (ARDOUR::Session *);
59 ARDOUR::Session *session;
64 Gtk::Notebook notebook;
68 void session_control_changed (ARDOUR::Session::ControlType);
69 void queue_session_control_changed (ARDOUR::Session::ControlType);
70 void map_some_session_state (Gtk::CheckButton& button, bool (ARDOUR::Session::*get)() const);
71 gint wm_close (GdkEventAny *);
72 void just_close_win();
73 bool focus_out_event_handler (GdkEventFocus*, void (OptionEditor::*pmf)());
77 Gtk::Table path_table;
79 Gtk::Entry session_raid_entry;
81 Gtk::ComboBoxText native_format_combo;
83 void setup_path_options();
84 void add_session_paths ();
85 void remove_session_paths ();
86 void native_format_chosen ();
87 void raid_path_changed ();
91 // Gtk::Table fade_table;
93 Gtk::VBox fade_packer;
94 Gtk::CheckButton auto_xfade_button;
95 Gtk::CheckButton xfade_active_button;
96 Gtk::Label layer_mode_label;
97 Gtk::ComboBoxText layer_mode_combo;
98 Gtk::Label xfade_model_label;
99 Gtk::ComboBoxText xfade_model_combo;
100 Gtk::Adjustment short_xfade_adjustment;
101 Gtk::HScale short_xfade_slider;
103 void auto_xfade_clicked ();
104 void xfade_active_clicked ();
105 void layer_mode_chosen ();
106 void xfade_model_chosen ();
107 void setup_fade_options();
108 void short_xfade_adjustment_changed ();
112 Gtk::VBox solo_packer;
113 Gtk::CheckButton solo_latched_button;
114 Gtk::CheckButton solo_via_bus_button;
116 void solo_latched_clicked();
117 void solo_via_bus_clicked ();
119 void setup_solo_options();
123 Gtk::VBox display_packer;
124 Gtk::CheckButton show_waveforms_button;
125 Gtk::CheckButton show_waveforms_recording_button;
126 Gtk::CheckButton mixer_strip_width_button;
127 Gtk::CheckButton show_measures_button;
128 Gtk::CheckButton follow_playhead_button;
129 Gtk::ComboBoxText meter_hold_combo;
130 Gtk::ComboBoxText meter_falloff_combo;
132 void setup_display_options();
133 void show_waveforms_clicked ();
134 void show_waveforms_recording_clicked ();
135 void show_measures_clicked ();
136 void strip_width_clicked ();
137 void follow_playhead_clicked ();
138 void meter_hold_chosen ();
139 void meter_falloff_chosen ();
141 void display_control_changed (Editing::DisplayControl);
145 Gtk::VBox sync_packer;
147 Gtk::CheckButton send_mtc_button;
148 Gtk::CheckButton send_mmc_button;
149 Gtk::CheckButton jack_time_master_button;
150 Gtk::ComboBoxText slave_type_combo;
151 Gtk::ComboBoxText smpte_fps_combo;
152 AudioClock smpte_offset_clock;
153 Gtk::CheckButton smpte_offset_negative_button;
155 void setup_sync_options ();
156 gint send_mtc_toggled (GdkEventButton*, Gtk::CheckButton*);
158 void slave_type_chosen ();
159 void jack_time_master_clicked ();
160 void jack_transport_master_clicked ();
161 void smpte_fps_chosen ();
162 void smpte_offset_chosen ();
163 void smpte_offset_negative_clicked ();
167 Gtk::VBox midi_packer;
168 Gtk::CheckButton midi_feedback_button;
169 Gtk::CheckButton midi_control_button;
170 Gtk::CheckButton mmc_control_button;
172 Gtk::RadioButton::Group mtc_button_group;
173 Gtk::RadioButton::Group mmc_button_group;
174 Gtk::RadioButton::Group midi_button_group;
176 void send_mmc_toggled (Gtk::CheckButton*);
177 void mmc_control_toggled (Gtk::CheckButton*);
178 void midi_control_toggled (Gtk::CheckButton*);
179 void midi_feedback_toggled (Gtk::CheckButton*);
181 gint port_online_toggled (GdkEventButton*,MIDI::Port*,Gtk::ToggleButton*);
182 gint port_trace_in_toggled (GdkEventButton*,MIDI::Port*,Gtk::ToggleButton*);
183 gint port_trace_out_toggled (GdkEventButton*,MIDI::Port*,Gtk::ToggleButton*);
185 gint mmc_port_chosen (GdkEventButton*,MIDI::Port*,Gtk::RadioButton*);
186 gint mtc_port_chosen (GdkEventButton*,MIDI::Port*,Gtk::RadioButton*);
187 gint midi_port_chosen (GdkEventButton*,MIDI::Port*,Gtk::RadioButton*);
189 void map_port_online (MIDI::Port*, Gtk::ToggleButton*);
191 void setup_midi_options();
199 std::map<MIDI::Port*,std::vector<Gtk::RadioButton*> > port_toggle_buttons;
203 IOSelector* click_io_selector;
204 GainMeter* click_gpm;
205 PannerUI* click_panner;
206 Gtk::VBox click_packer;
207 Gtk::Table click_table;
208 Gtk::Entry click_path_entry;
209 Gtk::Entry click_emphasis_path_entry;
210 Gtk::Button click_browse_button;
211 Gtk::Button click_emphasis_browse_button;
213 void setup_click_editor ();
214 void clear_click_editor ();
216 void click_chosen (std::string paths);
217 void click_emphasis_chosen (std::string paths);
219 void click_browse_clicked ();
220 void click_emphasis_browse_clicked ();
222 void click_sound_changed ();
223 void click_emphasis_sound_changed ();
227 Gtk::VBox audition_packer;
228 Gtk::HBox audition_hpacker;
229 Gtk::Label audition_label;
230 IOSelector* auditioner_io_selector;
231 GainMeter* auditioner_gpm;
232 PannerUI* auditioner_panner;
234 void setup_auditioner_editor ();
235 void clear_auditioner_editor ();
236 void connect_audition_editor ();
240 Gtk::Table keyboard_mouse_table;
241 Gtk::ComboBoxText edit_modifier_combo;
242 Gtk::ComboBoxText delete_modifier_combo;
243 Gtk::ComboBoxText snap_modifier_combo;
244 Gtk::Adjustment delete_button_adjustment;
245 Gtk::SpinButton delete_button_spin;
246 Gtk::Adjustment edit_button_adjustment;
247 Gtk::SpinButton edit_button_spin;
249 void setup_keyboard_options ();
250 void delete_modifier_chosen ();
251 void edit_modifier_chosen ();
252 void snap_modifier_chosen ();
253 void edit_button_changed ();
254 void delete_button_changed ();
258 Gtk::VBox misc_packer;
260 Gtk::CheckButton auto_connect_inputs_button;
262 Gtk::RadioButton auto_connect_output_physical_button;
263 Gtk::RadioButton auto_connect_output_master_button;
264 Gtk::RadioButton auto_connect_output_manual_button;
265 Gtk::RadioButton::Group auto_connect_output_button_group;
267 Gtk::CheckButton hw_monitor_button;
268 Gtk::CheckButton sw_monitor_button;
269 Gtk::CheckButton plugins_stop_button;
270 Gtk::CheckButton plugins_on_rec_button;
271 Gtk::CheckButton verify_remove_last_capture_button;
272 Gtk::CheckButton stop_rec_on_xrun_button;
273 Gtk::CheckButton stop_at_end_button;
274 Gtk::CheckButton debug_keyboard_button;
275 Gtk::CheckButton speed_quieten_button;
277 void setup_misc_options ();
278 void plugins_stop_with_transport_clicked ();
279 void verify_remove_last_capture_clicked ();
280 void plugins_on_while_recording_clicked ();
281 void auto_connect_inputs_clicked ();
282 void auto_connect_output_physical_clicked ();
283 void auto_connect_output_master_clicked ();
284 void auto_connect_output_manual_clicked ();
285 void hw_monitor_clicked ();
286 void sw_monitor_clicked ();
287 void stop_rec_on_xrun_clicked ();
288 void stop_at_end_clicked ();
289 void debug_keyboard_clicked ();
290 void speed_quieten_clicked ();
292 void fixup_combo_size (Gtk::ComboBoxText&, std::vector<std::string>& strings);
295 #endif /* __gtk_ardour_option_editor_h__ */