Use labs() for long instead of abs()
[ardour.git] / gtk2_ardour / pianokeyboard.h
index b3089f4d0b189398c86d4b9892d7b3c09bc43142..2b12befe7371790a9bcddde4b6850fb1b7fadb78 100644 (file)
@@ -34,12 +34,15 @@ public:
        sigc::signal<void, int, int> NoteOn;
        sigc::signal<void, int>      NoteOff;
        sigc::signal<void>           Rest;
+       sigc::signal<void,bool>      SustainChanged;
 
        enum Layout {
                QWERTY,
                QWERTZ,
                AZERTY,
-               DVORAK
+               DVORAK,
+               S_QWERTY,
+               S_QWERTZ
        };
 
        void sustain_press ();
@@ -90,6 +93,9 @@ private:
        void bind_keys_azerty ();
        void bind_keys_dvorak ();
 
+       void bind_keys_basic_qwerty ();
+       void bind_keys_basic_qwertz ();
+
        int get_note_for_xy (int x, int y) const;
        int get_velocity_for_note_at_y (int note, int y) const;
 
@@ -116,7 +122,6 @@ private:
                int  h;         /* Height of the key, in pixels. */
        };
 
-       bool _maybe_stop_sustained_notes;
        bool _sustain_new_notes;
        bool _highlight_grand_piano_range;
        bool _annotate_layout;
@@ -136,6 +141,7 @@ private:
 
        std::map<std::string, int> _key_bindings;  /**< Table used to translate from PC keyboard character to MIDI note number. */
        std::map<int, std::string> _note_bindings; /**< Table to translate from MIDI note number to PC keyboard character. */
+       std::map<std::string, int> _note_stack;
 
        /* these are only valid during expose/draw */
        PangoFontDescription* _font_cue;