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 gint 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 gint native_format_chosen (GdkEventAny *);
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 gint layer_mode_chosen (GdkEventAny*);
106 gint xfade_model_chosen (GdkEventAny*);
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 gint meter_hold_chosen (GdkEventAny *);
139 gint meter_falloff_chosen (GdkEventAny *);
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 gint slave_type_chosen (GdkEventAny*);
159 void jack_time_master_clicked ();
160 void jack_transport_master_clicked ();
161 gint smpte_fps_chosen (GdkEventAny*);
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 void send_mmc_toggled (Gtk::CheckButton*);
173 void mmc_control_toggled (Gtk::CheckButton*);
174 void midi_control_toggled (Gtk::CheckButton*);
175 void midi_feedback_toggled (Gtk::CheckButton*);
177 gint port_online_toggled (GdkEventButton*,MIDI::Port*,Gtk::ToggleButton*);
178 gint port_trace_in_toggled (GdkEventButton*,MIDI::Port*,Gtk::ToggleButton*);
179 gint port_trace_out_toggled (GdkEventButton*,MIDI::Port*,Gtk::ToggleButton*);
181 gint mmc_port_chosen (GdkEventButton*,MIDI::Port*,Gtk::RadioButton*);
182 gint mtc_port_chosen (GdkEventButton*,MIDI::Port*,Gtk::RadioButton*);
183 gint midi_port_chosen (GdkEventButton*,MIDI::Port*,Gtk::RadioButton*);
185 void map_port_online (MIDI::Port*, Gtk::ToggleButton*);
187 void setup_midi_options();
195 std::map<MIDI::Port*,std::vector<Gtk::RadioButton*> > port_toggle_buttons;
199 IOSelector* click_io_selector;
200 GainMeter* click_gpm;
201 PannerUI* click_panner;
202 Gtk::VBox click_packer;
203 Gtk::Table click_table;
204 Gtk::Entry click_path_entry;
205 Gtk::Entry click_emphasis_path_entry;
206 Gtk::Button click_browse_button;
207 Gtk::Button click_emphasis_browse_button;
209 void setup_click_editor ();
210 void clear_click_editor ();
212 void click_chosen (std::string paths);
213 void click_emphasis_chosen (std::string paths);
215 void click_browse_clicked ();
216 void click_emphasis_browse_clicked ();
218 void click_sound_changed ();
219 void click_emphasis_sound_changed ();
223 Gtk::VBox audition_packer;
224 Gtk::HBox audition_hpacker;
225 Gtk::Label audition_label;
226 IOSelector* auditioner_io_selector;
227 GainMeter* auditioner_gpm;
228 PannerUI* auditioner_panner;
230 void setup_auditioner_editor ();
231 void clear_auditioner_editor ();
232 void connect_audition_editor ();
236 Gtk::Table keyboard_mouse_table;
237 Gtk::ComboBoxText edit_modifier_combo;
238 Gtk::ComboBoxText delete_modifier_combo;
239 Gtk::ComboBoxText snap_modifier_combo;
240 Gtk::Adjustment delete_button_adjustment;
241 Gtk::SpinButton delete_button_spin;
242 Gtk::Adjustment edit_button_adjustment;
243 Gtk::SpinButton edit_button_spin;
245 void setup_keyboard_options ();
246 gint delete_modifier_chosen (GdkEventAny*);
247 gint edit_modifier_chosen (GdkEventAny*);
248 gint snap_modifier_chosen (GdkEventAny*);
249 void edit_button_changed ();
250 void delete_button_changed ();
254 Gtk::VBox misc_packer;
256 Gtk::CheckButton auto_connect_inputs_button;
258 Gtk::RadioButton auto_connect_output_physical_button;
259 Gtk::RadioButton auto_connect_output_master_button;
260 Gtk::RadioButton auto_connect_output_manual_button;
262 Gtk::CheckButton hw_monitor_button;
263 Gtk::CheckButton sw_monitor_button;
264 Gtk::CheckButton plugins_stop_button;
265 Gtk::CheckButton plugins_on_rec_button;
266 Gtk::CheckButton verify_remove_last_capture_button;
267 Gtk::CheckButton stop_rec_on_xrun_button;
268 Gtk::CheckButton stop_at_end_button;
269 Gtk::CheckButton debug_keyboard_button;
270 Gtk::CheckButton speed_quieten_button;
272 void setup_misc_options ();
273 void plugins_stop_with_transport_clicked ();
274 void verify_remove_last_capture_clicked ();
275 void plugins_on_while_recording_clicked ();
276 void auto_connect_inputs_clicked ();
277 void auto_connect_output_physical_clicked ();
278 void auto_connect_output_master_clicked ();
279 void auto_connect_output_manual_clicked ();
280 void hw_monitor_clicked ();
281 void sw_monitor_clicked ();
282 void stop_rec_on_xrun_clicked ();
283 void stop_at_end_clicked ();
284 void debug_keyboard_clicked ();
285 void speed_quieten_clicked ();
287 void fixup_combo_size (Gtk::ComboBox&, std::vector<std::string>& strings);
290 #endif /* __gtk_ardour_option_editor_h__ */