implement relative clock editing (terminated by + or - keys, which adjust the clock...
[ardour.git] / gtk2_ardour / lxvst_plugin_ui.h
1 #ifndef __lxvst_plugin_ui_h__
2 #define __lxvst_plugin_ui_h__
3
4 #include <vector>
5 #include <map>
6 #include <list>
7
8 #include <sigc++/signal.h>
9 #include <gtkmm/widget.h>
10
11 #include <ardour_dialog.h>
12 #include <ardour/types.h>
13 #include "plugin_ui.h"
14
15 #ifdef LXVST_SUPPORT
16
17 namespace ARDOUR {
18         class PluginInsert;
19         class LXVSTPlugin;
20 }
21
22 class LXVSTPluginUI : public PlugUIBase, public Gtk::VBox
23 {
24   public:
25         LXVSTPluginUI (boost::shared_ptr<ARDOUR::PluginInsert>, boost::shared_ptr<ARDOUR::LXVSTPlugin>);
26         ~LXVSTPluginUI ();
27
28         gint get_preferred_height ();
29         gint get_preferred_width ();
30         bool start_updating(GdkEventAny*);
31         bool stop_updating(GdkEventAny*);
32
33         int package (Gtk::Window&);
34         void forward_key_event (GdkEventKey *);
35         bool non_gtk_gui() const { return true; }
36
37   private:
38         boost::shared_ptr<ARDOUR::LXVSTPlugin>  lxvst;
39         Gtk::Socket socket;
40         Gtk::HBox   preset_box;
41         Gtk::VBox   vpacker;
42         
43         sigc::connection _screen_update_connection;
44         
45         bool configure_handler (GdkEventConfigure*, Gtk::Socket*);
46         void save_plugin_setting ();
47
48         struct PresetModelColumns : public Gtk::TreeModel::ColumnRecord {
49             PresetModelColumns() { 
50                     add (name);
51                     add (number);
52             }
53             Gtk::TreeModelColumn<Glib::ustring> name;
54             Gtk::TreeModelColumn<int> number;
55         };
56
57         PresetModelColumns preset_columns;
58         Glib::RefPtr<Gtk::ListStore> preset_model;
59         Gtk::ComboBox lxvst_preset_combo;
60
61         void create_preset_store ();
62         void preset_chosen ();
63         void preset_selected ();
64         void resize_callback();
65 };
66
67 #endif //LXVST_SUPPORT
68
69 #endif