1 /*
2  * Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
3  * Copyright (C) 2012-2017 Robin Gareus <robin@gareus.org>
4  * Copyright (C) 2012-2018 Paul Davis <paul@linuxaudiosystems.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef __gtk_ardour_rc_option_editor_h__
22 #define __gtk_ardour_rc_option_editor_h__
23 
24 #include "widgets/tabbable.h"
25 
26 #include "option_editor.h"
27 #include "visibility_group.h"
28 #include "transport_masters_dialog.h"
29 
30 /** @file rc_option_editor.h
31  *  @brief Editing of options which are obtained from and written back to one of the .rc files.
32  *
33  *  This is subclassed from OptionEditor.  Simple options (e.g. boolean and simple choices)
34  *  are expressed using subclasses of Option.  More complex UI elements are represented
35  *  using individual classes subclassed from OptionEditorBox.
36  */
37 
38 /** Editor for options which are obtained from and written back to one of the .rc files. */
39 class RCOptionEditor : public OptionEditorContainer, public ARDOUR::SessionHandlePtr, public ArdourWidgets::Tabbable
40 {
41 public:
42 	RCOptionEditor ();
43 
44 	void set_session (ARDOUR::Session*);
45 
46 	Gtk::Window* use_own_window (bool and_fill_it);
47 	XMLNode& get_state ();
48 
49 	bool on_key_release_event (GdkEventKey*);
50 
51 private:
52 	void parameter_changed (std::string const &);
53 	void ltc_generator_volume_changed ();
54 	ARDOUR::RCConfiguration* _rc_config;
55 	BoolOption* _solo_control_is_listen_control;
56 	ComboOption<ARDOUR::ListenPosition>* _listen_position;
57 	VisibilityGroup _mixer_strip_visibility;
58 	BoolOption* _sync_framerate;
59 	HSliderOption* _ltc_volume_slider;
60 	Gtk::Adjustment* _ltc_volume_adjustment;
61 	BoolOption* _ltc_send_continuously;
62 	BoolOption* _plugin_prefer_inline;
63 	TransportMastersWidget _transport_masters_widget;
64 
65 	PBD::ScopedConnection parameter_change_connection;
66 	PBD::ScopedConnection engine_started_connection;
67 
68 	void show_audio_setup ();
69 	void show_transport_masters ();
70 
71 	/* plugin actions */
72 	void plugin_scan_refresh ();
73 	void plugin_reset_stats ();
74 	void clear_vst2_cache ();
75 	void clear_vst2_blacklist ();
76 	void clear_vst3_cache ();
77 	void clear_vst3_blacklist ();
78 	void clear_au_cache ();
79 	void clear_au_blacklist ();
80 	void edit_vst_path (std::string const& title, std::string const& dflt, sigc::slot<std::string>, sigc::slot<bool, std::string>);
81 };
82 
83 #endif /* __gtk_ardour_rc_option_editor_h__ */
84