279 } |
279 } |
280 |
280 |
281 |
281 |
282 |
282 |
283 UIWIDGET ui_grid_create(UiObject *obj, UiContainerArgs args) { |
283 UIWIDGET ui_grid_create(UiObject *obj, UiContainerArgs args) { |
284 UiContainer *ct = uic_get_current_container(obj); |
284 UiObject* current = uic_current_obj(obj); |
|
285 UI_APPLY_LAYOUT1(current, args); |
285 GtkWidget *widget; |
286 GtkWidget *widget; |
286 |
287 |
287 #ifdef UI_GTK3 |
288 #ifdef UI_GTK3 |
288 GtkWidget *grid = gtk_grid_new(); |
289 GtkWidget *grid = gtk_grid_new(); |
289 gtk_grid_set_column_spacing(GTK_GRID(grid), args.columnspacing); |
290 gtk_grid_set_column_spacing(GTK_GRID(grid), args.columnspacing); |
312 widget = a; |
313 widget = a; |
313 } else { |
314 } else { |
314 widget = grid; |
315 widget = grid; |
315 } |
316 } |
316 #endif |
317 #endif |
317 ct->add(ct, widget, TRUE); |
318 current->container->add(current->container, widget, TRUE); |
318 |
319 |
319 UiObject *newobj = uic_object_new(obj, grid); |
320 UiObject *newobj = uic_object_new(obj, grid); |
320 newobj->container = ui_grid_container(obj, grid); |
321 newobj->container = ui_grid_container(obj, grid); |
321 uic_obj_add(obj, newobj); |
322 uic_obj_add(obj, newobj); |
322 |
323 |
323 return widget; |
324 return widget; |
|
325 } |
|
326 |
|
327 |
|
328 UIWIDGET ui_scrolledwindow_create(UiObject* obj, UiFrameArgs args) { |
|
329 UiObject* current = uic_current_obj(obj); |
|
330 UI_APPLY_LAYOUT1(current, args); |
|
331 |
|
332 GtkWidget *sw = gtk_scrolled_window_new(NULL, NULL); |
|
333 UiObject *newobj = uic_object_new(obj, sw); |
|
334 newobj->container = ui_scrolledwindow_container(obj, sw); |
|
335 uic_obj_add(obj, newobj); |
|
336 |
|
337 return sw; |
324 } |
338 } |
325 |
339 |
326 |
340 |
327 void ui_select_tab(UIWIDGET tabview, int tab) { |
341 void ui_select_tab(UIWIDGET tabview, int tab) { |
328 gtk_notebook_set_current_page(GTK_NOTEBOOK(tabview), tab); |
342 gtk_notebook_set_current_page(GTK_NOTEBOOK(tabview), tab); |