mostly editor.cc & editor_mouse.cc for Gdk::Cursor, Gnome::Canvas::Item
[ardour.git] / gtk2_ardour / plugin_selector.h
1 /*
2     Copyright (C) 2000 Paul Davis 
3
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 */
19
20 #ifndef __ardour_plugin_selector_h__
21 #define __ardour_plugin_selector_h__
22
23 #include <gtkmm/notebook.h>
24 #include <gtkmm/notebook.h>
25 #include <gtkmm/treeview.h>
26 #include <gtkmm2ext/selector.h>
27
28 #include <ardour_dialog.h>
29
30 namespace ARDOUR {
31         class Session;
32         class PluginManager;
33         class Plugin;
34 }
35
36 class PluginSelector : public ArdourDialog 
37 {
38   public:
39         PluginSelector (ARDOUR::PluginManager *);
40         sigc::signal<void,ARDOUR::Plugin *> PluginCreated;
41
42         void set_session (ARDOUR::Session*);
43
44   private:
45         ARDOUR::Session* session;
46         Gtk::Notebook notebook;
47
48         // page 1
49         Gtkmm2ext::Selector ladspa_display;
50         void column_clicked (int column, GtkCList* clist);
51
52 #ifdef VST_SUPPORT
53         // page 2
54         Gtkmm2ext::Selector vst_display;
55         static void _vst_refiller (Gtk::CList &, void *);
56         void vst_refiller (Gtk::CList &);
57 #endif  
58         Gtkmm2ext::Selector o_selector;
59
60         ARDOUR::PluginInfo* i_selected_plug;
61
62         // We need an integer for the output side because
63         // the name isn't promised to be unique.
64         gint o_selected_plug;
65
66         ARDOUR::PluginManager *manager;
67         list<ARDOUR::PluginInfo*> added_plugins;
68
69         //static void _input_refiller (Gtk::CList &, void *);
70         //static void _output_refiller (Gtk::CList &, void *);
71
72         //void input_refiller (Gtk::CList &);
73         //void output_refiller (Gtk::CList &);
74         //void i_plugin_selected (Gtkmm2ext::Selector *selector,
75         //                      Gtkmm2ext::SelectionResult *res);
76         //void i_plugin_chosen (Gtkmm2ext::Selector *selector,
77         //                  Gtkmm2ext::SelectionResult *res);
78         //void o_plugin_selected (Gtkmm2ext::Selector *selector,
79         //                    Gtkmm2ext::SelectionResult *res);
80         //void o_plugin_chosen (Gtkmm2ext::Selector *selector,
81         //                  Gtkmm2ext::SelectionResult *res);
82         
83         void btn_add_clicked();
84         void btn_remove_clicked();
85         void btn_ok_clicked();
86         void btn_update_clicked();
87         void btn_apply_clicked();
88         void btn_cancel_clicked();
89         void use_plugin (ARDOUR::PluginInfo*);
90         gint wm_close(GdkEventAny* ev);
91 };
92
93 #endif // __ardour_plugin_selector_h__