ui/gtk/container.c

changeset 62
70d2aee84432
parent 59
eb6611be50c7
child 65
4697592e24ba
equal deleted inserted replaced
61:7ee124a58fe3 62:70d2aee84432
103 gtk_box_pack_start(GTK_BOX(ct->widget), widget, expand, fill, 0); 103 gtk_box_pack_start(GTK_BOX(ct->widget), widget, expand, fill, 0);
104 104
105 ui_reset_layout(ct->layout); 105 ui_reset_layout(ct->layout);
106 } 106 }
107 107
108 UIWIDGET ui_vbox(UiObject *obj) {
109 UiContainer *ct = uic_get_current_container(obj);
110
111 GtkWidget *vbox = ui_gtk_vbox_new();
112 ct->add(ct, vbox, TRUE);
113
114 UiObject *newobj = uic_object_new(obj, vbox);
115 newobj->container = ui_box_container(obj, vbox);
116 uic_obj_add(obj, newobj);
117
118 return vbox;
119 }
120
121 UIWIDGET ui_hbox(UiObject *obj) {
122 UiContainer *ct = uic_get_current_container(obj);
123
124 GtkWidget *hbox = ui_gtk_hbox_new();
125 ct->add(ct, hbox, TRUE);
126
127 UiObject *newobj = uic_object_new(obj, hbox);
128 newobj->container = ui_box_container(obj, hbox);
129 uic_obj_add(obj, newobj);
130
131 return hbox;
132 }
133
108 134
109 /* -------------------- Sidebar -------------------- */ 135 /* -------------------- Sidebar -------------------- */
110 UIWIDGET ui_sidebar(UiObject *obj) { 136 UIWIDGET ui_sidebar(UiObject *obj) {
111 #ifdef UI_GTK3 137 #ifdef UI_GTK3
112 GtkWidget *paned = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL); 138 GtkWidget *paned = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL);

mercurial