change tooltip for group tab to suggest click-to-(de)activate
[ardour.git] / gtk2_ardour / plugin_ui.h
index efef275eaa607d585464ec21c8b7ff8f5eded546..adc3f1dc2bc884baf80a5466dec33ae7f5245c5a 100644 (file)
@@ -90,9 +90,14 @@ class PlugUIBase : public virtual sigc::trackable
 
        void latency_button_clicked ();
 
-       virtual bool on_window_show(const Glib::ustring& /*title*/) { return true; }
+       virtual bool on_window_show(const std::string& /*title*/) { return true; }
        virtual void on_window_hide() {}
 
+       virtual void forward_key_event (GdkEventKey*) {}
+        virtual bool non_gtk_gui() const { return false; }
+
+       sigc::signal<void,bool> KeyboardFocused;
+
   protected:
        boost::shared_ptr<ARDOUR::PluginInsert> insert;
        boost::shared_ptr<ARDOUR::Plugin> plugin;
@@ -176,7 +181,7 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox
                }
        };
 
-       static const int32_t initial_button_rows = 6;
+       static const int32_t initial_button_rows = 12;
        static const int32_t initial_button_cols = 1;
        static const int32_t initial_output_rows = 1;
        static const int32_t initial_output_cols = 4;
@@ -249,7 +254,7 @@ class PluginUIWindow : public Gtk::Window
 
        void resize_preferred();
        void set_parent (Gtk::Window*);
-       void set_title(const Glib::ustring& title);
+       void set_title(const std::string& title);
 
 
        bool on_enter_notify_event (GdkEventCrossing*);
@@ -263,13 +268,14 @@ class PluginUIWindow : public Gtk::Window
        void on_map ();
 
   private:
-       Glib::ustring _title;
+       std::string _title;
        PlugUIBase* _pluginui;
        PBD::ScopedConnection death_connection;
        Gtk::Window* parent;
        Gtk::VBox vbox;
-       bool non_gtk_gui;
        bool was_visible;
+       bool _keyboard_focused;
+       void keyboard_focused (bool yn);
 
        void app_activated (bool);
        void plugin_going_away ();
@@ -298,9 +304,24 @@ class VSTPluginUI : public PlugUIBase, public Gtk::VBox
        Gtk::Socket socket;
        Gtk::HBox   preset_box;
        Gtk::VBox   vpacker;
+       Gtk::ComboBoxText vst_preset_combo;
+       Glib::RefPtr<Gtk::ListStore> preset_model;
+
+       struct PresetModelColumns : public Gtk::TreeModel::ColumnRecord {
+           PresetModelColumns() { 
+                   add (name);
+                   add (number);
+           }
+           Gtk::TreeModelColumn<std::string> name;
+           Gtk::TreeModelColumn<int> number;
+       };
+
+       PresetModelColumns preset_columns;
 
        bool configure_handler (GdkEventConfigure*, Gtk::Socket*);
        void save_plugin_setting ();
+       void create_preset_store ();
+       void preset_chosen ();
 };
 #endif // VST_SUPPORT