| 79 void* onchangedata; |
85 void* onchangedata; |
| 80 int enable_group; |
86 int enable_group; |
| 81 |
87 |
| 82 const int* groups; |
88 const int* groups; |
| 83 } UiToggleArgs; |
89 } UiToggleArgs; |
| |
90 |
| |
91 typedef struct UiLinkButtonArgs { |
| |
92 UiBool fill; |
| |
93 UiBool hexpand; |
| |
94 UiBool vexpand; |
| |
95 UiBool hfill; |
| |
96 UiBool vfill; |
| |
97 UiBool override_defaults; |
| |
98 int colspan; |
| |
99 int rowspan; |
| |
100 const char *name; |
| |
101 const char *style_class; |
| |
102 |
| |
103 const char *label; |
| |
104 const char *uri; |
| |
105 UiString *value; |
| |
106 const char *varname; |
| |
107 ui_callback onclick; |
| |
108 void *onclickdata; |
| |
109 UiBool nofollow; |
| |
110 UiLinkType type; |
| |
111 |
| |
112 const int* groups; |
| |
113 } UiLinkButtonArgs; |
| 84 |
114 |
| 85 #define ui_button(obj, ...) ui_button_create(obj, &(UiButtonArgs){ __VA_ARGS__ } ) |
115 #define ui_button(obj, ...) ui_button_create(obj, &(UiButtonArgs){ __VA_ARGS__ } ) |
| 86 #define ui_togglebutton(obj, ...) ui_togglebutton_create(obj, &(UiToggleArgs){ __VA_ARGS__ } ) |
116 #define ui_togglebutton(obj, ...) ui_togglebutton_create(obj, &(UiToggleArgs){ __VA_ARGS__ } ) |
| 87 #define ui_checkbox(obj, ...) ui_checkbox_create(obj, &(UiToggleArgs){ __VA_ARGS__ } ) |
117 #define ui_checkbox(obj, ...) ui_checkbox_create(obj, &(UiToggleArgs){ __VA_ARGS__ } ) |
| 88 #define ui_switch(obj, ...) ui_switch_create(obj, &(UiToggleArgs){ __VA_ARGS__ } ) |
118 #define ui_switch(obj, ...) ui_switch_create(obj, &(UiToggleArgs){ __VA_ARGS__ } ) |
| 89 #define ui_radiobutton(obj, ...) ui_radiobutton_create(obj, &(UiToggleArgs){ __VA_ARGS__ } ) |
119 #define ui_radiobutton(obj, ...) ui_radiobutton_create(obj, &(UiToggleArgs){ __VA_ARGS__ } ) |
| |
120 #define ui_linkbutton(obj, ...) ui_linkbutton_create(obj, &(UiLinkButtonArgs){ __VA_ARGS__ }) |
| 90 |
121 |
| 91 UIEXPORT UIWIDGET ui_button_create(UiObject* obj, UiButtonArgs *args); |
122 UIEXPORT UIWIDGET ui_button_create(UiObject *obj, UiButtonArgs *args); |
| 92 UIEXPORT UIWIDGET ui_togglebutton_create(UiObject* obj, UiToggleArgs *args); |
123 UIEXPORT UIWIDGET ui_togglebutton_create(UiObject *obj, UiToggleArgs *args); |
| 93 UIEXPORT UIWIDGET ui_checkbox_create(UiObject* obj, UiToggleArgs *args); |
124 UIEXPORT UIWIDGET ui_checkbox_create(UiObject *obj, UiToggleArgs *args); |
| 94 UIEXPORT UIWIDGET ui_switch_create(UiObject* obj, UiToggleArgs *args); |
125 UIEXPORT UIWIDGET ui_switch_create(UiObject *obj, UiToggleArgs *args); |
| 95 UIEXPORT UIWIDGET ui_radiobutton_create(UiObject* obj, UiToggleArgs *args); |
126 UIEXPORT UIWIDGET ui_radiobutton_create(UiObject *obj, UiToggleArgs *args); |
| |
127 UIEXPORT UIWIDGET ui_linkbutton_create(UiObject *obj, UiLinkButtonArgs *args); |
| 96 |
128 |
| |
129 UIEXPORT void ui_button_set_label(UIWIDGET button, const char *label); |
| |
130 UIEXPORT void ui_button_set_icon(UIWIDGET button, const char *icon); |
| 97 |
131 |
| |
132 UIEXPORT void ui_linkbutton_value_set(UiString *str, const char *label, const char *uri); |
| |
133 UIEXPORT void ui_linkbutton_value_set_label(UiString *str, const char *label); |
| |
134 UIEXPORT void ui_linkbutton_value_set_uri(UiString *str, const char *uri); |
| |
135 UIEXPORT void ui_linkbutton_value_set_visited(UiString *str, UiBool visited); |
| 98 |
136 |
| |
137 UIEXPORT void ui_linkbutton_set_label(UIWIDGET button, const char *label); |
| |
138 UIEXPORT void ui_linkbutton_set_uri(UIWIDGET button, const char *label); |
| |
139 UIEXPORT void ui_linkbutton_set_visited(UIWIDGET button, UiBool visited); |
| |
140 UIEXPORT char* ui_linkbutton_get_label(UIWIDGET button); |
| |
141 UIEXPORT char* ui_linkbutton_get_uri(UIWIDGET button); |
| |
142 UIEXPORT UiBool ui_linkbutton_get_visited(UIWIDGET button); |
| 99 |
143 |
| 100 #ifdef __cplusplus |
144 #ifdef __cplusplus |
| 101 } |
145 } |
| 102 #endif |
146 #endif |
| 103 |
147 |