fix save/restore of preferences torn-off-window state
[ardour.git] / gtk2_ardour / rc_option_editor.h
1 /*
2     Copyright (C) 2001-2011 Paul Davis
3
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.
8
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.
13
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.
17
18 */
19
20 #ifndef __gtk_ardour_rc_option_editor_h__
21 #define __gtk_ardour_rc_option_editor_h__
22
23 #include "gtkmm2ext/tabbable.h"
24
25 #include "option_editor.h"
26 #include "visibility_group.h"
27
28 /** @file rc_option_editor.h
29  *  @brief Editing of options which are obtained from and written back to one of the .rc files.
30  *
31  *  This is subclassed from OptionEditor.  Simple options (e.g. boolean and simple choices)
32  *  are expressed using subclasses of Option.  More complex UI elements are represented
33  *  using individual classes subclassed from OptionEditorBox.
34  */
35
36 /** Editor for options which are obtained from and written back to one of the .rc files. */
37 class RCOptionEditor : public OptionEditorContainer, public ARDOUR::SessionHandlePtr, public Gtkmm2ext::Tabbable
38 {
39 public:
40         RCOptionEditor ();
41
42         void populate_sync_options ();
43
44         Gtk::Window* use_own_window (bool and_fill_it);
45         XMLNode& get_state ();
46
47 private:
48         void parameter_changed (std::string const &);
49         void ltc_generator_volume_changed ();
50         ARDOUR::RCConfiguration* _rc_config;
51         BoolOption* _solo_control_is_listen_control;
52         ComboOption<ARDOUR::ListenPosition>* _listen_position;
53         VisibilityGroup _mixer_strip_visibility;
54         ComboOption<ARDOUR::SyncSource>* _sync_source;
55         BoolOption* _sync_framerate;
56         BoolOption* _sync_genlock;
57         BoolOption* _sync_source_2997;
58         ComboStringOption* _ltc_port;
59         HSliderOption* _ltc_volume_slider;
60         Gtk::Adjustment* _ltc_volume_adjustment;
61         BoolOption* _ltc_send_continuously;
62         BoolOption* _plugin_prefer_inline;
63
64         PBD::ScopedConnection parameter_change_connection;
65         PBD::ScopedConnection engine_started_connection;
66
67         /* plugin actions */
68         void plugin_scan_refresh ();
69         void clear_vst_cache ();
70         void clear_vst_blacklist ();
71         void clear_au_cache ();
72         void clear_au_blacklist ();
73         void edit_lxvst_path ();
74         void edit_vst_path ();
75 };
76
77 #endif /* __gtk_ardour_rc_option_editor_h__ */