(gtk.info) GtkCTree
Info Catalog
(gtk.info) GtkContainer
(gtk.info) Widgets
(gtk.info) GtkCurve
The multi-column tree widget
============================
Description
-----------
The GtkCTree widget is a multi-columned list with a designated
column, the `tree column', to display hierarchically-organized data.
Each node is either a folder (a branch of the tree) or a leaf. Nodes
can be (recursively) expanded, collapsed, (un)selected, removed, moved,
sorted etc.
GtkCTree is a descendant of GtkCList. Therefore, a cell in a
column other than the tree column can only contain a string, a pixmap,
both or nothing. A node in the tree column can contain a string and up
to two pixmaps and masks, indicating the "folder openend" and "folder
closed" status.
Compared to GtkCList, there is no concept of row numbers. Therefore,
a number of GtkCList methods had to be re-implemented taking `GList
*node' arguments instead of `gint row'.
Options
-------
Signals
-------
- Signal: void GtkCTree::tree_expand (GtkCTree *CTREE, GList *NODE)
- Signal: void GtkCTree::tree_collapse (GtkCTree *CTREE, GList *NODE)
- Signal: void GtkCTree::tree_move (GtkCTree *CTREE, GList *NODE,
GList *NEW_PARENT, GList *NEW_SIBLING)
- Signal: void GtkCTree::tree_select_row (GtkCTree *CTREE, GList *ROW,
gint COLUMN)
- Signal: void GtkCTree::tree_unselect_row (GtkCTree *CTREE, GList
*ROW, gint COLUMN)
Functions
---------
- Function: GtkType gtk_ctree_get_type (void)
Returns the `GtkCTree' type identifier.
- Function: GtkWidget* gtk_ctree_new (gint COLUMNS, gint TREE_COLUMN)
Creates a new GtkCTree widget with the given number of columns and
the given tree column.
On success, a pointer to the newly created widget is returned, and
`NULL' otherwise.
- Function: GtkWidget* gtk_ctree_new_with_titles (gint COLUMNS, gint
TREE_COLUMN, gchar *TITLES[])
Creates a new GtkCTree widget with the given number of columns and
the given tree column. The column titles are initialized to the
strings of the array TITLES.
On success, a pointer to the newly created widget is returned, and
`NULL' otherwise.
- Function: GList* gtk_ctree_insert (GtkCTree *CTREE, GList *PARENT,
GList *SIBLING, gchar *TEXT[], guint8 SPACING, GdkPixmap
*PIXMAP_CLOSED, GdkPixmap *MASK_CLOSED, GdkPixmap
*PIXMAP_OPENED, GdkPixmap *MASK_OPENED, gboolean IS_LEAF,
gboolean EXPANDED)
Inserts a new node at the given position. If PARENT == NULL, the
node is inserted at root level. If SIBLING == NULL, the node is
appended to the existing list of siblings. Otherwise, the node is
inserted before SIBLING. If not NULL, the two pixmaps/masks are
used to indicate the opened/closed status of the node. SPACING is
the number of pixels between pixmap and text. If IS_LEAF == TRUE,
the node cannot have any children. The initial expanded/collapsed
status is given by EXPANDED.
On success, the pointer to the newly inserted node is returned,
and NULL otherwise.
- Function: void gtk_ctree_remove (GtkCTree *CTREE, GList *NODE)
Removes the given node and all its children.
- Function: void gtk_ctree_clear (GtkCTree *CTREE)
Removes all nodes of CTREE.
- Function: void gtk_ctree_post_recursive (GtkCTree *CTREE, GList
*NODE, GtkCTreeFunc FUNC, gpointer DATA)
Apply FUNC to NODE and all its children, traversing CTREE in
post-order.
- Function: void gtk_ctree_pre_recursive (GtkCTree *CTREE, GList
*NODE, GtkCTreeFunc FUNC, gpointer DATA)
Apply FUNC to NODE and all its children, traversing CTREE in
pre-order.
- Function: gboolean gtk_ctree_is_visible (GtkCTree *CTREE, GList
*NODE)
Returns the visibility status of the given node. A node is said to
be visible if in the chain of parent nodes every node is expanded.
Or : the node is currently being displayed (but not necessarily
inside the viewing area).
- Function: GtkCTree* GTK_CTREE (gpointer OBJ)
Cast a generic pointer to `GtkCTree*'. Standard Macros, for
more info.
- Function: GtkCTreeClass* GTK_CTREE_CLASS (gpointer CLASS)
Cast a generic pointer to `GtkCTreeClass*'. Standard
Macros, for more info.
- Function: gint GTK_IS_CTREE (gpointer OBJ)
Determine if a generic pointer refers to a `GtkCTree' object.
Standard Macros, for more info.
Info Catalog
(gtk.info) GtkContainer
(gtk.info) Widgets
(gtk.info) GtkCurve
automatically generated byinfo2html