diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-09 03:36:00 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-09 03:36:00 +0000 |
commit | 14543eb1374dc51834385d2f3886f1e6068223c5 (patch) | |
tree | 5194d0a983b77d79f5310f1216129e84c64f6a42 /gtk2_ardour/ardour_ui.h | |
parent | 138b12b1dd5b7e6175b3349b8ed7fa8b16721809 (diff) |
strip X specific from keyboard.cc; fix up many buttons to avoid prelight (mostly) and make transport buttons bindable (state not saved yet); use const char* not string in route order keys to avoid pointless mallocs during route sorting
git-svn-id: svn://localhost/ardour2/trunk@1437 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui.h')
-rw-r--r-- | gtk2_ardour/ardour_ui.h | 61 |
1 files changed, 44 insertions, 17 deletions
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index e1b7c55555..9d51232f6c 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -55,6 +55,7 @@ #include <gtkmm2ext/gtk_ui.h> #include <gtkmm2ext/click_box.h> #include <gtkmm2ext/stateful_button.h> +#include <gtkmm2ext/bindable_button.h> #include <ardour/ardour.h> #include <ardour/session.h> @@ -355,18 +356,43 @@ class ARDOUR_UI : public Gtkmm2ext::UI Gtk::HBox primary_clock_hbox; Gtk::HBox secondary_clock_hbox; - Gtkmm2ext::StatefulButton roll_button; - Gtkmm2ext::StatefulButton stop_button; - Gtkmm2ext::StatefulButton rewind_button; - Gtkmm2ext::StatefulButton forward_button; - Gtkmm2ext::StatefulButton goto_start_button; - Gtkmm2ext::StatefulButton goto_end_button; - Gtkmm2ext::StatefulButton auto_loop_button; - Gtkmm2ext::StatefulButton play_selection_button; - Gtkmm2ext::StatefulButton rec_button; + struct TransportControllable : public PBD::Controllable { + enum ToggleType { + Roll = 0, + Stop, + RecordEnable, + GotoStart, + GotoEnd, + AutoLoop, + PlaySelection + + }; + + TransportControllable (std::string name, ARDOUR_UI&, ToggleType); + void set_value (float); + float get_value (void) const; + + ARDOUR_UI& ui; + ToggleType type; + }; + + TransportControllable roll_controllable; + TransportControllable stop_controllable; + TransportControllable goto_start_controllable; + TransportControllable goto_end_controllable; + TransportControllable auto_loop_controllable; + TransportControllable play_selection_controllable; + TransportControllable rec_controllable; + + BindableButton roll_button; + BindableButton stop_button; + BindableButton goto_start_button; + BindableButton goto_end_button; + BindableButton auto_loop_button; + BindableButton play_selection_button; + BindableButton rec_button; - Gtk::ToggleButton time_master_button; Gtk::ComboBoxText sync_option_combo; void sync_option_changed (); @@ -402,12 +428,14 @@ class ARDOUR_UI : public Gtkmm2ext::UI bool shuttle_grabbed; double shuttle_fract; - Gtk::ToggleButton punch_in_button; - Gtk::ToggleButton punch_out_button; - Gtk::ToggleButton auto_return_button; - Gtk::ToggleButton auto_play_button; - Gtk::ToggleButton auto_input_button; - Gtk::ToggleButton click_button; + Gtkmm2ext::StatefulToggleButton punch_in_button; + Gtkmm2ext::StatefulToggleButton punch_out_button; + Gtkmm2ext::StatefulToggleButton auto_return_button; + Gtkmm2ext::StatefulToggleButton auto_play_button; + Gtkmm2ext::StatefulToggleButton auto_input_button; + Gtkmm2ext::StatefulToggleButton click_button; + Gtkmm2ext::StatefulToggleButton time_master_button; + Gtk::ToggleButton auditioning_alert_button; Gtk::ToggleButton solo_alert_button; @@ -585,7 +613,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI /* Keymap handling */ void install_actions (); - void start_keyboard_prefix(); void toggle_record_enable (uint32_t); |