blob: 52acf9d015872be15ce39bb887ca393677bb5b7f (
plain)
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
|
#ifndef __DRUMGIZMO_SCROLLBAR_H__
#define __DRUMGIZMO_SCROLLBAR_H__
#include "widget.h"
#include "image.h"
namespace GUI {
class ScrollBar : public Widget {
public:
ScrollBar(Widget *parent);
bool catchMouse() { return true; }
void setRange(int range);
int range();
void setMaximum(int max);
int maximum();
void setValue(int value);
int value();
void registerValueChangeHandler(void (*handler)(void *), void *ptr);
void repaintEvent(RepaintEvent *e);
void scrollEvent(ScrollEvent *e);
void buttonEvent(ButtonEvent *e);
void mouseMoveEvent(MouseMoveEvent *e);
private:
int max;
int val;
int ran;
int yoffset;
int value_offset;
bool dragging;
Image bg_img;
void (*handler)(void *);
void *ptr;
};
};
#endif
|