ExoTreeView: exo Reference Manual

## ExoTreeView ExoTreeView — An improved version of GtkTreeView |

## Functions

GtkWidget * | exo_tree_view_new ()
gboolean | exo_tree_view_get_single_click ()
void | exo_tree_view_set_single_click ()
guint | exo_tree_view_get_single_click_timeout ()
void | exo_tree_view_set_single_click_timeout ()

## Properties

gboolean | single-click | Read / Write
guint | single-click-timeout | Read / Write

## Types and Values

struct | ExoTreeView

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkTreeView
                        ╰── ExoTreeView

## Implemented Interfaces

ExoTreeView implements AtkImplementorIface, GtkBuildable and GtkScrollable.

## Includes

    #include <exo/exo.h>

## Description

The ExoTreeView class derives from GtkTreeView and extends it with the ability to activate rows using single button clicks instead of the default double button clicks. It also works around a few shortcomings of GtkTreeView, i.e. ExoTreeView allows the user to drag around multiple selected rows.

## Functions

### exo_tree_view_new ()

    GtkWidget *
    exo_tree_view_new (void);

Allocates a new ExoTreeView instance.

#### Returns

the newly allocated ExoTreeView.

Since: 0.3.1.3

### exo_tree_view_get_single_click ()

    gboolean
    exo_tree_view_get_single_click (const ExoTreeView *tree_view);

Returns `TRUE` if `tree_view` is in single-click mode, else `FALSE`.

#### Parameters

tree_view | an ExoTreeView. |

#### Returns

whether `tree_view` is in single-click mode.

Since: 0.3.1.3

### exo_tree_view_set_single_click ()

    void
    exo_tree_view_set_single_click (ExoTreeView *tree_view,
                                    gboolean single_click);

If `single_click` is `TRUE`, `tree_view` will use single-click mode, else the default double-click mode will be used.

#### Parameters

tree_view | an ExoTreeView. |
single_click | `TRUE` to use single-click for `tree_view` , `FALSE` otherwise. |

Since: 0.3.1.3

### exo_tree_view_get_single_click_timeout ()

    guint
    exo_tree_view_get_single_click_timeout
                                   (const ExoTreeView *tree_view);

Returns the amount of time in milliseconds after which the item under the mouse cursor will be selected automatically in single click mode. A value of `0` means that the behavior is disabled and the user must alter the selection manually.

#### Parameters

tree_view | a ExoTreeView. |

#### Returns

the single click autoselect timeout or `0` if the behavior is disabled.

Since: 0.3.1.5

### exo_tree_view_set_single_click_timeout ()

    void
    exo_tree_view_set_single_click_timeout
                                   (ExoTreeView *tree_view,
                                    guint single_click_timeout);

If `single_click_timeout` is a value greater than zero, it specifies the amount of time in milliseconds after which the item under the mouse cursor will be selected automatically in single click mode. A value of `0` for `single_click_timeout` disables the autoselection for `tree_view` .

This setting does not have any effect unless the `tree_view` is in single-click mode, see `exo_tree_view_set_single_click()`.

#### Parameters

tree_view | a ExoTreeView. |
single_click_timeout | the new timeout or `0` to disable. |

Since: 0.3.1.5

## Types and Values

### struct ExoTreeView

    struct ExoTreeView;

The ExoIconView struct contains only private fields and should not be directly accessed.

## Property Details

### The `“single-click”` property

      “single-click”             gboolean

`TRUE` to activate items using a single click instead of a double click.

Owner: ExoTreeView

Flags: Read / Write

Default value: FALSE

Since: 0.3.1.3

### The `“single-click-timeout”` property

      “single-click-timeout”     guint

The amount of time in milliseconds after which the hover row (the row which is hovered by the mouse cursor) will be selected automatically in single-click mode. A value of `0` disables the automatic selection.

Owner: ExoTreeView

Flags: Read / Write

Default value: 0

Since: 0.3.1.5