Ardour  9.0-pre0-582-g084a23a80d
plugin_display.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Johannes Mueller <github@johannes-mueller.org>
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 along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef __ardour_plugin_display__
20 #define __ardour_plugin_display__
21 
22 #include <gtkmm/drawingarea.h>
23 
24 #include "ardour/plugin.h"
25 
27 {
28 public:
29  PluginDisplay(std::shared_ptr<ARDOUR::Plugin>, uint32_t max_height = 80);
30  virtual ~PluginDisplay();
31 
32 protected:
37 
40  }
41 
42  virtual void update_height_alloc (uint32_t inline_height);
43  virtual uint32_t render_inline (cairo_t *, uint32_t width);
44 
45  virtual void display_frame (cairo_t* cr, double w, double h);
46 
47  std::shared_ptr<ARDOUR::Plugin> _plug;
50  cairo_surface_t* _surf;
51  uint32_t _max_height;
52  uint32_t _cur_height;
53  bool _scroll;
54 };
55 
56 #endif
PluginDisplay(std::shared_ptr< ARDOUR::Plugin >, uint32_t max_height=80)
bool on_expose_event(GdkEventExpose *)
This is a default handler for the signal signal_expose_event().
PBD::ScopedConnection _qdraw_connection
bool on_button_press_event(GdkEventButton *ev)
This is a default handler for the signal signal_button_press_event().
cairo_surface_t * _surf
virtual void display_frame(cairo_t *cr, double w, double h)
uint32_t _max_height
virtual uint32_t render_inline(cairo_t *, uint32_t width)
void on_size_request(Gtk::Requisition *req)
This is a default handler for the signal signal_size_request().
std::shared_ptr< ARDOUR::Plugin > _plug
bool on_button_release_event(GdkEventButton *ev)
This is a default handler for the signal signal_button_release_event().
virtual ~PluginDisplay()
uint32_t _cur_height
virtual void update_height_alloc(uint32_t inline_height)
PBD::ScopedConnection _death_connection
void plugin_going_away()
gint width
Definition: xcursors.h:1