GtkCTree: GtkCTree

Description Methods and Functions Hierarchy Interfaces Detailed Description Structures Convenient Construction Enums and Flags User Functions Signals Properties Author(s) References

Description

A widget displaying a hierarchical tree

Methods and Functions

gtkCTreeNewWithTitles(columns = 1, tree.column = 0, titles, show = TRUE)
gtkCTreeNew(columns = 1, tree.column = 0, show = TRUE)
gtkCTreeInsertNode(object, parent, sibling, text, spacing = 5, pixmap.closed = NULL, mask.closed = NULL, pixmap.opened = NULL, mask.opened = NULL, is.leaf = 1, expanded = 0)
gtkCTreeRemoveNode(object, node)
gtkCTreeInsertGnode(object, parent, sibling, gnode, func, data = NULL)
gtkCTreeExportToGnode(object, parent, sibling, node, func, data = NULL)
gtkCTreePostRecursive(object, node, func, data = NULL)
gtkCTreePostRecursiveToDepth(object, node, depth, func, data = NULL)
gtkCTreePreRecursive(object, node, func, data = NULL)
gtkCTreePreRecursiveToDepth(object, node, depth, func, data = NULL)
gtkCTreeIsViewable(object, node)
gtkCTreeLast(object, node)
gtkCTreeFindNodePtr(object, ctree.row)
gtkCTreeFind(object, node, child)
gtkCTreeIsAncestor(object, node, child)
gtkCTreeFindByRowData(object, node, data = NULL)
gtkCTreeFindAllByRowData(object, node, data = NULL)
gtkCTreeFindByRowDataCustom(object, node, data = NULL, func)
gtkCTreeFindAllByRowDataCustom(object, node, data = NULL, func)
gtkCTreeIsHotSpot(object, x, y)
gtkCTreeMove(object, node, new.parent = NULL, new.sibling = NULL)
gtkCTreeExpand(object, node)
gtkCTreeExpandRecursive(object, node)
gtkCTreeExpandToDepth(object, node, depth)
gtkCTreeCollapse(object, node)
gtkCTreeCollapseRecursive(object, node)
gtkCTreeCollapseToDepth(object, node, depth)
gtkCTreeToggleExpansion(object, node)
gtkCTreeToggleExpansionRecursive(object, node)
gtkCTreeSelect(object, node)
gtkCTreeSelectRecursive(object, node)
gtkCTreeUnselect(object, node)
gtkCTreeUnselectRecursive(object, node)
gtkCTreeRealSelectRecursive(object, node, state)
gtkCTreeNodeSetText(object, node, column, text)
gtkCTreeNodeSetPixmap(object, node, column, pixmap, mask = NULL)
gtkCTreeNodeSetPixtext(object, node, column, text, spacing, pixmap, mask = NULL)
gtkCTreeSetNodeInfo(object, node, text, spacing, pixmap.closed = NULL, mask.closed = NULL, pixmap.opened = NULL, mask.opened = NULL, is.leaf, expanded)
gtkCTreeNodeSetShift(object, node, column, vertical, horizontal)
gtkCTreeNodeSetSelectable(object, node, selectable)
gtkCTreeNodeGetSelectable(object, node)
gtkCTreeNodeGetCellType(object, node, column)
gtkCTreeNodeGetText(object, node, column)
gtkCTreeNodeGetPixmap(object, node, column)
gtkCTreeNodeGetPixtext(object, node, column)
gtkCTreeGetNodeInfo(object, node)
gtkCTreeNodeSetRowStyle(object, node, style)
gtkCTreeNodeGetRowStyle(object, node)
gtkCTreeNodeSetCellStyle(object, node, column, style)
gtkCTreeNodeGetCellStyle(object, node, column)
gtkCTreeNodeSetForeground(object, node, color)
gtkCTreeNodeSetBackground(object, node, color)
gtkCTreeNodeSetRowData(object, node, data)
gtkCTreeNodeSetRowDataFull(object, node, data)
gtkCTreeNodeGetRowData(object, node)
gtkCTreeNodeMoveto(object, node, column, row.align, col.align)
gtkCTreeNodeIsVisible(object, node)
gtkCTreeSetIndent(object, indent)
gtkCTreeSetSpacing(object, spacing)
gtkCTreeSetLineStyle(object, line.style)
gtkCTreeSetExpanderStyle(object, expander.style)
gtkCTreeSetDragCompareFunc(object, cmp.func)
gtkCTreeSortNode(object, node)
gtkCTreeSortRecursive(object, node)
gtkCTreeNodeNth(object, row)
gtkCTreeSetShowStub(object, show.stub)
gtkCTree(columns = 1, tree.column = 0, titles, show = TRUE)

Hierarchy

1
2
3
4
5
6
7
GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkCList
                                 +----GtkCTree

Interfaces

GtkCTree implements AtkImplementorIface and GtkBuildable.

Detailed Description

The GtkCTree widget is used for showing a hierarchical tree to the user, for example a directory tree.

The tree is internally represented as a set of GtkCTreeNode structures.

The interface has much in common with the GtkCList widget: rows (nodes) can be selected by the user etc.

Positions in the tree are often indicated by two arguments, a parent and a sibling, both GtkCTreeNode pointers. If the parent is NULL, the position is at the root of the tree and if the sibling is NULL, it will be the last child of parent, otherwise it will be inserted just before the sibling.

GtkCTree has been deprecated since GTK+ 2.0 and should not be used in newly written code. Use GtkTreeView instead.

Structures

GtkCTree

WARNING: GtkCTree is deprecated and should not be used in newly-written code. The GtkCTree contains the following user-accessible fields. These fields should be considered read-only; to set the values, use the methods below.

integer tree_indent ; The number of pixels each successive level of the tree is indented in the display.
integer tree_spacing ; The space in pixels between the graphical tree and the text in the node.
integer tree_column ; The index of the column for which the tree graphics is drawn.
GtkCTreeLineStyle line_style ; The style in which the lines in the tree graphics are drawn.
GtkCTreeExpanderStyle expander_style ; The style in which the expander buttons are drawn.
GtkCTreeExpanderStyle expander_style ; FIXME.
GtkCTreeRow

WARNING: GtkCTreeRow is deprecated and should not be used in newly-written code. A structure representing a single row in the tree graph. The values inside the structure should be considered read-only. This structure is derived from the GtkCListRow structure.

GtkCTreeNode * parent ; The parent node of the node corresponding to this row.
GtkCTreeNode * sibling ; The next sibling node of the node corresponding to this row.
GtkCTreeNode * children ; The first child node corresponding to this row; to access the other children, just use the siblings of that node.
GdkPixmap * pixmap_closed ; The pixmap to be shown when the node is collapsed.
GdkBitmap * mask_closed ; The mask for the above pixmap.
GdkPixmap * pixmap_opened ; The pixmap to be shown when the node is expanded.
GdkBitmap * mask_opened ; The mask for the above pixmap.
integer level ; The level of this node in the tree.
numeric is_leaf : 1; Whether this row is a leaf.
numeric expanded : 1; Whether the children of this row are visible.
GtkCTreeNode

WARNING: GtkCTreeNode is deprecated and should not be used in newly-written code. This structure is opaque - you should use the functions GTK_CTREE_ROW, GTK_CTREE_NODE_NEXT etc. as well as the functions below to access it.

Convenient Construction

gtkCTree is the result of collapsing the constructors of GtkCTree (gtkCTreeNewWithTitles, gtkCTreeNew) and accepts a subset of its arguments matching the required arguments of one of its delegate constructors.

Enums and Flags

GtkCTreePos

WARNING: GtkCTreePos is deprecated and should not be used in newly-written code. A value specifying the position of a new node relative to an old one.

GTK_CTREE_POS_BEFORE As a sibling, before the specified node.
GTK_CTREE_POS_AS_CHILD As a child of the specified node.
GTK_CTREE_POS_AFTER As a sibling, after the specified node.
before

undocumented

as-child

undocumented

after

undocumented

GtkCTreeLineStyle

WARNING: GtkCTreeLineStyle is deprecated and should not be used in newly-written code. The appearance of the lines in the tree graphics.

GTK_CTREE_LINES_NONE No lines.
GTK_CTREE_LINES_SOLID Solid lines.
GTK_CTREE_LINES_DOTTED Dotted lines.
GTK_CTREE_LINES_TABBED FIXME.
none

undocumented

solid

undocumented

dotted

undocumented

tabbed

undocumented

GtkCTreeExpanderStyle

WARNING: GtkCTreeExpanderStyle is deprecated and should not be used in newly-written code. The appearance of the expander buttons, i.e. the small buttons which expand or contract parts of the tree when pressed.

GTK_CTREE_EXPANDER_NONE No expanders.
GTK_CTREE_EXPANDER_SQUARE Square expanders.
GTK_CTREE_EXPANDER_TRIANGLE Triangular expanders.
GTK_CTREE_EXPANDER_CIRCULAR Round expanders.
none

undocumented

square

undocumented

triangle

undocumented

circular

undocumented

GtkCTreeExpansionType

WARNING: GtkCTreeExpansionType is deprecated and should not be used in newly-written code. How to expand or collapse a part of a tree.

GTK_CTREE_EXPANSION_EXPAND Expand this node.
GTK_CTREE_EXPANSION_EXPAND_RECURSIVE Expand this node and everything below it in the hierarchy.
GTK_CTREE_EXPANSION_COLLAPSE Collapse this node.
GTK_CTREE_EXPANSION_COLLAPSE_RECURSIVE Collapse this node and everything below it in the hierarchy.
GTK_CTREE_EXPANSION_TOGGLE Toggle this node (i.e. expand if collapsed and vice versa).
GTK_CTREE_EXPANSION_TOGGLE_RECURSIVE Toggle this node and everything below it in the hierarchy.
expand

undocumented

expand-recursive

undocumented

collapse

undocumented

collapse-recursive

undocumented

toggle

undocumented

toggle-recursive

undocumented

User Functions

GtkCTreeFunc(ctree, node, data)

A generic callback type to do something with a particular node.

ctree

The GtkCTree object.

node

The GtkCTreeNode in the tree.

data

The user data associated with the node.

GtkCTreeGNodeFunc()

FIXME

GtkCTreeCompareDragFunc()

FIXME

Signals

change-focus-row-expansion(ctree, expansion, user.data)

The row which has the focus is either collapsed or expanded or toggled.

ctree

the object which received the signal.

expansion

What is being done.

user.data

user data set when the signal handler was connected.

tree-collapse(ctree, user.data)

Emitted when a node is collapsed.

ctree

the object which received the signal.

user.data

user data set when the signal handler was connected.

tree-expand(ctree, user.data)

Emitted when a node is expanded.

ctree

the object which received the signal.

user.data

user data set when the signal handler was connected.

tree-move(ctree, node, new.parent, new.sibling, user.data)

Emitted when a node is moved.

ctree

the object which received the signal.

node

The node that is moved.

new.parent

The new parent of the node.

new.sibling

The new sibling of the node.

user.data

user data set when the signal handler was connected.

tree-select-row(ctree, node, column, user.data)

Emitted when a row is selected.

ctree

the object which received the signal.

node

The node corresponding to the selected row.

column

The column which was selected.

user.data

user data set when the signal handler was connected.

tree-unselect-row(ctree, node, user.data)

Emitted when a node is unselected.

ctree

the object which received the signal.

node

The node corresponding to the selected row.

user.data

user data set when the signal handler was connected.

Properties

expander-style [GtkCTreeExpanderStyle : Read / Write]

The style of the expander buttons. Default value: GTK_CTREE_EXPANDER_NONE

indent [numeric : Read / Write]

The number of pixels to indent the tree levels. Default value: 0

line-style [GtkCTreeLineStyle : Read / Write]

The style of the lines in the tree graphic. Default value: GTK_CTREE_LINES_NONE

n-columns [numeric : Read / Write / Construct Only]

The number of columns in the tree. Default value: 0

show-stub [logical : Read / Write]

Default value: FALSE

spacing [numeric : Read / Write]

The number of pixels between the tree and the columns. Default value: 0

tree-column [numeric : Read / Write / Construct Only]

The column in which the actual tree graphic appears. Default value: 0

Author(s)

Derived by RGtkGen from GTK+ documentation

References

https://developer.gnome.org/gtk2/stable/GtkCTree.html


RGtk2 documentation built on Oct. 14, 2021, 5:08 p.m.

Related to GtkCTree in RGtk2...