swamigui Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces |
SwamiguiTreeStore; #define SWAMIGUI_TREE_ERRMSG_PARENT_NOT_IN_TREE #define SWAMIGUI_TREE_ERRMSG_ITEM_NOT_IN_TREE void swamigui_tree_store_insert (SwamiguiTreeStore *store
,GObject *item
,const char *label
,char *icon
,GtkTreeIter *parent
,int pos
,GtkTreeIter *out_iter
); void swamigui_tree_store_insert_before (SwamiguiTreeStore *store
,GObject *item
,const char *label
,char *icon
,GtkTreeIter *parent
,GtkTreeIter *sibling
,GtkTreeIter *out_iter
); void swamigui_tree_store_insert_after (SwamiguiTreeStore *store
,GObject *item
,const char *label
,char *icon
,GtkTreeIter *parent
,GtkTreeIter *sibling
,GtkTreeIter *out_iter
); void swamigui_tree_store_change (SwamiguiTreeStore *store
,GObject *item
,const char *label
,char *icon
); void swamigui_tree_store_remove (SwamiguiTreeStore *store
,GObject *item
); void swamigui_tree_store_move_before (SwamiguiTreeStore *store
,GObject *item
,GtkTreeIter *position
); void swamigui_tree_store_move_after (SwamiguiTreeStore *store
,GObject *item
,GtkTreeIter *position
); gboolean swamigui_tree_store_item_get_node (SwamiguiTreeStore *store
,GObject *item
,GtkTreeIter *iter
); GObject * swamigui_tree_store_node_get_item (SwamiguiTreeStore *store
,GtkTreeIter *iter
); void swamigui_tree_store_add (SwamiguiTreeStore *store
,GObject *item
); void swamigui_tree_store_changed (SwamiguiTreeStore *store
,GObject *item
);
SwamiguiTreeStore implements GtkTreeModel, GtkTreeDragSource, GtkTreeDragDest, GtkTreeSortable and GtkBuildable.
#define SWAMIGUI_TREE_ERRMSG_PARENT_NOT_IN_TREE "Parent not in tree store"
#define SWAMIGUI_TREE_ERRMSG_ITEM_NOT_IN_TREE "Item not in tree store"
void swamigui_tree_store_insert (SwamiguiTreeStore *store
,GObject *item
,const char *label
,char *icon
,GtkTreeIter *parent
,int pos
,GtkTreeIter *out_iter
);
Creates a new tree node and inserts it at the position given by
parent
and pos
, returning the created node in out_iter
(if
supplied). item
is an object to link with the created node.
It is also used if either label
or icons
is NULL
in which case
it obtains the information via other methods.
|
Swami tree store to insert tree node into |
|
Object to link to tree node or NULL
|
|
Label for node or NULL to try and obtain it other ways.
|
|
Stock ID of icon (NULL to use "icon" type property or category icon)
|
|
Pointer to parent tree node or NULL if inserting a toplevel node
|
|
Position to insert new node at (0 = prepend, > sibling list to append) |
|
Pointer to a user supplied GtkTreeIter structure to store the
new node in or NULL to ignore.
|
void swamigui_tree_store_insert_before (SwamiguiTreeStore *store
,GObject *item
,const char *label
,char *icon
,GtkTreeIter *parent
,GtkTreeIter *sibling
,GtkTreeIter *out_iter
);
Like swamigui_tree_store_insert()
but inserts the node before the
specified sibling
instead.
|
Swami tree store to insert tree node into |
|
Object to link to tree node or NULL
|
|
Label for node or NULL to try and obtain it other ways.
|
|
Stock ID of icon (NULL to use "icon" type property or category icon)
|
|
Pointer to parent tree node or NULL if inserting a toplevel node
|
|
A sibling node to insert the new node before or NULL to append
|
|
Pointer to a user supplied GtkTreeIter structure to store the
new node in or NULL to ignore.
|
void swamigui_tree_store_insert_after (SwamiguiTreeStore *store
,GObject *item
,const char *label
,char *icon
,GtkTreeIter *parent
,GtkTreeIter *sibling
,GtkTreeIter *out_iter
);
Like swamigui_tree_store_insert()
but inserts the node after the
specified sibling
instead.
|
Swami tree store to insert tree node into |
|
Object to link to tree node or NULL
|
|
Label for node or NULL to try and obtain it other ways.
|
|
Stock ID of icon (NULL to use "icon" type property or category icon)
|
|
Pointer to parent tree node or NULL if inserting a toplevel node
|
|
A sibling node to insert the new node after or NULL to prepend
|
|
Pointer to a user supplied GtkTreeIter structure to store the
new node in or NULL to ignore.
|
void swamigui_tree_store_change (SwamiguiTreeStore *store
,GObject *item
,const char *label
,char *icon
);
Changes a row in a Swami tree store.
void swamigui_tree_store_remove (SwamiguiTreeStore *store
,GObject *item
);
Removes a node (and all its children) from a Swami tree store.
|
Swami tree store |
|
Object in store to remove
|
void swamigui_tree_store_move_before (SwamiguiTreeStore *store
,GObject *item
,GtkTreeIter *position
);
Move an item from its current location to before position
. position
must be at the same level as item
in the tree.
|
Swami tree store |
|
Item to move |
|
Location to move item before or NULL for last position
|
void swamigui_tree_store_move_after (SwamiguiTreeStore *store
,GObject *item
,GtkTreeIter *position
);
Move an item from its current location to after position
. position
must be at the same level as item
in the tree.
|
Swami tree store |
|
Item to move |
|
Location to move item after or NULL for first position
|
gboolean swamigui_tree_store_item_get_node (SwamiguiTreeStore *store
,GObject *item
,GtkTreeIter *iter
);
Gets a tree node for item
in store
. The tree node is stored in iter
which
should be a pointer to a user supplied GtkTreeIter structure.
GObject * swamigui_tree_store_node_get_item (SwamiguiTreeStore *store
,GtkTreeIter *iter
);
Gets the linked item object for iter
node in store
. The returned item
is not referenced but can be safely used as long as the tree model isn't
changed (possibly causing item to be destroyed). The item should be ref'd
if used for extended periods.
|
Swami tree store |
|
Node in store to find linked item of
|
Returns : |
The item object linked with iter node or NULL if not found.
Item has NOT been referenced, see note above.
|
void swamigui_tree_store_add (SwamiguiTreeStore *store
,GObject *item
);
Add an item to a tree store using the item_add class method (specific to tree store types).
|
Swami tree store |
|
Item to add |
void swamigui_tree_store_changed (SwamiguiTreeStore *store
,GObject *item
);
This function updates the title and sorting of an item that changed using the item_changed class method (specific to tree store types). Note that re-ordering of the changed item may occur in a delayed fashion, to prevent delays while user is typing a name for example.
|
Swami tree store |
|
Item that changed |