2 * Copyright (C) 2016 Robin Gareus <robin@gareus.org>
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.
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.
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.
19 #ifndef __gtkardour_plugin_pin_dialog_h__
20 #define __gtkardour_plugin_pin_dialog_h__
22 #include <gtkmm/drawingarea.h>
23 #include <gtkmm/box.h>
25 #include "pbd/stateful.h"
26 #include "pbd/signals.h"
28 #include "ardour/plugin_insert.h"
29 #include "ardour/route.h"
31 #include "ardour_window.h"
33 class PluginPinDialog : public ArdourWindow
36 PluginPinDialog (boost::shared_ptr<ARDOUR::PluginInsert>);
40 Gtk::DrawingArea darea;
41 bool darea_expose_event (GdkEventExpose* event);
43 void plugin_reconfigured ();
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);
51 double pin_x_pos (uint32_t, double, double, uint32_t, uint32_t, bool);
53 PBD::ScopedConnectionList _plugin_connections;
54 boost::shared_ptr<ARDOUR::PluginInsert> _pi;