| 1139 printf("button clicked\n"); |
1139 printf("button clicked\n"); |
| 1140 } |
1140 } |
| 1141 |
1141 |
| 1142 void application_startup(UiEvent *event, void *data) { |
1142 void application_startup(UiEvent *event, void *data) { |
| 1143 UiObject *obj = ui_window("Test w32", NULL); |
1143 UiObject *obj = ui_window("Test w32", NULL); |
| 1144 ui_button(obj, .label = "Test", .hfill = TRUE, .hexpand = TRUE, .colspan = 3, .margin = 10); |
1144 |
| 1145 ui_button(obj, .label = "Test 2-1", .margin_left = 10); |
1145 ui_grid(obj, .margin = 10, .columnspacing = 10, .rowspacing = 10, .fill = TRUE) { |
| 1146 ui_button(obj, .label = "Test 2-2", .hfill = TRUE, .hexpand = TRUE, .margin_left = 20); |
1146 ui_button(obj, .label = "Test", .hfill = TRUE, .hexpand = TRUE, .colspan = 3, .margin = 10); |
| 1147 ui_button(obj, .label = "Test 2-3", .margin_left = 30); |
1147 ui_newline(obj); |
| 1148 ui_button(obj, .label = "Test 3XX", .colspan = 3, .fill = TRUE, .onclick = action_button); |
1148 |
| |
1149 ui_button(obj, .label = "Test 2-1"); |
| |
1150 ui_button(obj, .label = "Test 2-2"); |
| |
1151 ui_button(obj, .label = "Test 2-3"); |
| |
1152 ui_newline(obj); |
| |
1153 |
| |
1154 ui_button(obj, .label = "Test 3XX", .colspan = 3, .fill = TRUE, .onclick = action_button); |
| |
1155 } |
| |
1156 |
| |
1157 |
| |
1158 |
| 1149 ui_show(obj); |
1159 ui_show(obj); |
| 1150 } |
1160 } |
| 1151 |
1161 |
| 1152 int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { |
1162 int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { |
| 1153 ui_init("app1", 0, NULL); |
1163 ui_init("app1", 0, NULL); |