use new action map API instead of ActionManager::get_action
[ardour.git] / gtk2_ardour / plugin_ui.h
index 4075c94eb7cb66bab67629288c62a7e1ec674485..b3420f2924599cc3758aa48d37f2da1a0c1723a5 100644 (file)
@@ -55,6 +55,7 @@
 
 #include "ardour_window.h"
 #include "automation_controller.h"
+#include "gtk_pianokeyboard.h"
 
 namespace ARDOUR {
        class PluginInsert;
@@ -71,13 +72,13 @@ namespace PBD {
 }
 
 namespace ArdourWidgets {
-       class ClickBox;
        class FastMeter;
 }
 
 class LatencyGUI;
 class ArdourWindow;
 class PluginEqGui;
+class PluginLoadStatsGui;
 class VSTPluginUI;
 
 class PlugUIBase : public virtual sigc::trackable, public PBD::ScopedConnectionList
@@ -137,6 +138,8 @@ protected:
        Gtk::Expander description_expander;
        /** an expander containing the plugin analysis graph */
        Gtk::Expander plugin_analysis_expander;
+       /** an expander containing the plugin cpu profile */
+       Gtk::Expander cpuload_expander;
        /** a button which, when clicked, opens the latency GUI */
        ArdourWidgets::ArdourButton latency_button;
        /** a button which sets all controls' automation setting to Manual */
@@ -147,13 +150,15 @@ protected:
        ArdourWidgets::ArdourButton automation_write_all_button;
        /** a button which sets all controls' automation setting to Touch */
        ArdourWidgets::ArdourButton automation_touch_all_button;
+       /** a button which sets all controls' automation setting to Latch */
+       ArdourWidgets::ArdourButton automation_latch_all_button;
 
        void set_latency_label ();
-
        LatencyGUI* latency_gui;
        ArdourWindow* latency_dialog;
 
        PluginEqGui* eqgui;
+       PluginLoadStatsGui* stats_gui;
 
        Gtk::Image* focus_out_image;
        Gtk::Image* focus_in_image;
@@ -169,6 +174,7 @@ protected:
        bool bypass_button_release(GdkEventButton*);
        void toggle_description ();
        void toggle_plugin_analysis ();
+       void toggle_cpuload_display ();
        void processor_active_changed (boost::weak_ptr<ARDOUR::Processor> p);
        void plugin_going_away ();
        void automation_state_changed ();
@@ -229,7 +235,6 @@ private:
                ArdourWidgets::ArdourButton             automate_button;
                Gtk::Label                              label;
                ArdourWidgets::ArdourDropdown*          combo;
-               ArdourWidgets::ClickBox*                clickbox;
                Gtk::FileChooserButton*                 file_button;
                ArdourWidgets::ArdourSpinner*           spin_box;
 
@@ -237,6 +242,7 @@ private:
                bool                                    update_pending;
                bool                                    ignore_change;
 
+
                /* output */
 
                Gtk::EventBox* display;
@@ -252,8 +258,12 @@ private:
                /* layout */
                Gtk::Table* knobtable;
                int x0, x1, y0, y1;
+
+               bool short_autostate; // modify with set_short_autostate below
        };
 
+       void set_short_autostate(ControlUI* cui, bool value);
+
        std::vector<ControlUI*>   input_controls; // workaround for preset load
        std::vector<ControlUI*>   input_controls_with_automation;
        std::vector<ControlUI*>   output_controls;
@@ -296,6 +306,29 @@ private:
                                Gtk::FileChooserButton*            widget);
        void path_property_changed (uint32_t key, const ARDOUR::Variant& value);
 
+       void scroller_size_request (Gtk::Requisition*);
+       Gtk::ScrolledWindow scroller;
+
+       Gtk::Expander   _plugin_pianokeyboard_expander;
+       PianoKeyboard*  _piano;
+       Gtk::Widget*    _pianomm;
+       Gtk::VBox       _pianobox;
+       Gtk::SpinButton _piano_velocity;
+       Gtk::SpinButton _piano_channel;
+
+       static void _note_on_event_handler (GtkWidget*, int, gpointer);
+       static void _note_off_event_handler (GtkWidget*, int, gpointer);
+       void note_on_event_handler (int);
+       void note_off_event_handler (int);
+
+       void toggle_pianokeyboard ();
+       void build_midi_table ();
+       void midi_refill_patches ();
+       void midi_bank_patch_change (uint8_t chn);
+       void midi_bank_patch_select (uint8_t chn, uint32_t bankpgm);
+       std::vector<ArdourWidgets::ArdourDropdown*> midi_pgmsel;
+       PBD::ScopedConnectionList midi_connections;
+       std::map<uint32_t, std::string> pgm_names;
 };
 
 class PluginUIWindow : public ArdourWindow