summaryrefslogtreecommitdiff
path: root/gtk2_ardour/option_editor.h
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2018-12-03 18:55:52 -0600
committerBen Loftis <ben@harrisonconsoles.com>2018-12-07 12:57:26 -0600
commit65bda27d4218d9d4ebf809d91e716c892e1f1d8b (patch)
tree7254c9cb111d64912c78ce62023986d2fe9668a7 /gtk2_ardour/option_editor.h
parent19cb8cf13803b52f2e6956ed24d4e328e61bb1b2 (diff)
Tweaks to Mixer and Monitor keybindings:
Add Mixer-specific view keybindings for list, vca, mon. (thanks to: the_CLA) Move monitor keybindings (mute, dim, mono) to be globally-accessible. Implement new mixer-specific actions to show/hide monitor,vcas,mixbuses (the_CLA) Move monitor funcs (mute,dim,mono) to globally-accessible actions. Make a new Monitor group insted of using Transport group. Allow use-monitor-section to be controlled by both menu and session-options dialog.
Diffstat (limited to 'gtk2_ardour/option_editor.h')
-rw-r--r--gtk2_ardour/option_editor.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/gtk2_ardour/option_editor.h b/gtk2_ardour/option_editor.h
index 132d260c05..d6738889f3 100644
--- a/gtk2_ardour/option_editor.h
+++ b/gtk2_ardour/option_editor.h
@@ -33,6 +33,7 @@
#include "widgets/slider_controller.h"
+#include "actions.h"
#include "ardour_window.h"
#include "audio_clock.h"
#include "ardour/types.h"
@@ -187,6 +188,34 @@ protected:
std::string _name;
};
+/** Just a Gtk Checkbutton, masquerading as an option component */
+class CheckOption : public OptionEditorComponent , public Gtkmm2ext::Activatable
+{
+public:
+ CheckOption (std::string const &, std::string const &, Glib::RefPtr<Gtk::Action> act );
+ void set_state_from_config () {}
+ void parameter_changed (std::string const &) {}
+ void add_to_page (OptionEditorPage*);
+
+ void set_sensitive (bool yn) {
+ _button->set_sensitive (yn);
+ }
+
+ Gtk::Widget& tip_widget() { return *_button; }
+
+ void action_toggled ();
+ void action_sensitivity_changed () {}
+ void action_visibility_changed () {}
+
+protected:
+ virtual void toggled ();
+
+ sigc::slot<bool> _get; ///< slot to get the configuration variable's value
+ sigc::slot<bool, bool> _set; ///< slot to set the configuration variable's value
+ Gtk::CheckButton* _button; ///< UI button
+ Gtk::Label* _label; ///< label for button, so we can use markup
+};
+
/** Component which provides the UI to handle a boolean option using a GTK CheckButton */
class BoolOption : public Option
{