ui/ui/entry.h

branch
newapi
changeset 264
24d9a92fd048
parent 145
853685152c1d
equal deleted inserted replaced
263:a0ea718ab1d8 264:24d9a92fd048
33 33
34 #ifdef __cplusplus 34 #ifdef __cplusplus
35 extern "C" { 35 extern "C" {
36 #endif 36 #endif
37 37
38 UIWIDGET ui_spinner(UiObject *obj, int step, UiInteger *i);
39 UIWIDGET ui_spinnerf(UiObject *obj, double step, int digits, UiDouble *d);
40 UIWIDGET ui_spinnerr(UiObject *obj, UiRange *r);
41 38
42 UIWIDGET ui_spinner_nv(UiObject *obj, int step, char *varname); 39 typedef struct UiSpinnerArgs {
43 UIWIDGET ui_spinnerf_nv(UiObject *obj, double step, int digits, char *varname); 40 UiTri fill;
44 UIWIDGET ui_spinnerr_nv(UiObject *obj, char *varname); 41 UiBool hexpand;
42 UiBool vexpand;
43 int colspan;
44 int rowspan;
45
46 double step;
47 int digits;
48 UiInteger *intvalue;
49 UiDouble* doublevalue;
50 UiRange *rangevalue;
51 const char* varname;
52 ui_callback onchange;
53 void* onchangedata;
54 } UiSpinnerArgs;
55
56
57
58 UIWIDGET ui_spinner_create(UiObject *obj, UiSpinnerArgs args);
59
60 #define ui_spinner(obj, ...) ui_spinner_create(obj, (UiSpinnerArgs){ __VA_ARGS__ } )
45 61
46 void ui_spinner_setrange(UIWIDGET spinner, double min, double max); 62 void ui_spinner_setrange(UIWIDGET spinner, double min, double max);
47 void ui_spinner_setdigits(UIWIDGET spinner, int digits); 63 void ui_spinner_setdigits(UIWIDGET spinner, int digits);
48 64
49 #ifdef __cplusplus 65 #ifdef __cplusplus

mercurial