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 <gtkmm2ext/pathlist.h>
38 #include <ardour/session.h>
40 #include "ardour_dialog.h"
42 #include "audio_clock.h"
51 class OptionEditor : public Gtk::Dialog
54 OptionEditor (ARDOUR_UI&, PublicEditor&, Mixer_UI&);
57 void set_session (ARDOUR::Session *);
61 ARDOUR::Session *session;
66 Gtk::Notebook notebook;
70 gint wm_close (GdkEventAny *);
71 bool focus_out_event_handler (GdkEventFocus*, void (OptionEditor::*pmf)());
75 Gtk::Table path_table;
76 Gtk::Entry session_raid_entry;
78 Gtkmm2ext::PathList sfdb_path_view;
80 void setup_path_options();
81 void add_session_paths ();
82 void remove_session_paths ();
83 void raid_path_changed ();
84 void sfdb_paths_changed ();
88 Gtk::VBox fade_packer;
89 Gtk::Adjustment short_xfade_adjustment;
90 Gtk::HScale short_xfade_slider;
91 Gtk::Adjustment destructo_xfade_adjustment;
92 Gtk::HScale destructo_xfade_slider;
94 void setup_fade_options();
95 void short_xfade_adjustment_changed ();
96 void destructo_xfade_adjustment_changed ();
100 Gtk::VBox sync_packer;
102 Gtk::ComboBoxText slave_type_combo;
103 AudioClock smpte_offset_clock;
104 Gtk::CheckButton smpte_offset_negative_button;
106 void setup_sync_options ();
108 void smpte_offset_chosen ();
109 void smpte_offset_negative_clicked ();
113 Gtk::VBox midi_packer;
115 Gtk::RadioButton::Group mtc_button_group;
116 Gtk::RadioButton::Group mmc_button_group;
117 Gtk::RadioButton::Group midi_button_group;
119 gint port_online_toggled (GdkEventButton*,MIDI::Port*,Gtk::ToggleButton*);
120 gint port_trace_in_toggled (GdkEventButton*,MIDI::Port*,Gtk::ToggleButton*);
121 gint port_trace_out_toggled (GdkEventButton*,MIDI::Port*,Gtk::ToggleButton*);
123 void mmc_port_chosen (MIDI::Port*,Gtk::RadioButton*);
124 void mtc_port_chosen (MIDI::Port*,Gtk::RadioButton*);
125 void midi_port_chosen (MIDI::Port*,Gtk::RadioButton*);
127 void map_port_online (MIDI::Port*, Gtk::ToggleButton*);
129 void setup_midi_options();
137 std::map<MIDI::Port*,std::vector<Gtk::RadioButton*> > port_toggle_buttons;
141 IOSelector* click_io_selector;
142 GainMeter* click_gpm;
143 PannerUI* click_panner;
144 Gtk::VBox click_packer;
145 Gtk::Table click_table;
146 Gtk::Entry click_path_entry;
147 Gtk::Entry click_emphasis_path_entry;
148 Gtk::Button click_browse_button;
149 Gtk::Button click_emphasis_browse_button;
151 void setup_click_editor ();
152 void clear_click_editor ();
154 void click_chosen (const string & paths);
155 void click_emphasis_chosen (const string & paths);
157 void click_browse_clicked ();
158 void click_emphasis_browse_clicked ();
160 void click_sound_changed ();
161 void click_emphasis_sound_changed ();
165 Gtk::VBox audition_packer;
166 Gtk::HBox audition_hpacker;
167 Gtk::Label audition_label;
168 IOSelector* auditioner_io_selector;
169 GainMeter* auditioner_gpm;
170 PannerUI* auditioner_panner;
172 void setup_auditioner_editor ();
173 void clear_auditioner_editor ();
174 void connect_audition_editor ();
178 Gtk::Table keyboard_mouse_table;
179 Gtk::ComboBoxText edit_modifier_combo;
180 Gtk::ComboBoxText delete_modifier_combo;
181 Gtk::ComboBoxText snap_modifier_combo;
182 Gtk::Adjustment delete_button_adjustment;
183 Gtk::SpinButton delete_button_spin;
184 Gtk::Adjustment edit_button_adjustment;
185 Gtk::SpinButton edit_button_spin;
187 void setup_keyboard_options ();
188 void delete_modifier_chosen ();
189 void edit_modifier_chosen ();
190 void snap_modifier_chosen ();
191 void edit_button_changed ();
192 void delete_button_changed ();
194 void fixup_combo_size (Gtk::ComboBoxText&, std::vector<std::string>& strings);
197 #endif /* __gtk_ardour_option_editor_h__ */