ui/gtk/container.c

changeset 166
6e48030cf2db
parent 165
3f32db79a76e
child 174
0358f1d9c506
equal deleted inserted replaced
165:3f32db79a76e 166:6e48030cf2db
34 #include "toolkit.h" 34 #include "toolkit.h"
35 35
36 #include "../common/context.h" 36 #include "../common/context.h"
37 #include "../common/object.h" 37 #include "../common/object.h"
38 38
39
40 void ui_container_begin_close(UiObject *obj) {
41 UiContainer *ct = uic_get_current_container(obj);
42 ct->close = 1;
43 }
44
45 int ui_container_finish(UiObject *obj) {
46 UiContainer *ct = uic_get_current_container(obj);
47 if(ct->close) {
48 ui_end(obj);
49 return 0;
50 }
51 return 1;
52 }
53
39 GtkWidget* ui_gtk_vbox_new(int spacing) { 54 GtkWidget* ui_gtk_vbox_new(int spacing) {
40 #ifdef UI_GTK3 55 #ifdef UI_GTK3
41 return gtk_box_new(GTK_ORIENTATION_VERTICAL, spacing); 56 return gtk_box_new(GTK_ORIENTATION_VERTICAL, spacing);
42 #else 57 #else
43 return gtk_vbox_new(FALSE, spacing); 58 return gtk_vbox_new(FALSE, spacing);

mercurial