Reenable the correct sort column and type when redisplaying regions
[ardour.git] / gtk2_ardour / virtual_keyboard_window.h
index 794b52a7f83fb589e1ae8067c263327518e3fff3..f0f6f27bd807af65c98e3ae8f45de3f3489ab0a8 100644 (file)
@@ -33,7 +33,7 @@
 #include "widgets/slider_controller.h"
 
 #include "ardour_window.h"
-#include "gtk_pianokeyboard.h"
+#include "pianokeyboard.h"
 
 namespace ARDOUR {
        class Session;
@@ -92,81 +92,70 @@ public:
        XMLNode& get_state ();
        void     set_state (const XMLNode&);
 
-private:
-       static void _note_on_event_handler (GtkWidget*, int note, int vel, gpointer arg)
-       {
-               static_cast<VirtualKeyboardWindow*> (arg)->note_on_event_handler (note, vel);
-       }
-
-       static void _note_off_event_handler (GtkWidget*, int note, gpointer arg)
-       {
-               static_cast<VirtualKeyboardWindow*> (arg)->note_off_event_handler (note);
-       }
+protected:
+       bool on_focus_in_event (GdkEventFocus*);
 
+private:
        void on_unmap ();
        bool on_key_press_event (GdkEventKey*);
+       bool on_key_release_event (GdkEventKey*);
+
+       void parameter_changed (std::string const&);
 
        void note_on_event_handler (int, int);
        void note_off_event_handler (int);
        void control_change_event_handler (int, int);
+       void control_change_knob_event_handler (int, int);
+
+       void modwheel_update_tooltip (int);
+       void modwheel_slider_adjusted ();
+
+       void octave_key_event_handler (bool);
+       void pitch_bend_key_event_handler (int, bool);
+       bool pitch_bend_timeout ();
+
        void pitch_bend_event_handler (int);
+       void pitch_bend_release ();
+       void pitch_bend_update_tooltip (int);
+       void pitch_slider_adjusted ();
 
        void select_keyboard_layout (std::string const&);
-       void update_velocity_settings (int);
+       void update_velocity_settings ();
        void update_octave_key ();
        void update_octave_range ();
-       void bank_patch ();
-       void update_sensitivity ();
-       void pitch_slider_adjusted ();
-       bool toggle_config (GdkEventButton*);
-       bool toggle_bankpatch (GdkEventButton*);
-       bool toggle_yaxis_velocity (GdkEventButton*);
-       bool toggle_highlight_piano (GdkEventButton*);
-       bool toggle_highlight_key (GdkEventButton*);
-       bool toggle_note_label (GdkEventButton*);
+       void cc_key_changed (size_t);
+       void update_cc (size_t, int);
        bool send_panic_message (GdkEventButton*);
+       bool on_velocity_scroll_event (GdkEventScroll*);
 
-       PianoKeyboard*  _piano;
-       Gtk::Widget*    _pianomm;
-       Gtk::SpinButton _piano_channel;
-
-       Gtk::SpinButton _transpose_output;
+       APianoKeyboard  _piano;
 
-       Gtk::SpinButton _bank_msb;
-       Gtk::SpinButton _bank_lsb;
-       Gtk::SpinButton _patchpgm;
-
-       Gtk::HBox* _cfg_box;
-       Gtk::HBox* _pgm_box;
-
-       ArdourWidgets::ArdourButton   _cfg_display;
-       ArdourWidgets::ArdourButton   _pgm_display;
-       ArdourWidgets::ArdourButton   _yaxis_velocity;
-       ArdourWidgets::ArdourButton   _highlight_grand_piano;
-       ArdourWidgets::ArdourButton   _highlight_key_range;
-       ArdourWidgets::ArdourButton   _show_note_label;
-       ArdourWidgets::ArdourButton   _send_panic;
-       ArdourWidgets::ArdourDropdown _keyboard_layout;
-
-       Gtk::SpinButton _piano_key_velocity;
-       Gtk::SpinButton _piano_min_velocity;
-       Gtk::SpinButton _piano_max_velocity;
-
-       Gtk::SpinButton _piano_octave_key;
-       Gtk::SpinButton _piano_octave_range;
+       ArdourWidgets::ArdourDropdown  _midi_channel;
+       ArdourWidgets::ArdourDropdown  _piano_velocity;
+       ArdourWidgets::ArdourDropdown  _piano_octave_key;
+       ArdourWidgets::ArdourDropdown  _piano_octave_range;
+       ArdourWidgets::ArdourDropdown  _transpose_output;
+       ArdourWidgets::ArdourButton    _send_panic;
 
        boost::shared_ptr<VKBDControl>    _pitchbend;
        Gtk::Adjustment                   _pitch_adjustment;
        ArdourWidgets::VSliderController* _pitch_slider;
        Gtkmm2ext::PersistentTooltip*     _pitch_slider_tooltip;
 
-#define VKBD_NCTRLS 8
+       boost::shared_ptr<VKBDControl>    _modwheel;
+       Gtk::Adjustment                   _modwheel_adjustment;
+       ArdourWidgets::VSliderController* _modwheel_slider;
+       Gtkmm2ext::PersistentTooltip*     _modwheel_tooltip;
+#define VKBD_NCTRLS 4
 
        boost::shared_ptr<VKBDControl> _cc[VKBD_NCTRLS];
        ArdourWidgets::ArdourKnob*     _cc_knob[VKBD_NCTRLS];
        ArdourWidgets::ArdourDropdown  _cc_key[VKBD_NCTRLS];
 
        PBD::ScopedConnectionList _cc_connections;
+
+       sigc::connection _bender_connection;
+       int              _pitch_bend_target;
 };
 
 #endif