-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathfilter_widget.h
executable file
·54 lines (35 loc) · 989 Bytes
/
filter_widget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// This is the header for our custom filter_widget.
// We override the on_expose_event function so GTK calls into this class
// to draw the filter_widget
#ifndef filterWIDGET
#define filterWIDGET
#include <gtkmm/drawingarea.h>
#include <gtkmm.h>
#include <iostream>
using namespace std;
// LV2UI stuff
#include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
class filter_widget : public Gtk::DrawingArea
{
public:
// public Lv2 communication stuff
LV2UI_Controller controller;
LV2UI_Write_Function write_function;
Gdk::Color top_colour;
Gdk::Color bottom_colour;
filter_widget();
~filter_widget();
void set_value(float);
int pos_mode;
void set_label(string);
int port_number;
float val_cutoff;
float val_res;
int val;
protected:
string label;
virtual bool on_expose_event(GdkEventExpose*);
virtual bool on_button_press_event(GdkEventButton*);
virtual bool on_button_release_event(GdkEventButton*);
};
#endif