### ----------------------------------------------------
### -- Gnome::Gtk3
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: docs/content-docs/reference/Gtk3/TreeView.md
### ----------------------------------------------------
### -- Chunk 2 of 2
  * $path; the native **Gnome::Gtk3::TreePath** for the activated row

  * $column; the native **Gnome::Gtk3::TreeViewColumn** in which the activation occurred

### test-expand-row

The given row is about to be expanded (show its children nodes). Use this signal if you need to control the expandability of individual rows.

Returns: `0` to allow expansion, `1` to reject

    method handler (
      N-GtkTreeIter $iter,
      N-GtkTreePath $path,
      Int :$_handler_id,
      Gnome::GObject::Object :_widget($tree_view),
      *%user-options
      --> Int
    );

  * $tree_view; the object on which the signal is emitted

  * N-GtkTreeIter $iter; the native **Gnome::Gtk3::TreeIter** of the row to expand

  * N-GtkTreePath $path; the native **Gnome::Gtk3::TreePath** that points to the row

### test-collapse-row

The given row is about to be collapsed (hide its children nodes). Use this signal if you need to control the collapsibility of individual rows.

Returns: `0` to allow collapsing, `1` to reject

    method handler (
      N-GtkTreeIter $iter,
      N-GtkTreePath $path,
      Int :$_handler_id,
      Gnome::GObject::Object :_widget($tree_view),
      *%user-options
      --> Int
    );

  * $tree_view; the object on which the signal is emitted

  * $iter; the tree iter of the row to collapse

  * $path; a tree path that points to the row

### row-expanded

The given row has been expanded (child nodes are shown).

    method handler (
      N-GtkTreeIter $iter,
      N-GtkTreePath $path,
      Int :$_handler_id,
      Gnome::GObject::Object :_widget($tree_view),
      *%user-options
    );

  * $tree_view; the object on which the signal is emitted

  * $iter; the tree iter of the expanded row

  * $path; a tree path that points to the row

### row-collapsed

The given row has been collapsed (child nodes are hidden).

    method handler (
      N-GtkTreeIter $iter,
      N-GtkTreePath $path,
      Int :$_handler_id,
      Gnome::GObject::Object :_widget($tree_view),
      *%user-options
    );

  * $tree_view; the object on which the signal is emitted

  * $iter; the tree iter of the collapsed row

  * $path; a tree path that points to the row

### columns-changed

The number of columns of the treeview has changed.

    method handler (
      Int :$_handler_id,
      Gnome::GObject::Object :_widget($tree_view),
      *%user-options
    );

  * $tree_view; the object on which the signal is emitted

### cursor-changed

The position of the cursor (focused cell) has changed.

    method handler (
      Int :$_handler_id,
      Gnome::GObject::Object :_widget($tree_view),
      *%user-options
    );

  * $tree_view; the object on which the signal is emitted

Properties
==========

An example of using a string type property of a **Gnome::Gtk3::Label** object. This is just showing how to set/read a property, not that it is the best way to do it. This is because a) The class initialization often provides some options to set some of the properties and b) the classes provide many methods to modify just those properties. In the case below one can use **new(:label('my text label'))** or **gtk_label_set_text('my text label')**.

    my Gnome::Gtk3::Label $label .= new;
    my Gnome::GObject::Value $gv .= new(:init(G_TYPE_STRING));
    $label.g-object-get-property( 'label', $gv);
    $gv.g-value-set-string('my text label');

Supported properties
--------------------

### TreeView Model

The model for the tree view Widget type: GTK_TYPE_TREE_MODEL

The **Gnome::GObject::Value** type of property *model* is `G_TYPE_OBJECT`.

### Headers Visible

Show the column header buttons Default value: True

The **Gnome::GObject::Value** type of property *headers-visible* is `G_TYPE_BOOLEAN`.

### Headers Clickable

Column headers respond to click events Default value: True

The **Gnome::GObject::Value** type of property *headers-clickable* is `G_TYPE_BOOLEAN`.

### Expander Column

Set the column for the expander column Widget type: GTK_TYPE_TREE_VIEW_COLUMN

The **Gnome::GObject::Value** type of property *expander-column* is `G_TYPE_OBJECT`.

### Reorderable

View is reorderable Default value: False

The **Gnome::GObject::Value** type of property *reorderable* is `G_TYPE_BOOLEAN`.

### Enable Search

View allows user to search through columns interactively Default value: True

The **Gnome::GObject::Value** type of property *enable-search* is `G_TYPE_BOOLEAN`.

### Search Column

The **Gnome::GObject::Value** type of property *search-column* is `G_TYPE_INT`.

### Fixed Height Mode

Setting the *fixed-height-mode* property to `1` speeds up **Gnome::Gtk3::TreeView** by assuming that all rows have the same height. Only enable this option if all rows are the same height. Please see `gtk_tree_view_set_fixed_height_mode()` for more information on this option.

The **Gnome::GObject::Value** type of property *fixed-height-mode* is `G_TYPE_BOOLEAN`.

### Hover Selection

Enables or disables the hover selection mode of *tree_view*. Hover selection makes the selected row follow the pointer. Currently, this works only for the selection modes `GTK_SELECTION_SINGLE` and `GTK_SELECTION_BROWSE`. This mode is primarily intended for treeviews in popups, e.g. in **Gnome::Gtk3::ComboBox** or **Gnome::Gtk3::EntryCompletion**.

The **Gnome::GObject::Value** type of property *hover-selection* is `G_TYPE_BOOLEAN`.

### Hover Expand

Enables or disables the hover expansion mode of *tree_view*. Hover expansion makes rows expand or collapse if the pointer moves over them. This mode is primarily intended for treeviews in popups, e.g. in **Gnome::Gtk3::ComboBox** or **Gnome::Gtk3::EntryCompletion**.

The **Gnome::GObject::Value** type of property *hover-expand* is `G_TYPE_BOOLEAN`.

### Show Expanders

`1` if the view has expanders.

The **Gnome::GObject::Value** type of property *show-expanders* is `G_TYPE_BOOLEAN`.

### Level Indentation

Extra indentation for each level.

The **Gnome::GObject::Value** type of property *level-indentation* is `G_TYPE_INT`.

### Rubber Banding

Whether to enable selection of multiple items by dragging the mouse pointer Default value: False

The **Gnome::GObject::Value** type of property *rubber-banding* is `G_TYPE_BOOLEAN`.

### Enable Grid Lines

Whether grid lines should be drawn in the tree view Default value: False

The **Gnome::GObject::Value** type of property *enable-grid-lines* is `G_TYPE_ENUM`.

### Enable Tree Lines

Whether tree lines should be drawn in the tree view Default value: False

The **Gnome::GObject::Value** type of property *enable-tree-lines* is `G_TYPE_BOOLEAN`.

### Tooltip Column

The **Gnome::GObject::Value** type of property *tooltip-column* is `G_TYPE_INT`.

### Activate on Single Click

The activate-on-single-click property specifies whether the "row-activated" signal will be emitted after a single click.

The **Gnome::GObject::Value** type of property *activate-on-single-click* is `G_TYPE_BOOLEAN`.



