diff options
author | Robin Gareus <robin@gareus.org> | 2018-01-30 18:33:15 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2018-01-30 19:52:27 +0100 |
commit | fe63db8697de4e928d738e975325656cb9c15690 (patch) | |
tree | 6fea6478e3c54d8ac37f1f9675ec52828eecb738 /libs/widgets/widgets | |
parent | ff36421d8e153d6bcb5e9df0a37718deac526c5a (diff) |
Ardour Button Toggle explosion
Add option to use ArduorButton as standalone Toggle/Checkbox.
Usually ArdourButton relegates this to Actions or is backed by Config.
This allows to use the Button as standalone Toggle, get_active()
It should maybe be a derived Class, but ArdourButton is already beyond
that..
Diffstat (limited to 'libs/widgets/widgets')
-rw-r--r-- | libs/widgets/widgets/ardour_button.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/widgets/widgets/ardour_button.h b/libs/widgets/widgets/ardour_button.h index 6630c19450..b530e8b399 100644 --- a/libs/widgets/widgets/ardour_button.h +++ b/libs/widgets/widgets/ardour_button.h @@ -55,8 +55,8 @@ class LIBWIDGETS_API ArdourButton : public CairoWidget , public Gtkmm2ext::Activ static Element led_default_elements; static Element just_led_default_elements; - ArdourButton (Element e = default_elements); - ArdourButton (const std::string&, Element e = default_elements); + ArdourButton (Element e = default_elements, bool toggle = false); + ArdourButton (const std::string&, Element e = default_elements, bool toggle = false); virtual ~ArdourButton (); enum Tweaks { @@ -193,6 +193,7 @@ class LIBWIDGETS_API ArdourButton : public CairoWidget , public Gtkmm2ext::Activ cairo_rectangle_t* _led_rect; bool _act_on_release; + bool _auto_toggle; bool _led_left; bool _distinct_led_click; bool _hovering; |