| 1160 memset(ct, 0, sizeof(UiSplitPane)); |
1160 memset(ct, 0, sizeof(UiSplitPane)); |
| 1161 ct->current_pane = pane; |
1161 ct->current_pane = pane; |
| 1162 ct->orientation = orientation; |
1162 ct->orientation = orientation; |
| 1163 ct->max = max; |
1163 ct->max = max; |
| 1164 ct->initial_position = init; |
1164 ct->initial_position = init; |
| 1165 ct->children = cxArrayListCreateSimple(CX_STORE_POINTERS, 4); |
1165 ct->children = cxArrayListCreate(NULL, CX_STORE_POINTERS, 4); |
| 1166 return ct; |
1166 return ct; |
| 1167 } |
1167 } |
| 1168 |
1168 |
| 1169 UiContainerX* ui_splitpane_container(UiObject *obj, GtkWidget *pane, UiSplitPane *data) { |
1169 UiContainerX* ui_splitpane_container(UiObject *obj, GtkWidget *pane, UiSplitPane *data) { |
| 1170 UiSplitPaneContainer *ct = ui_calloc(obj->ctx, 1, sizeof(UiSplitPaneContainer)); |
1170 UiSplitPaneContainer *ct = ui_calloc(obj->ctx, 1, sizeof(UiSplitPaneContainer)); |
| 1244 } |
1244 } |
| 1245 |
1245 |
| 1246 static void update_itemlist(UiList *list, int c) { |
1246 static void update_itemlist(UiList *list, int c) { |
| 1247 UiGtkItemListContainer *ct = list->obj; |
1247 UiGtkItemListContainer *ct = list->obj; |
| 1248 |
1248 |
| 1249 CxMap *new_items = cxHashMapCreateSimple(CX_STORE_POINTERS); |
1249 CxMap *new_items = cxHashMapCreate(NULL, CX_STORE_POINTERS, 32); |
| 1250 new_items->collection.advanced_destructor = remove_item; |
1250 new_items->collection.advanced_destructor = remove_item; |
| 1251 new_items->collection.destructor_data = ct; |
1251 new_items->collection.destructor_data = ct; |
| 1252 |
1252 |
| 1253 // only create new widgets for new elements, so at first we have |
1253 // only create new widgets for new elements, so at first we have |
| 1254 // to find which elements are new |
1254 // to find which elements are new |
| 1329 container->widget = box; |
1329 container->widget = box; |
| 1330 container->container = (UiContainerPrivate*)ui_box_container(obj, box, args->container); |
1330 container->container = (UiContainerPrivate*)ui_box_container(obj, box, args->container); |
| 1331 container->create_ui = args->create_ui; |
1331 container->create_ui = args->create_ui; |
| 1332 container->userdata = args->userdata; |
1332 container->userdata = args->userdata; |
| 1333 container->subcontainer = args->subcontainer; |
1333 container->subcontainer = args->subcontainer; |
| 1334 container->current_items = cxHashMapCreateSimple(CX_STORE_POINTERS); |
1334 container->current_items = cxHashMapCreate(NULL, CX_STORE_POINTERS, 32); |
| 1335 container->current_items->collection.advanced_destructor = remove_item; |
1335 container->current_items->collection.advanced_destructor = remove_item; |
| 1336 container->current_items->collection.destructor_data = container; |
1336 container->current_items->collection.destructor_data = container; |
| 1337 container->margin = args->sub_margin; |
1337 container->margin = args->sub_margin; |
| 1338 container->spacing = args->sub_spacing; |
1338 container->spacing = args->sub_spacing; |
| 1339 container->columnspacing = args->sub_columnspacing; |
1339 container->columnspacing = args->sub_columnspacing; |