## dzl-tree-types

dzl-tree-types

## Functions

gint | (*DzlTreeNodeCompareFunc) ()

## Properties

gboolean | always-expand | Read / Write / Construct Only
GMenuModel * | context-menu | Read / Write
DzlTreeNode * | root | Read / Write
DzlTreeNode * | selection | Read / Write
gboolean | show-icons | Read / Write
DzlTree * | tree | Read
gboolean | children-possible | Read / Write
char * | expanded-icon-name | Read / Write
GIcon * | gicon | Read / Write
char * | icon-name | Read / Write
GObject * | item | Read / Write
DzlTreeNode * | parent | Read
gboolean | reset-on-collapse | Read / Write
char * | text | Read / Write
DzlTree * | tree | Read / Write
gboolean | use-dim-label | Read / Write
gboolean | use-markup | Read / Write

## Signals

void | action | Action
void | populate-popup | Run Last
void | added | Run Last
void | build-children | Run Last
void | build-node | Run Last
gboolean | drag-data-get | Run Last
gboolean | drag-data-received | Run Last
gboolean | drag-node-delete | Run Last
gboolean | drag-node-received | Run Last
gboolean | node-activated | Run Last
void | node-collapsed | Run Last
gboolean | node-draggable | Run Last
gboolean | node-droppable | Run Last
void | node-expanded | Run Last
void | node-popup | Run Last
void | node-selected | Run Last
void | node-unselected | Run Last
void | removed | Run Last

## Types and Values

#define | DZL_TYPE_TREE
#define | DZL_TYPE_TREE_NODE
#define | DZL_TYPE_TREE_BUILDER
enum | DzlTreeDropPosition
| DzlTree
| DzlTreeBuilder
| DzlTreeBuilderClass
| DzlTreeClass
| DzlTreeNode

## Object Hierarchy

        GEnum
        ╰── DzlTreeDropPosition
        GObject
        ╰── GInitiallyUnowned
            ├── DzlTreeBuilder
            ├── DzlTreeNode
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkTreeView
                        ╰── DzlTree

## Implemented Interfaces

DzlTree implements AtkImplementorIface, GtkBuildable and GtkScrollable.

## Description

## Functions

### DzlTreeNodeCompareFunc ()

    gint
    (*DzlTreeNodeCompareFunc) (DzlTreeNode *a,
                               DzlTreeNode *b,
                               gpointer user_data);

## Types and Values

### DZL_TYPE_TREE

    #define DZL_TYPE_TREE         (dzl_tree_get_type())

### DZL_TYPE_TREE_NODE

    #define DZL_TYPE_TREE_NODE    (dzl_tree_node_get_type())

### DZL_TYPE_TREE_BUILDER

    #define DZL_TYPE_TREE_BUILDER (dzl_tree_builder_get_type())

### enum DzlTreeDropPosition

#### Members

DZL_TREE_DROP_INTO |  |
DZL_TREE_DROP_BEFORE |  |
DZL_TREE_DROP_AFTER |  |

### DzlTree

    typedef struct _DzlTree DzlTree;

### DzlTreeBuilder

    typedef struct _DzlTreeBuilder DzlTreeBuilder;

### DzlTreeBuilderClass

    typedef struct {
      GInitiallyUnownedClass parent_class;

      void     (*added)                   (DzlTreeBuilder      *builder,
                                           GtkWidget           *tree);
      void     (*removed)                 (DzlTreeBuilder      *builder,
                                           GtkWidget           *tree);
      void     (*build_node)              (DzlTreeBuilder      *builder,
                                           DzlTreeNode         *node);
      void     (*build_children)          (DzlTreeBuilder      *builder,
                                           DzlTreeNode         *parent);
      gboolean (*node_activated)          (DzlTreeBuilder      *builder,
                                           DzlTreeNode         *node);
      void     (*node_selected)           (DzlTreeBuilder      *builder,
                                           DzlTreeNode         *node);
      void     (*node_unselected)         (DzlTreeBuilder      *builder,
                                           DzlTreeNode         *node);
      void     (*node_popup)              (DzlTreeBuilder      *builder,
                                           DzlTreeNode         *node,
                                           GMenu               *menu);
      void     (*node_expanded)           (DzlTreeBuilder      *builder,
                                           DzlTreeNode         *node);
      void     (*node_collapsed)          (DzlTreeBuilder      *builder,
                                           DzlTreeNode         *node);
      gboolean (*node_draggable)          (DzlTreeBuilder      *builder,
                                           DzlTreeNode         *node);
      gboolean (*node_droppable)          (DzlTreeBuilder      *builder,
                                           DzlTreeNode         *node,
                                           GtkSelectionData    *data);
      gboolean (*drag_data_get)           (DzlTreeBuilder      *builder,
                                           DzlTreeNode         *node,
                                           GtkSelectionData    *data);
      gboolean (*drag_node_received)      (DzlTreeBuilder      *builder,
                                           DzlTreeNode         *drag_node,
                                           DzlTreeNode         *drop_node,
                                           DzlTreeDropPosition  position,
                                           GdkDragAction        action,
                                           GtkSelectionData    *data);
      gboolean (*drag_data_received)      (DzlTreeBuilder      *builder,
                                           DzlTreeNode         *drop_node,
                                           DzlTreeDropPosition  position,
                                           GdkDragAction        action,
                                           GtkSelectionData    *data);
      gboolean (*drag_node_delete)        (DzlTreeBuilder      *builder,
                                           DzlTreeNode         *node);
      void     (*cell_data_func)          (DzlTreeBuilder      *tree,
                                           DzlTreeNode         *node,
                                           GtkCellRenderer     *cell);
    } DzlTreeBuilderClass;

### DzlTreeClass

    typedef struct {
    	GtkTreeViewClass parent_class;

      void (*action)         (DzlTree     *self,
                              const gchar *action_group,
                              const gchar *action_name,
                              const gchar *param);
      void (*populate_popup) (DzlTree     *self,
                              GtkWidget   *widget);
    } DzlTreeClass;

### DzlTreeNode

    typedef struct _DzlTreeNode DzlTreeNode;

## Property Details

### The `“always-expand”` property

      “always-expand”            gboolean

Always expand.

Owner: DzlTree

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“context-menu”` property

      “context-menu”             GMenuModel *

The context menu to display.

Owner: DzlTree

Flags: Read / Write

### The `“root”` property

      “root”                     DzlTreeNode *

The root object of the tree.

Owner: DzlTree

Flags: Read / Write

### The `“selection”` property

      “selection”                DzlTreeNode *

The node selection.

Owner: DzlTree

Flags: Read / Write

### The `“show-icons”` property

      “show-icons”               gboolean

Show Icons.

Owner: DzlTree

Flags: Read / Write

Default value: FALSE

### The `“tree”` property

      “tree”                     DzlTree *

The DzlTree the builder belongs to.

Owner: DzlTreeBuilder

Flags: Read

### The `“children-possible”` property

      “children-possible”        gboolean

This property allows for more lazy loading of nodes.

When a node becomes visible, we normally build its children nodes so that we know if we need an expansion arrow. However, that can be expensive when rendering directories with lots of subdirectories.

Using this, you can always show an arrow without building the children and simply hide the arrow if there were in fact no children (upon expansion).

Owner: DzlTreeNode

Flags: Read / Write

Default value: FALSE

### The `“expanded-icon-name”` property

      “expanded-icon-name”       char *

The icon-name to use when the row is expanded.

Owner: DzlTreeNode

Flags: Read / Write

Default value: NULL

### The `“gicon”` property

      “gicon”                    GIcon *

The cached GIcon to display.

Owner: DzlTreeNode

Flags: Read / Write

### The `“icon-name”` property

      “icon-name”                char *

An icon-name to display on the row.

Owner: DzlTreeNode

Flags: Read / Write

Default value: NULL

### The `“item”` property

      “item”                     GObject *

An optional GObject to associate with the node.

Owner: DzlTreeNode

Flags: Read / Write

### The `“parent”` property

      “parent”                   DzlTreeNode *

The parent of the node.

Owner: DzlTreeNode

Flags: Read

### The `“reset-on-collapse”` property

      “reset-on-collapse”        gboolean

The "reset-on-collapse" property denotes that all children should be removed from the node when it's row is collapsed. It will also set “needs-build” to `TRUE` so the next expansion rebuilds the children. This is useful for situations where you want to ensure the nodes are up to date (refreshed) on every expansion.

Owner: DzlTreeNode

Flags: Read / Write

Default value: FALSE

Since: 3.28

### The `“text”` property

      “text”                     char *

Text to display on the tree node.

Owner: DzlTreeNode

Flags: Read / Write

Default value: NULL

### The `“tree”` property

      “tree”                     DzlTree *

The tree the node belongs to.

Owner: DzlTreeNode

Flags: Read / Write

### The `“use-dim-label”` property

      “use-dim-label”            gboolean

If text should be rendered with a dim label.

Owner: DzlTreeNode

Flags: Read / Write

Default value: FALSE

### The `“use-markup”` property

      “use-markup”               gboolean

If the "text" property includes GMarkup.

Owner: DzlTreeNode

Flags: Read / Write

Default value: FALSE

## Signal Details

### The `“action”` signal

    void
    user_function (DzlTree *dzltree,
                   char    *arg1,
                   char    *arg2,
                   char    *arg3,
                   gpointer user_data)

Flags: Action

### The `“populate-popup”` signal

    void
    user_function (DzlTree   *dzltree,
                   GtkWidget *widget,
                   gpointer   user_data)

Flags: Run Last

### The `“added”` signal

    void
    user_function (DzlTreeBuilder *dzltreebuilder,
                   DzlTree        *arg1,
                   gpointer        user_data)

Flags: Run Last

### The `“build-children”` signal

    void
    user_function (DzlTreeBuilder *dzltreebuilder,
                   DzlTreeNode    *arg1,
                   gpointer        user_data)

Flags: Run Last

### The `“build-node”` signal

    void
    user_function (DzlTreeBuilder *dzltreebuilder,
                   DzlTreeNode    *arg1,
                   gpointer        user_data)

Flags: Run Last

### The `“drag-data-get”` signal

    gboolean
    user_function (DzlTreeBuilder   *dzltreebuilder,
                   DzlTreeNode      *arg1,
                   GtkSelectionData *arg2,
                   gpointer          user_data)

Flags: Run Last

### The `“drag-data-received”` signal

    gboolean
    user_function (DzlTreeBuilder     *dzltreebuilder,
                   DzlTreeNode        *arg1,
                   DzlTreeDropPosition arg2,
                   GdkDragAction       arg3,
                   GtkSelectionData   *arg4,
                   gpointer            user_data)

Flags: Run Last

### The `“drag-node-delete”` signal

    gboolean
    user_function (DzlTreeBuilder *dzltreebuilder,
                   DzlTreeNode    *arg1,
                   gpointer        user_data)

Flags: Run Last

### The `“drag-node-received”` signal

    gboolean
    user_function (DzlTreeBuilder     *dzltreebuilder,
                   DzlTreeNode        *arg1,
                   DzlTreeNode        *arg2,
                   DzlTreeDropPosition arg3,
                   GdkDragAction       arg4,
                   GtkSelectionData   *arg5,
                   gpointer            user_data)

Flags: Run Last

### The `“node-activated”` signal

    gboolean
    user_function (DzlTreeBuilder *dzltreebuilder,
                   DzlTreeNode    *arg1,
                   gpointer        user_data)

Flags: Run Last

### The `“node-collapsed”` signal

    void
    user_function (DzlTreeBuilder *dzltreebuilder,
                   DzlTreeNode    *arg1,
                   gpointer        user_data)

Flags: Run Last

### The `“node-draggable”` signal

    gboolean
    user_function (DzlTreeBuilder *dzltreebuilder,
                   DzlTreeNode    *arg1,
                   gpointer        user_data)

Flags: Run Last

### The `“node-droppable”` signal

    gboolean
    user_function (DzlTreeBuilder   *dzltreebuilder,
                   DzlTreeNode      *arg1,
                   GtkSelectionData *arg2,
                   gpointer          user_data)

Flags: Run Last

### The `“node-expanded”` signal

    void
    user_function (DzlTreeBuilder *dzltreebuilder,
                   DzlTreeNode    *arg1,
                   gpointer        user_data)

Flags: Run Last

### The `“node-popup”` signal

    void
    user_function (DzlTreeBuilder *dzltreebuilder,
                   DzlTreeNode    *arg1,
                   GMenu          *arg2,
                   gpointer        user_data)

Flags: Run Last

### The `“node-selected”` signal

    void
    user_function (DzlTreeBuilder *dzltreebuilder,
                   DzlTreeNode    *arg1,
                   gpointer        user_data)

Flags: Run Last

### The `“node-unselected”` signal

    void
    user_function (DzlTreeBuilder *dzltreebuilder,
                   DzlTreeNode    *arg1,
                   gpointer        user_data)

Flags: Run Last

### The `“removed”` signal

    void
    user_function (DzlTreeBuilder *dzltreebuilder,
                   DzlTree        *arg1,
                   gpointer        user_data)

Flags: Run Last