ETree: Evolution Utilities Reference Manual

## ETree ETree |

## Functions

gboolean | e_tree_construct ()
GtkWidget * | e_tree_new ()
ETableState * | e_tree_get_state_object ()
ETableSpecification * | e_tree_get_spec ()
void | e_tree_set_state_object ()
void | e_tree_show_cursor_after_reflow ()
void | e_tree_set_cursor ()
ETreePath | e_tree_get_cursor ()
void | e_tree_path_foreach ()
void | e_tree_get_cell_at ()
void | e_tree_get_cell_geometry ()
ETreeModel * | e_tree_get_model ()
ESelectionModel * | e_tree_get_selection_model ()
ETreeTableAdapter * | e_tree_get_table_adapter ()
void | e_tree_drag_source_set ()
void | e_tree_drag_source_unset ()
GdkDragContext * | e_tree_drag_begin ()
gboolean | e_tree_is_dragging ()
ETableItem * | e_tree_get_item ()
GnomeCanvasItem * | e_tree_get_header_item ()
void | e_tree_set_info_message ()
void | e_tree_freeze_state_change ()
void | e_tree_thaw_state_change ()
gboolean | e_tree_is_editing ()

## Properties

ETreeTableAdapter * | ETreeTableAdapter | Read
gboolean | always-search | Read / Write
gboolean | drawfocus | Write
gboolean | horizontal-draw-grid | Write
gboolean | is-editing | Read
gint | length-threshold | Write
gboolean | sort-children-ascending | Read / Write / Construct
gboolean | uniform-row-height | Read / Write
gboolean | vertical-draw-grid | Write

## Style Properties

gboolean | alternating-row-colors | Read
gint | expander-size | Read
gint | vertical-spacing | Read

## Signals

gboolean | click | Run Last
void | cursor-activated | Run Last
void | cursor-change | Run Last
void | double-click | Run Last
gboolean | key-press | Run Last
gboolean | right-click | Run Last
void | selection-change | Run Last
void | start-drag | Run Last
void | state-change | Run Last
void | tree-drag-begin | Run Last
void | tree-drag-data-delete | Run Last
void | tree-drag-data-get | Run Last
void | tree-drag-data-received | Run Last
gboolean | tree-drag-drop | Run Last
void | tree-drag-end | Run Last
void | tree-drag-leave | Run Last
gboolean | tree-drag-motion | Run Last
gboolean | white-space-event | Run Last

## Types and Values

struct | ETree

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkTable
                        ╰── ETree

## Implemented Interfaces

ETree implements AtkImplementorIface, GtkBuildable and GtkScrollable.

## Description

## Functions

### e_tree_construct ()

    gboolean
    e_tree_construct (ETree *tree,
                      ETreeModel *etm,
                      ETableExtras *ete,
                      ETableSpecification *specification);

This is the internal implementation of `e_tree_new()` for use by subclasses or language bindings. See `e_tree_new()` for details.

#### Parameters

tree | The newly created ETree object. |
etm | The model for this table. |
ete | An optional ETableExtras. (`NULL` is valid.) |
specification | an ETableSpecification |

#### Returns

`TRUE` on success, `FALSE` if an error occurred

### e_tree_new ()

    GtkWidget *
    e_tree_new (ETreeModel *etm,
                ETableExtras *ete,
                ETableSpecification *specification);

This function creates an ETree from the given parameters. The ETreeModel is a tree model to be represented. The ETableExtras is an optional set of pixbufs, cells, and sorting functions to be used when interpreting the spec. If you pass in `NULL` it uses the default ETableExtras. (See `e_table_extras_new()`).

`specification` is the specification of the set of viewable columns and the default sorting state and such. `state` is an optional string specifying the current sorting state and such.

#### Parameters

etm | The model for this tree |
ete | An optional ETableExtras (`NULL` is valid.) |
specification | an ETableSpecification |

#### Returns

The newly created ETree or `NULL` if there's an error.

### e_tree_get_state_object ()

    ETableState *
    e_tree_get_state_object (ETree *tree);

Builds an ETableState corresponding to the current state of the ETree.

#### Parameters

tree | ETree object to act on |

#### Returns

The `ETableState` object generated.

### e_tree_get_spec ()

    ETableSpecification *
    e_tree_get_spec (ETree *tree);

Returns the specification object.

#### Parameters

tree | The ETree to query |

### e_tree_set_state_object ()

    void
    e_tree_set_state_object (ETree *tree,
                             ETableState *state);

### e_tree_show_cursor_after_reflow ()

    void
    e_tree_show_cursor_after_reflow (ETree *tree);

### e_tree_set_cursor ()

    void
    e_tree_set_cursor (ETree *tree,
                       ETreePath path);

### e_tree_get_cursor ()

    ETreePath
    e_tree_get_cursor (ETree *tree);

### e_tree_path_foreach ()

    void
    e_tree_path_foreach (ETree *tree,
                         ETreeForeachFunc callback,
                         gpointer closure);

### e_tree_get_cell_at ()

    void
    e_tree_get_cell_at (ETree *tree,
                        gint x,
                        gint y,
                        gint *row_return,
                        gint *col_return);

Return the row and column for the cell in which the pixel at (`x` , `y` ) is contained.

#### Parameters

tree | An ETree widget |
x | X coordinate for the pixel |
y | Y coordinate for the pixel |
row_return | Pointer to return the row value |
col_return | Pointer to return the column value |

### e_tree_get_cell_geometry ()

    void
    e_tree_get_cell_geometry (ETree *tree,
                              gint row,
                              gint col,
                              gint *x_return,
                              gint *y_return,
                              gint *width_return,
                              gint *height_return);

Computes the data about this cell.

#### Parameters

tree | The tree. |
row | The row to get the geometry of. |
col | The col to get the geometry of. |
x_return | Returns the x coordinate of the upper right hand corner of the cell with respect to the widget. |
y_return | Returns the y coordinate of the upper right hand corner of the cell with respect to the widget. |
width_return | Returns the width of the cell. |
height_return | Returns the height of the cell. |

### e_tree_get_model ()

    ETreeModel *
    e_tree_get_model (ETree *tree);

Returns the model upon which this ETree is based.

#### Parameters

tree | the ETree |

#### Returns

the model

### e_tree_get_selection_model ()

    ESelectionModel *
    e_tree_get_selection_model (ETree *tree);

Returns the selection model of this ETree.

#### Parameters

tree | the ETree |

#### Returns

the selection model

### e_tree_get_table_adapter ()

    ETreeTableAdapter *
    e_tree_get_table_adapter (ETree *tree);

Returns the table adapter this ETree uses.

#### Parameters

tree | the ETree |

#### Returns

the model

### e_tree_drag_source_set ()

    void
    e_tree_drag_source_set (ETree *tree,
                            GdkModifierType start_button_mask,
                            const GtkTargetEntry *targets,
                            gint n_targets,
                            GdkDragAction actions);

### e_tree_drag_source_unset ()

    void
    e_tree_drag_source_unset (ETree *tree);

### e_tree_drag_begin ()

    GdkDragContext *
    e_tree_drag_begin (ETree *tree,
                       gint row,
                       gint col,
                       GtkTargetList *targets,
                       GdkDragAction actions,
                       gint button,
                       GdkEvent *event);

### e_tree_is_dragging ()

    gboolean
    e_tree_is_dragging (ETree *tree);

Returns whether is `tree` in a drag&drop operation.

#### Parameters

tree | An ETree widget |

### e_tree_get_item ()

    ETableItem *
    e_tree_get_item (ETree *tree);

### e_tree_get_header_item ()

    GnomeCanvasItem *
    e_tree_get_header_item (ETree *tree);

### e_tree_set_info_message ()

    void
    e_tree_set_info_message (ETree *tree,
                             const gchar *info_message);

Creates an info message in table area, or removes old.

#### Parameters

tree | ETree instance |
info_message | Message to set. Can be NULL. |

### e_tree_freeze_state_change ()

    void
    e_tree_freeze_state_change (ETree *tree);

### e_tree_thaw_state_change ()

    void
    e_tree_thaw_state_change (ETree *tree);

### e_tree_is_editing ()

    gboolean
    e_tree_is_editing (ETree *tree);

## Types and Values

### struct ETree

    struct ETree;

## Property Details

### The `“ETreeTableAdapter”` property

      “ETreeTableAdapter”        ETreeTableAdapter *

ETree table adapter.

Flags: Read

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

      “always-search”            gboolean

Always search.

Flags: Read / Write

Default value: FALSE

### The `“drawfocus”` property

      “drawfocus”                gboolean

Draw focus.

Flags: Write

Default value: FALSE

### The `“horizontal-draw-grid”` property

      “horizontal-draw-grid”     gboolean

Horizontal Draw Grid.

Flags: Write

Default value: FALSE

### The `“is-editing”` property

      “is-editing”               gboolean

Whether is in an editing mode.

Flags: Read

Default value: FALSE

### The `“length-threshold”` property

      “length-threshold”         gint

Length Threshold.

Flags: Write

Allowed values: >= 0

Default value: 0

### The `“sort-children-ascending”` property

      “sort-children-ascending”  gboolean

Always sort children tree nodes ascending.

Flags: Read / Write / Construct

Default value: FALSE

### The `“uniform-row-height”` property

      “uniform-row-height”       gboolean

Uniform row height.

Flags: Read / Write

Default value: FALSE

### The `“vertical-draw-grid”` property

      “vertical-draw-grid”       gboolean

Vertical Draw Grid.

Flags: Write

Default value: FALSE

## Style Property Details

### The `“alternating-row-colors”` style property

      “alternating-row-colors”   gboolean

Whether to use alternating row colors.

Flags: Read

Default value: TRUE

### The `“expander-size”` style property

      “expander-size”            gint

Size of the expander arrow.

Flags: Read

Allowed values: >= 0

Default value: 10

### The `“vertical-spacing”` style property

      “vertical-spacing”         gint

Vertical space between rows. It is added to top and to bottom of a row.

Flags: Read

Allowed values: >= 0

Default value: 3

## Signal Details

### The `“click”` signal

    gboolean
    user_function (ETree    *etree,
                   gint      arg1,
                   gpointer  arg2,
                   gint      arg3,
                   GdkEvent *arg4,
                   gpointer  user_data)

Flags: Run Last

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

    void
    user_function (ETree   *etree,
                   gint     arg1,
                   gpointer arg2,
                   gpointer user_data)

Flags: Run Last

### The `“cursor-change”` signal

    void
    user_function (ETree   *etree,
                   gint     arg1,
                   gpointer arg2,
                   gpointer user_data)

Flags: Run Last

### The `“double-click”` signal

    void
    user_function (ETree    *etree,
                   gint      arg1,
                   gpointer  arg2,
                   gint      arg3,
                   GdkEvent *arg4,
                   gpointer  user_data)

Flags: Run Last

### The `“key-press”` signal

    gboolean
    user_function (ETree    *etree,
                   gint      arg1,
                   gpointer  arg2,
                   gint      arg3,
                   GdkEvent *arg4,
                   gpointer  user_data)

Flags: Run Last

### The `“right-click”` signal

    gboolean
    user_function (ETree    *etree,
                   gint      arg1,
                   gpointer  arg2,
                   gint      arg3,
                   GdkEvent *arg4,
                   gpointer  user_data)

Flags: Run Last

### The `“selection-change”` signal

    void
    user_function (ETree   *etree,
                   gpointer user_data)

Flags: Run Last

### The `“start-drag”` signal

    void
    user_function (ETree    *etree,
                   gint      arg1,
                   gpointer  arg2,
                   gint      arg3,
                   GdkEvent *arg4,
                   gpointer  user_data)

Flags: Run Last

### The `“state-change”` signal

    void
    user_function (ETree   *etree,
                   gpointer user_data)

Flags: Run Last

### The `“tree-drag-begin”` signal

    void
    user_function (ETree          *etree,
                   gint            arg1,
                   gpointer        arg2,
                   gint            arg3,
                   GdkDragContext *arg4,
                   gpointer        user_data)

Flags: Run Last

### The `“tree-drag-data-delete”` signal

    void
    user_function (ETree          *etree,
                   gint            arg1,
                   gpointer        arg2,
                   gint            arg3,
                   GdkDragContext *arg4,
                   gpointer        user_data)

Flags: Run Last

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

    void
    user_function (ETree            *etree,
                   gint              arg1,
                   gpointer          arg2,
                   gint              arg3,
                   GdkDragContext   *arg4,
                   GtkSelectionData *arg5,
                   guint             arg6,
                   guint             arg7,
                   gpointer          user_data)

Flags: Run Last

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

    void
    user_function (ETree            *etree,
                   gint              arg1,
                   gpointer          arg2,
                   gint              arg3,
                   GdkDragContext   *arg4,
                   gint              arg5,
                   gint              arg6,
                   GtkSelectionData *arg7,
                   guint             arg8,
                   guint             arg9,
                   gpointer          user_data)

Flags: Run Last

### The `“tree-drag-drop”` signal

    gboolean
    user_function (ETree          *etree,
                   gint            arg1,
                   gpointer        arg2,
                   gint            arg3,
                   GdkDragContext *arg4,
                   gint            arg5,
                   gint            arg6,
                   guint           arg7,
                   gpointer        user_data)

Flags: Run Last

### The `“tree-drag-end”` signal

    void
    user_function (ETree          *etree,
                   gint            arg1,
                   gpointer        arg2,
                   gint            arg3,
                   GdkDragContext *arg4,
                   gpointer        user_data)

Flags: Run Last

### The `“tree-drag-leave”` signal

    void
    user_function (ETree          *etree,
                   gint            arg1,
                   gpointer        arg2,
                   gint            arg3,
                   GdkDragContext *arg4,
                   guint           arg5,
                   gpointer        user_data)

Flags: Run Last

### The `“tree-drag-motion”` signal

    gboolean
    user_function (ETree          *etree,
                   gint            arg1,
                   gpointer        arg2,
                   gint            arg3,
                   GdkDragContext *arg4,
                   gint            arg5,
                   gint            arg6,
                   guint           arg7,
                   gpointer        user_data)

Flags: Run Last

### The `“white-space-event”` signal

    gboolean
    user_function (ETree    *etree,
                   GdkEvent *arg1,
                   gpointer  user_data)

Flags: Run Last