OSC: Changed gainVCA to gainfader as VCA is already used.
[ardour.git] / gtk2_ardour / plugin_pin_dialog.h
1 /*
2  * Copyright (C) 2016 Robin Gareus <robin@gareus.org>
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17  */
18
19 #ifndef __gtkardour_plugin_pin_dialog_h__
20 #define __gtkardour_plugin_pin_dialog_h__
21
22 #include <gtkmm/drawingarea.h>
23 #include <gtkmm/box.h>
24
25 #include "pbd/stateful.h"
26 #include "pbd/signals.h"
27
28 #include "ardour/plugin_insert.h"
29 #include "ardour/route.h"
30
31 #include "ardour_window.h"
32
33 class PluginPinDialog : public ArdourWindow
34 {
35 public:
36         PluginPinDialog (boost::shared_ptr<ARDOUR::PluginInsert>);
37         ~PluginPinDialog ();
38
39 private:
40         Gtk::DrawingArea darea;
41         bool darea_expose_event (GdkEventExpose* event);
42
43         void plugin_reconfigured ();
44
45         void draw_io_pins (cairo_t*, double, double, uint32_t, uint32_t, bool);
46         void draw_plugin_pins (cairo_t*, double, double, double, uint32_t, uint32_t, bool);
47         void draw_connection (cairo_t*, double, double, double, double, bool, bool dashed = false);
48         bool is_valid_port (uint32_t, uint32_t, uint32_t, bool);
49         void set_color (cairo_t*, bool);
50
51         double pin_x_pos (uint32_t, double, double, uint32_t, uint32_t, bool);
52
53         PBD::ScopedConnectionList _plugin_connections;
54         boost::shared_ptr<ARDOUR::PluginInsert> _pi;
55         double _pin_box_size;
56 };
57
58 #endif