32 #include "toolkit.h" |
32 #include "toolkit.h" |
33 |
33 |
34 #ifdef __cplusplus |
34 #ifdef __cplusplus |
35 extern "C" { |
35 extern "C" { |
36 #endif |
36 #endif |
37 |
|
38 UIWIDGET ui_button(UiObject *obj, char *label, ui_callback f, void *data); |
|
39 |
37 |
40 UIWIDGET ui_checkbox(UiObject *obj, char *label, UiInteger *value); |
38 typedef struct UiButtonArgs { |
41 UIWIDGET ui_checkbox_nv(UiObject *obj, char *label, char *varname); |
39 UiTri fill; |
|
40 UiBool hexpand; |
|
41 UiBool vexpand; |
|
42 int colspan; |
|
43 int rowspan; |
42 |
44 |
43 UIWIDGET ui_radiobutton(UiObject *obj, char *label, UiInteger *rgroup); |
45 char* label; |
44 UIWIDGET ui_radiobutton_nv(UiObject *obj, char *label, char *varname); |
46 char* stockid; |
|
47 ui_callback onclick; |
|
48 void* onclickdata; |
|
49 } UiButtonArgs; |
|
50 |
|
51 typedef struct UiToggleArgs { |
|
52 char* label; |
|
53 char* stockid; |
|
54 UiInteger* value; |
|
55 char* varname; |
|
56 } UiToggleArgs; |
|
57 |
|
58 #define ui_button(obj, ...) ui_button_create(obj, (UiButtonArgs){ __VA_ARGS__ } ) |
|
59 #define ui_checkbox(obj, ...) ui_checkbox_create(obj, (UiToggleArgs){ __VA_ARGS__ } ) |
|
60 #define ui_radiobutton(obj, ...) ui_checkbox_create(obj, (UiToggleArgs){ __VA_ARGS__ } ) |
|
61 |
|
62 UIWIDGET ui_button_create(UiObject* obj, UiButtonArgs args); |
|
63 UIWIDGET ui_checkbox_create(UiObject* obj, UiToggleArgs args); |
|
64 UIWIDGET ui_radiobutton_create(UiObject* obj, UiToggleArgs); |
|
65 |
|
66 UIWIDGET deprecated_ui_button(UiObject *obj, char *label, ui_callback f, void *data); |
|
67 |
|
68 UIWIDGET deprecated_ui_checkbox(UiObject *obj, char *label, UiInteger *value); |
|
69 UIWIDGET deprecated_ui_checkbox_nv(UiObject *obj, char *label, char *varname); |
|
70 |
|
71 UIWIDGET deprecated_ui_radiobutton(UiObject *obj, char *label, UiInteger *rgroup); |
|
72 UIWIDGET deprecated_ui_radiobutton_nv(UiObject *obj, char *label, char *varname); |
45 |
73 |
46 |
74 |
47 #ifdef __cplusplus |
75 #ifdef __cplusplus |
48 } |
76 } |
49 #endif |
77 #endif |