-
Notifications
You must be signed in to change notification settings - Fork 24
/
button.cxx
98 lines (80 loc) · 2.94 KB
/
button.cxx
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#include "button.h"
#include <FL/Fl_Button.H>
#include <FL/Fl_Check_Button.H>
#include <FL/Fl_Light_Button.H>
#include <FL/Fl_Radio_Button.H>
#include <FL/Fl_Radio_Round_Button.H>
#include <FL/Fl_Return_Button.H>
#include <FL/Fl_Toggle_Button.H>
#include "event_handler.h"
class GButton : public EventHandler<Fl_Button> {
public:
GButton(int x, int y, int w, int h, const char *label)
: EventHandler<Fl_Button>(x, y, w, h, label) {}
};
GButton *go_fltk_new_Button(int x, int y, int w, int h, const char *label) {
return new GButton(x, y, w, h, label);
}
char go_fltk_Button_value(Fl_Button *b) {
return b->value();
}
void go_fltk_Button_set_value(Fl_Button *b, int val) {
b->value(val);
}
void go_fltk_Button_set_down_box(Fl_Button *b, int val) {
b->down_box((Fl_Boxtype)val);
}
void go_fltk_Button_set_shortcut(Fl_Button *b, int shortcut) {
b->shortcut(shortcut);
}
int go_fltk_Button_shortcut(Fl_Button *b) {
return b->shortcut();
}
class GCheck_Button : public EventHandler<Fl_Check_Button> {
public:
GCheck_Button(int x, int y, int w, int h, const char *label)
: EventHandler<Fl_Check_Button>(x, y, w, h, label) {}
};
GCheck_Button *go_fltk_new_Check_Button(int x, int y, int w, int h, const char *label) {
return new GCheck_Button(x, y, w, h, label);
}
class GToggle_Button : public EventHandler<Fl_Toggle_Button> {
public:
GToggle_Button(int x, int y, int w, int h, const char *label)
: EventHandler<Fl_Toggle_Button>(x, y, w, h, label) {}
};
GToggle_Button *go_fltk_new_Toggle_Button(int x, int y, int w, int h, const char *label) {
return new GToggle_Button(x, y, w, h, label);
}
class GLight_Button : public EventHandler<Fl_Light_Button> {
public:
GLight_Button(int x, int y, int w, int h, const char *label)
: EventHandler<Fl_Light_Button>(x, y, w, h, label) {}
};
GLight_Button *go_fltk_new_Light_Button(int x, int y, int w, int h, const char *label) {
return new GLight_Button(x, y, w, h, label);
}
class GRadio_Button : public EventHandler<Fl_Radio_Button> {
public:
GRadio_Button(int x, int y, int w, int h, const char *label)
: EventHandler<Fl_Radio_Button>(x, y, w, h, label) {}
};
GRadio_Button *go_fltk_new_Radio_Button(int x, int y, int w, int h, const char *label) {
return new GRadio_Button(x, y, w, h, label);
}
class GReturn_Button : public EventHandler<Fl_Return_Button> {
public:
GReturn_Button(int x, int y, int w, int h, const char *label)
: EventHandler<Fl_Return_Button>(x, y, w, h, label) {}
};
GReturn_Button *go_fltk_new_Return_Button(int x, int y, int w, int h, const char *label) {
return new GReturn_Button(x, y, w, h, label);
}
class GRadio_Round_Button : public EventHandler<Fl_Radio_Round_Button> {
public:
GRadio_Round_Button(int x, int y, int w, int h, const char *label)
: EventHandler<Fl_Radio_Round_Button>(x, y, w, h, label) {}
};
GRadio_Round_Button *go_fltk_new_Radio_Round_Button(int x, int y, int w, int h, const char *label) {
return new GRadio_Round_Button(x, y, w, h, label);
}