/* Adds the GtkTreeItem in tree_item to the start of the items in tree. */ int clip_GTK_TREEPREPEND(ClipMachine * cm) { C_widget *ctree = _fetch_cw_arg(cm); C_widget *citem = _fetch_cwidget(cm,_clip_spar(cm,2)); CHECKCWID(ctree,GTK_IS_TREE); CHECKOPT2(2,MAP_t,NUMERIC_t); CHECKCWID(citem,GTK_TREE_ITEM); gtk_tree_prepend(GTK_TREE(ctree->widget), citem->widget); return 0; err: return 1; }
/* Adds the GtkTreeItem in tree_item to the start of the items in tree. */ int clip_GTK_TREEPREPEND(ClipMachine * ClipMachineMemory) { C_widget *ctree = _fetch_cw_arg(ClipMachineMemory); C_widget *citem = _fetch_cwidget(ClipMachineMemory, _clip_spar(ClipMachineMemory, 2)); CHECKCWID(ctree, GTK_IS_TREE); CHECKOPT2(2, MAP_type_of_ClipVarType, NUMERIC_type_of_ClipVarType); CHECKCWID(citem, GTK_TREE_ITEM); gtk_tree_prepend(GTK_TREE(ctree->widget), citem->widget); return 0; err: return 1; }
/*** sfeRebuildUI - take the structure file data and completely rebuild the *** user interface representation, including the treeview navigation. ***/ int sfeRebuildUI(pStructInf new_data, GtkTree *treeview) { GtkWidget *treeitem, *subtree; /** Clear any existing treeview content. **/ gtk_tree_clear_items(treeview, 0, 9999); /** Add a root item **/ treeitem = sfeBuildTreeItemWithImage(new_data); gtk_tree_prepend(treeview, treeitem); gtk_widget_show(treeitem); /** Build the tree, recursively. **/ sfeRebuildUI_r(new_data, GTK_TREE_ITEM(treeitem)); /** Expand the root node **/ gtk_tree_item_expand(GTK_TREE_ITEM(treeitem)); return 0; }