forked from thunderox/triceratops-old-version-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwave_widget.h
executable file
·53 lines (35 loc) · 943 Bytes
/
wave_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
// This is the header for our custom wave_widget.
// We override the on_expose_event function so GTK calls into this class
// to draw the wave_widget
#ifndef WAVEWIDGET
#define WAVEWIDGET
#include <gtkmm/drawingarea.h>
#include <iostream>
using namespace std;
// LV2UI stuff
#include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
class wave_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;
wave_widget();
~wave_widget();
void set_label(string);
void set_value(int);
void set_lfo_mode(bool);
int pos_mode;
int port_number;
int last_waveform;
bool lfo_mode;
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