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 #import "toolkit.h"
30 #import "Container.h"
31
32 #import "../ui/entry.h"
33
34 @interface UiSpinBox : NSObject<NSTextFieldDelegate>
35
36 @property UiObject *obj;
37 @property (weak) NSTextField *textfield;
38 @property (weak) NSStepper *stepper;
39 @property
BOOL isInteger;
40 @property ui_callback onchange;
41 @property
void* onchangedata;
42 @property UiObserver **observers;
43
44 - (UiSpinBox*)init;
45
46 - (
void)valueChanged;
47 - (
void)stepperChanged:(id)sender;
48 - (
void) controlTextDidChange:(NSNotification *) obj;
49
50 @end
51
52 int64_t ui_spinbutton_getint(UiInteger *i);
53 void ui_spinbutton_setint(UiInteger *i,
int64_t val);
54
55 double ui_spinbutton_getdouble(UiDouble *d);
56 void ui_spinbutton_setdouble(UiDouble *d,
double val);
57
58 double ui_spinbutton_getrangeval(UiRange *r);
59 void ui_spinbutton_setrangeval(UiRange *r,
double val);
60 void ui_spinbutton_setrange(UiRange *r,
double min,
double max);
61 void ui_spinbutton_setextent(UiRange *r,
double extent);
62