Gnome::Gtk4::TreeView
Description
A widget for displaying both trees and lists
Widget that displays any object that implements the Gnome::Gtk4::R-TreeModel interface.
Please refer to the [tree widget conceptual overview](section-tree-widget.html) for an overview of all the objects and data types related to the tree widget and how they work together.
Coordinate systems in GtkTreeView API
Several different coordinate systems are exposed in the Gnome::Gtk4::TreeView API. These are:
Widget coordinates: Coordinates relative to the widget (usually widget->window`).
Bin window coordinates: Coordinates relative to the window that GtkTreeView renders to.
Tree coordinates: Coordinates relative to the entire scrollable area of GtkTreeView. These coordinates start at (0, 0) for row 0 of the tree.
Several functions are available for converting between the different coordinate systems. The most common translations are between widget and bin window coordinates and between bin window and tree coordinates. For the former you can use .convert-widget-to-bin-window-coords()
(and vice versa), for the latter .convert-bin-window-to-tree-coords()
(and vice versa).
## Gnome::Gtk4::TreeView as Gnome::Gtk4::R-Buildable
The Gnome::Gtk4::TreeView implementation of the Gnome::Gtk4::R-Buildable interface accepts Gnome::Gtk4::TreeViewColumn objects as `<child>` elements and exposes the internal Gnome::Gtk4::TreeSelection in UI definitions.
An example of a UI definition fragment with Gnome::Gtk4::TreeView:
CSS nodes
Gnome::Gtk4::TreeView has a main CSS node with name treeview and style class `.view`. It has a subnode with name header, which is the parent for all the column header widgets' CSS nodes.
Each column header consists of a button, which among other content, has a child with name sort-indicator`, which carries the `.ascending` or `.descending` style classes when the column header should show a sort indicator. The CSS is expected to provide a suitable image using the `-gtk-icon-source` property.
For rubberband selection, a subnode with name rubberband is used.
For the drop target location during DND, a subnode with name dndtarget is used.
Class initialization
Note: The native version of this class is deprecated in gtk4-lib() since version 4.10
new
:native-object
Create an object using a native object from elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object :$native-object! )
new-treeview
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Creates a new Gnome::Gtk4::TreeView widget.
method new-treeview ( --> Gnome::Gtk4::TreeView \)
new-with-model
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Creates a new Gnome::Gtk4::TreeView widget with the model initialized to $model
.
method new-with-model ( N-Object() $model --> Gnome::Gtk4::TreeView \)
$model; the model..
Methods
append-column
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Appends $column
to the list of columns. If $tree-view
has “fixed_height” mode enabled, then $column
must have its “sizing” property set to be GTK_TREE_VIEW_COLUMN_FIXED.
method append-column ( N-Object() $column --> Int )
$column; The Gnome::Gtk4::TreeViewColumn to add..
Return value; The number of columns in $tree-view
after appending..
collapse-all
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Recursively collapses all visible, expanded nodes in $tree-view
.
method collapse-all ( )
collapse-row
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Collapses a row (hides its child rows, if they exist).
method collapse-row ( N-Object $path --> Bool )
$path; path to a row in the
$tree-view
Return value; True
if the row was collapsed..
columns-autosize
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Resizes all columns to their optimal width. Only works after the treeview has been realized.
method columns-autosize ( )
convert-bin-window-to-tree-coords
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Converts bin_window coordinates to coordinates for the tree (the full scrollable area of the tree).
method convert-bin-window-to-tree-coords ( Int() $bx, Int() $by, Array[Int] $tx, Array[Int] $ty )
$bx; X coordinate relative to bin_window.
$by; Y coordinate relative to bin_window.
$tx; (transfer ownership: full) return location for tree X coordinate.
$ty; (transfer ownership: full) return location for tree Y coordinate.
convert-bin-window-to-widget-coords
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Converts bin_window coordinates to widget relative coordinates.
method convert-bin-window-to-widget-coords ( Int() $bx, Int() $by, Array[Int] $wx, Array[Int] $wy )
$bx; bin_window X coordinate.
$by; bin_window Y coordinate.
$wx; (transfer ownership: full) return location for widget X coordinate.
$wy; (transfer ownership: full) return location for widget Y coordinate.
convert-tree-to-bin-window-coords
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Converts tree coordinates (coordinates in full scrollable area of the tree) to bin_window coordinates.
method convert-tree-to-bin-window-coords ( Int() $tx, Int() $ty, Array[Int] $bx, Array[Int] $by )
$tx; tree X coordinate.
$ty; tree Y coordinate.
$bx; (transfer ownership: full) return location for X coordinate relative to bin_window.
$by; (transfer ownership: full) return location for Y coordinate relative to bin_window.
convert-tree-to-widget-coords
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Converts tree coordinates (coordinates in full scrollable area of the tree) to widget coordinates.
method convert-tree-to-widget-coords ( Int() $tx, Int() $ty, Array[Int] $wx, Array[Int] $wy )
$tx; X coordinate relative to the tree.
$ty; Y coordinate relative to the tree.
$wx; (transfer ownership: full) return location for widget X coordinate.
$wy; (transfer ownership: full) return location for widget Y coordinate.
convert-widget-to-bin-window-coords
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Converts widget coordinates to coordinates for the bin_window.
method convert-widget-to-bin-window-coords ( Int() $wx, Int() $wy, Array[Int] $bx, Array[Int] $by )
$wx; X coordinate relative to the widget.
$wy; Y coordinate relative to the widget.
$bx; (transfer ownership: full) return location for bin_window X coordinate.
$by; (transfer ownership: full) return location for bin_window Y coordinate.
convert-widget-to-tree-coords
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Converts widget coordinates to coordinates for the tree (the full scrollable area of the tree).
method convert-widget-to-tree-coords ( Int() $wx, Int() $wy, Array[Int] $tx, Array[Int] $ty )
$wx; X coordinate relative to the widget.
$wy; Y coordinate relative to the widget.
$tx; (transfer ownership: full) return location for tree X coordinate.
$ty; (transfer ownership: full) return location for tree Y coordinate.
create-row-drag-icon
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Creates a Gnome::Cairo::N-Context representation of the row at $path
. This image is used for a drag icon.
method create-row-drag-icon ( N-Object $path --> N-Object )
$path; a Gnome::Gtk4::N-TreePath in
$tree-view
Return value; a newly-allocated surface of the drag icon..
enable-model-drag-dest
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Turns $tree-view
into a drop destination for automatic DND. Calling this method sets Gnome::Gtk4::TreeView:reorderable to False
.
method enable-model-drag-dest ( N-Object $formats, UInt $actions )
$formats; the target formats that the drag will support
$actions; the bitmask of possible actions for a drag from this widget.
enable-model-drag-source
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Turns $tree-view
into a drag source for automatic DND. Calling this method sets Gnome::Gtk4::TreeView:reorderable to False
.
method enable-model-drag-source ( UInt $start-button-mask, N-Object $formats, UInt $actions )
$start-button-mask; Mask of allowed buttons to start drag.
$formats; the target formats that the drag will support
$actions; the bitmask of possible actions for a drag from this widget.
expand-all
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Recursively expands all nodes in the $tree-view
.
method expand-all ( )
expand-row
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Opens the row so its children are visible.
method expand-row ( N-Object $path, Bool() $open-all --> Bool )
$path; path to a row
$open-all; whether to recursively expand, or just expand immediate children.
Return value; True
if the row existed and had children.
expand-to-path
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Expands the row at $path
. This will also expand all parent rows of $path
as necessary.
method expand-to-path ( N-Object $path )
$path; path to a row.
get-activate-on-single-click
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Gets the setting set by .set-activate-on-single-click()
.
method get-activate-on-single-click (--> Bool )
Return value; True
if row-activated will be emitted on a single click.
get-background-area
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Fills the bounding rectangle in bin_window coordinates for the cell at the row specified by $path
and the column specified by $column
. If $path
is undefined, or points to a node not found in the tree, the $y
and $height
fields of the rectangle will be filled with 0. If $column
is undefined, the $x
and $width
fields will be filled with 0. The returned rectangle is equivalent to the $background-area
passed to gtk_cell_renderer_render(). These background areas tile to cover the entire bin window. Contrast with the $cell-area
, returned by .get-cell-area()
, which returns only the cell itself, excluding surrounding borders and the tree expander area.
method get-background-area ( N-Object $path, N-Object() $column, N-Object $rect )
$path; a Gnome::Gtk4::N-TreePath for the row, or undefined to get only horizontal coordinates
$column; a Gnome::Gtk4::TreeViewColumn for the column, or undefined to get only vertical coordinates.
$rect; rectangle to fill with cell background rect
get-cell-area
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Fills the bounding rectangle in bin_window coordinates for the cell at the row specified by $path
and the column specified by $column
. If $path
is undefined, or points to a path not currently displayed, the $y
and $height
fields of the rectangle will be filled with 0. If $column
is undefined, the $x
and $width
fields will be filled with 0. The sum of all cell rects does not cover the entire tree; there are extra pixels in between rows, for example. The returned rectangle is equivalent to the $cell-area
passed to gtk_cell_renderer_render(). This function is only valid if $tree-view
is realized.
method get-cell-area ( N-Object $path, N-Object() $column, N-Object $rect )
$path; a Gnome::Gtk4::N-TreePath for the row, or undefined to get only horizontal coordinates
$column; a Gnome::Gtk4::TreeViewColumn for the column, or undefined to get only vertical coordinates.
$rect; rectangle to fill with cell rect
get-column
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Gets the Gnome::Gtk4::TreeViewColumn at the given position in the #tree_view.
method get-column ( Int() $n --> N-Object )
$n; The position of the column, counting from 0..
Return value; The Gnome::Gtk4::TreeViewColumn, or undefined if the position is outside the range of columns..
get-columns
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns a Gnome::Glib::N-List of all the Gnome::Gtk4::TreeViewColumns currently in $tree-view
. The returned list must be freed with g_list_free ().
method get-columns (--> N-List )
Return value; A list of Gnome::Gtk4::TreeViewColumns.
get-cursor
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Fills in $path
and $focus-column
with the current path and focus column. If the cursor isn’t currently set, then * $path
will be undefined. If no column currently has focus, then * $focus-column
will be undefined.
The returned Gnome::Gtk4::N-TreePath must be freed with gtk_tree_path_free() when you are done with it.
method get-cursor ( N-Object $path, N-Object() $focus-column )
$path; (transfer ownership: full) A pointer to be filled with the current cursor path
$focus-column; A pointer to be filled with the current focus column.
get-dest-row-at-pos
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Determines the destination row for a given position. $drag-x
and $drag-y
are expected to be in widget coordinates. This function is only meaningful if $tree-view
is realized. Therefore this function will always return False
if $tree-view
is not realized or does not have a model.
method get-dest-row-at-pos ( Int() $drag-x, Int() $drag-y, N-Object $path, GtkTreeViewDropPosition $pos --> Bool )
$drag-x; the position to determine the destination row for.
$drag-y; the position to determine the destination row for.
$path; (transfer ownership: full) Return location for the path of the highlighted row
$pos; (transfer ownership: full) Return location for the drop position, or undefined.
Return value; whether there is a row at the given position, True
if this is indeed the case..
get-drag-dest-row
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Gets information about the row that is highlighted for feedback.
method get-drag-dest-row ( N-Object $path, GtkTreeViewDropPosition $pos )
$path; (transfer ownership: full) Return location for the path of the highlighted row
$pos; (transfer ownership: full) Return location for the drop position.
get-enable-search
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns whether or not the tree allows to start interactive searching by typing in text.
method get-enable-search (--> Bool )
Return value; whether or not to let the user search interactively.
get-enable-tree-lines
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns whether or not tree lines are drawn in $tree-view
.
method get-enable-tree-lines (--> Bool )
Return value; True
if tree lines are drawn in $tree-view
, False
otherwise..
get-expander-column
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the column that is the current expander column, or undefined if none has been set. This column has the expander arrow drawn next to it.
method get-expander-column (--> N-Object )
Return value; The expander column..
get-fixed-height-mode
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns whether fixed height mode is turned on for $tree-view
.
method get-fixed-height-mode (--> Bool )
Return value; True
if $tree-view
is in fixed height mode.
get-grid-lines
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns which grid lines are enabled in $tree-view
.
method get-grid-lines (--> GtkTreeViewGridLines )
Return value; a Gnome::Gtk4::TreeViewGridLines value indicating which grid lines are enabled..
get-headers-clickable
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns whether all header columns are clickable.
method get-headers-clickable (--> Bool )
Return value; True
if all header columns are clickable, otherwise False
.
get-headers-visible
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns True
if the headers on the $tree-view
are visible.
method get-headers-visible (--> Bool )
Return value; Whether the headers are visible or not..
get-hover-expand
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns whether hover expansion mode is turned on for $tree-view
.
method get-hover-expand (--> Bool )
Return value; True
if $tree-view
is in hover expansion mode.
get-hover-selection
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns whether hover selection mode is turned on for $tree-view
.
method get-hover-selection (--> Bool )
Return value; True
if $tree-view
is in hover selection mode.
get-level-indentation
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the amount, in pixels, of extra indentation for child levels in $tree-view
.
method get-level-indentation (--> Int )
Return value; the amount of extra indentation for child levels in $tree-view
. A return value of 0 means that this feature is disabled..
get-model
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the model the Gnome::Gtk4::TreeView is based on. Returns undefined if the model is unset.
method get-model (--> N-Object )
Return value; A Gnome::Gtk4::R-TreeModel.
get-n-columns
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Queries the number of columns in the given $tree-view
.
method get-n-columns (--> UInt )
Return value; The number of columns in the $tree-view
.
get-path-at-pos
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Finds the path at the point ( $x
, $y
), relative to bin_window coordinates. That is, $x
and $y
are relative to an events coordinates. Widget-relative coordinates must be converted using .convert-widget-to-bin-window-coords()
. It is primarily for things like popup menus. If $path
is non-undefined, then it will be filled with the Gnome::Gtk4::N-TreePath at that point. This path should be freed with gtk_tree_path_free(). If $column
is non-undefined, then it will be filled with the column at that point. $cell-x
and $cell-y
return the coordinates relative to the cell background (i.e. the $background-area
passed to gtk_cell_renderer_render()). This function is only meaningful if $tree-view
is realized. Therefore this function will always return False
if $tree-view
is not realized or does not have a model.
For converting widget coordinates (eg. the ones you get from GtkWidget::query-tooltip), please see .convert-widget-to-bin-window-coords()
.
method get-path-at-pos ( Int() $x, Int() $y, N-Object $path, N-Object() $column, Array[Int] $cell-x, Array[Int] $cell-y --> Bool )
$x; The x position to be identified (relative to bin_window)..
$y; The y position to be identified (relative to bin_window)..
$path; (transfer ownership: full) A pointer to a Gnome::Gtk4::N-TreePath pointer to be filled in
$column; A pointer to a Gnome::Gtk4::TreeViewColumn pointer to be filled in.
$cell-x; (transfer ownership: full) A pointer where the X coordinate relative to the cell can be placed.
$cell-y; (transfer ownership: full) A pointer where the Y coordinate relative to the cell can be placed.
Return value; True
if a row exists at that coordinate..
get-reorderable
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Retrieves whether the user can reorder the tree via drag-and-drop. See .set-reorderable()
.
method get-reorderable (--> Bool )
Return value; True
if the tree can be reordered..
get-row-separator-func
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the current row separator function.
method get-row-separator-func (--> )
Return value; the current row separator function..
get-rubber-banding
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns whether rubber banding is turned on for $tree-view
. If the selection mode is GTK_SELECTION_MULTIPLE
, rubber banding will allow the user to select multiple rows by dragging the mouse.
method get-rubber-banding (--> Bool )
Return value; True
if rubber banding in $tree-view
is enabled..
get-search-column
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Gets the column searched on by the interactive search code.
method get-search-column (--> Int )
Return value; the column the interactive search code searches in..
get-search-entry
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the Gnome::Gtk4::Entry which is currently in use as interactive search entry for $tree-view
. In case the built-in entry is being used, undefined will be returned.
method get-search-entry (--> N-Object )
Return value; the entry currently in use as search entry..
get-search-equal-func
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the compare function currently in use.
method get-search-equal-func (--> )
Return value; the currently used compare function for the search code..
get-selection
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Gets the Gnome::Gtk4::TreeSelection associated with $tree-view
.
method get-selection (--> N-Object )
Return value; A Gnome::Gtk4::TreeSelection object..
get-show-expanders
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns whether or not expanders are drawn in $tree-view
.
method get-show-expanders (--> Bool )
Return value; True
if expanders are drawn in $tree-view
, False
otherwise..
get-tooltip-column
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the column of $tree-view
’s model which is being used for displaying tooltips on $tree-view
’s rows.
method get-tooltip-column (--> Int )
Return value; the index of the tooltip column that is currently being used, or -1 if this is disabled..
get-tooltip-context
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
This function is supposed to be used in a query-tooltip signal handler for Gnome::Gtk4::TreeView. The $x
, $y
and $keyboard-tip
values which are received in the signal handler, should be passed to this function without modification.
The return value indicates whether there is a tree view row at the given coordinates (True
) or not (False
) for mouse tooltips. For keyboard tooltips the row returned will be the cursor row. When True
, then any of $model
, $path
and $iter
which have been provided will be set to point to that row and the corresponding model. $x
and $y
will always be converted to be relative to $tree-view
’s bin_window if $keyboard-tooltip
is False
.
method get-tooltip-context ( Int() $x, Int() $y, Bool() $keyboard-tip, N-Object() $model, N-Object $path, N-Object $iter --> Bool )
$x; the x coordinate (relative to widget coordinates).
$y; the y coordinate (relative to widget coordinates).
$keyboard-tip; whether this is a keyboard tooltip or not.
$model; a pointer to receive a Gnome::Gtk4::R-TreeModel.
$path; (transfer ownership: full) a pointer to receive a Gnome::Gtk4::N-TreePath
$iter; a pointer to receive a Gnome::Gtk4::N-TreeIter
Return value; whether or not the given tooltip context points to a row.
get-visible-range
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets $start-path
and $end-path
to be the first and last visible path. Note that there may be invisible paths in between.
The paths should be freed with gtk_tree_path_free() after use.
method get-visible-range ( N-Object $start-path, N-Object $end-path --> Bool )
$start-path; (transfer ownership: full) Return location for start of region
$end-path; (transfer ownership: full) Return location for end of region
Return value; True
, if valid paths were placed in $start-path
and $end-path
..
get-visible-rect
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Fills $visible-rect
with the currently-visible region of the buffer, in tree coordinates. Convert to bin_window coordinates with .convert-tree-to-bin-window-coords()
. Tree coordinates start at 0,0 for row 0 of the tree, and cover the entire scrollable area of the tree.
method get-visible-rect ( N-Object $visible-rect )
$visible-rect; rectangle to fill
insert-column
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
This inserts the $column
into the $tree-view
at $position
. If $position
is -1, then the column is inserted at the end. If $tree-view
has “fixed_height” mode enabled, then $column
must have its “sizing” property set to be GTK_TREE_VIEW_COLUMN_FIXED.
method insert-column ( N-Object() $column, Int() $position --> Int )
$column; The Gnome::Gtk4::TreeViewColumn to be inserted..
$position; The position to insert
$column
in..
Return value; The number of columns in $tree-view
after insertion..
insert-column-with-attributes This function is not yet available
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Creates a new Gnome::Gtk4::TreeViewColumn and inserts it into the $tree-view
at $position
. If $position
is -1, then the newly created column is inserted at the end. The column is initialized with the attributes given. If $tree-view
has “fixed_height” mode enabled, then the new column will have its sizing property set to be GTK_TREE_VIEW_COLUMN_FIXED.
method insert-column-with-attributes ( Int() $position, Str $title, N-Object() $cell, … --> Int )
$position; The position to insert the new column in.
$title; The title to set the header to.
$cell; The Gnome::Gtk4::CellRenderer.
…; …. Note that each argument must be specified as a type followed by its value!
Return value; The number of columns in $tree-view
after insertion..
insert-column-with-data-func This function is not yet available
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Convenience function that inserts a new column into the Gnome::Gtk4::TreeView with the given cell renderer and a Gnome::Gtk4::T-treeviewcolumn to set cell renderer attributes (normally using data from the model). See also .column-set-cell-data-func()
, .column-pack-start()
. If $tree-view
has “fixed_height” mode enabled, then the new column will have its “sizing” property set to be GTK_TREE_VIEW_COLUMN_FIXED.
method insert-column-with-data-func ( Int() $position, Str $title, N-Object() $cell, &func, gpointer $data, … --> Int )
$position; Position to insert, -1 for append.
$title; column title.
$cell; cell renderer for column.
&func; function to set attributes of cell renderer. Tthe function must be specified with following signature;
:( N-Object $tree-column, N-Object $cell, N-Object $tree-model, N-Object $iter, gpointer $data )
.$data; data for
$func
.dnotify; destroy notifier for
$data
. Note that each argument must be specified as a type followed by its value!
Return value; number of columns in the tree view post-insert.
is-blank-at-pos
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Determine whether the point ( $x
, $y
) in $tree-view
is blank, that is no cell content nor an expander arrow is drawn at the location. If so, the location can be considered as the background. You might wish to take special action on clicks on the background, such as clearing a current selection, having a custom context menu or starting rubber banding.
The $x
and $y
coordinate that are provided must be relative to bin_window coordinates. Widget-relative coordinates must be converted using .convert-widget-to-bin-window-coords()
.
For converting widget coordinates (eg. the ones you get from GtkWidget::query-tooltip), please see .convert-widget-to-bin-window-coords()
.
The $path
, $column
, $cell-x
and $cell-y
arguments will be filled in likewise as for .get-path-at-pos()
. Please see .get-path-at-pos()
for more information.
method is-blank-at-pos ( Int() $x, Int() $y, N-Object $path, N-Object() $column, Array[Int] $cell-x, Array[Int] $cell-y --> Bool )
$x; The x position to be identified (relative to bin_window).
$y; The y position to be identified (relative to bin_window).
$path; (transfer ownership: full) A pointer to a Gnome::Gtk4::N-TreePath pointer to be filled in
$column; A pointer to a Gnome::Gtk4::TreeViewColumn pointer to be filled in.
$cell-x; (transfer ownership: full) A pointer where the X coordinate relative to the cell can be placed.
$cell-y; (transfer ownership: full) A pointer where the Y coordinate relative to the cell can be placed.
Return value; True
if the area at the given coordinates is blank, False
otherwise..
is-rubber-banding-active
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns whether a rubber banding operation is currently being done in $tree-view
.
method is-rubber-banding-active (--> Bool )
Return value; True
if a rubber banding operation is currently being done in $tree-view
..
map-expanded-rows
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Calls $func
on all expanded rows.
method map-expanded-rows ( &func, gpointer $data )
&func; A function to be called. Tthe function must be specified with following signature;
:( N-Object $tree-view, N-Object $path, gpointer $user-data )
.$data; User data to be passed to the function..
move-column-after
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Moves $column
to be after to $base-column
. If $base-column
is undefined, then $column
is placed in the first position.
method move-column-after ( N-Object() $column, N-Object() $base-column )
$column; The Gnome::Gtk4::TreeViewColumn to be moved..
$base-column; The Gnome::Gtk4::TreeViewColumn to be moved relative to.
remove-column
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Removes $column
from $tree-view
.
method remove-column ( N-Object() $column --> Int )
$column; The Gnome::Gtk4::TreeViewColumn to remove..
Return value; The number of columns in $tree-view
after removing..
row-activated
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Activates the cell determined by $path
and $column
.
method row-activated ( N-Object $path, N-Object() $column )
$path; The Gnome::Gtk4::N-TreePath to be activated.
$column; The Gnome::Gtk4::TreeViewColumn to be activated..
row-expanded
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns True
if the node pointed to by $path
is expanded in $tree-view
.
method row-expanded ( N-Object $path --> Bool )
$path; A Gnome::Gtk4::N-TreePath to test expansion state.
Return value; True
if #path is expanded..
scroll-to-cell
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Moves the alignments of $tree-view
to the position specified by $column
and $path
. If $column
is undefined, then no horizontal scrolling occurs. Likewise, if $path
is undefined no vertical scrolling occurs. At a minimum, one of $column
or $path
need to be non-undefined. $row-align
determines where the row is placed, and $col-align
determines where $column
is placed. Both are expected to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5 means center.
If $use-align
is False
, then the alignment arguments are ignored, and the tree does the minimum amount of work to scroll the cell onto the screen. This means that the cell will be scrolled to the edge closest to its current position. If the cell is currently visible on the screen, nothing is done.
This function only works if the model is set, and $path
is a valid row on the model. If the model changes before the $tree-view
is realized, the centered path will be modified to reflect this change.
method scroll-to-cell ( N-Object $path, N-Object() $column, Bool() $use-align, Num() $row-align, Num() $col-align )
$path; The path of the row to move to
$column; The Gnome::Gtk4::TreeViewColumn to move horizontally to.
$use-align; whether to use alignment arguments, or
False
..$row-align; The vertical alignment of the row specified by
$path
..$col-align; The horizontal alignment of the column specified by
$column
..
scroll-to-point
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Scrolls the tree view such that the top-left corner of the visible area is $tree-x
, $tree-y
, where $tree-x
and $tree-y
are specified in tree coordinates. The $tree-view
must be realized before this function is called. If it isn't, you probably want to be using .scroll-to-cell()
.
If either $tree-x
or $tree-y
are -1, then that direction isn’t scrolled.
method scroll-to-point ( Int() $tree-x, Int() $tree-y )
$tree-x; X coordinate of new top-left pixel of visible area, or -1.
$tree-y; Y coordinate of new top-left pixel of visible area, or -1.
set-activate-on-single-click
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Cause the Gnome::Gtk4::TreeView::row-activated signal to be emitted on a single click instead of a double click.
method set-activate-on-single-click ( Bool() $single )
$single;
True
to emit row-activated on a single click.
set-column-drag-function This function is not yet available
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets a user function for determining where a column may be dropped when dragged. This function is called on every column pair in turn at the beginning of a column drag to determine where a drop can take place. The arguments passed to $func
are: the $tree-view
, the Gnome::Gtk4::TreeViewColumn being dragged, the two Gnome::Gtk4::TreeViewColumns determining the drop spot, and $user-data
. If either of the Gnome::Gtk4::TreeViewColumn arguments for the drop spot are undefined, then they indicate an edge. If $func
is set to be undefined, then $tree-view
reverts to the default behavior of allowing all columns to be dropped everywhere.
method set-column-drag-function ( &func, gpointer $user-data, … )
&func; A function to determine which columns are reorderable. Tthe function must be specified with following signature;
:( N-Object $tree-view, N-Object $column, N-Object $prev-column, N-Object $next-column, gpointer $data --
gboolean )>.$user-data; User data to be passed to
$func
.destroy; Destroy notifier for
$user-data
. Note that each argument must be specified as a type followed by its value!
set-cursor
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the current keyboard focus to be at $path
, and selects it. This is useful when you want to focus the user’s attention on a particular row. If $focus-column
is defined, then focus is given to the column specified by it. Additionally, if $focus-column
is specified, and $start-editing
is True
, then editing should be started in the specified cell. This function is often followed by $gtk-widget-grab-focus
( $tree-view
) in order to give keyboard focus to the widget. Please note that editing can only happen when the widget is realized.
If $path
is invalid for $model
, the current cursor (if any) will be unset and the function will return without failing.
method set-cursor ( N-Object $path, N-Object() $focus-column, Bool() $start-editing )
$path; A Gnome::Gtk4::N-TreePath
$focus-column; A Gnome::Gtk4::TreeViewColumn.
$start-editing;
True
if the specified cell should start being edited..
set-cursor-on-cell
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the current keyboard focus to be at $path
, and selects it. This is useful when you want to focus the user’s attention on a particular row. If $focus-column
is defined, then focus is given to the column specified by it. If $focus-column
and $focus-cell
are defined, and $focus-column
contains 2 or more editable or activatable cells, then focus is given to the cell specified by $focus-cell
. Additionally, if $focus-column
is specified, and $start-editing
is True
, then editing should be started in the specified cell. This function is often followed by $gtk-widget-grab-focus
( $tree-view
) in order to give keyboard focus to the widget. Please note that editing can only happen when the widget is realized.
If $path
is invalid for $model
, the current cursor (if any) will be unset and the function will return without failing.
method set-cursor-on-cell ( N-Object $path, N-Object() $focus-column, N-Object() $focus-cell, Bool() $start-editing )
$path; A Gnome::Gtk4::N-TreePath
$focus-column; A Gnome::Gtk4::TreeViewColumn.
$focus-cell; A Gnome::Gtk4::CellRenderer.
$start-editing;
True
if the specified cell should start being edited..
set-drag-dest-row
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the row that is highlighted for feedback. If $path
is undefined, an existing highlight is removed.
method set-drag-dest-row ( N-Object $path, GtkTreeViewDropPosition $pos )
$path; The path of the row to highlight
$pos; Specifies whether to drop before, after or into the row.
set-enable-search
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
If $enable-search
is set, then the user can type in text to search through the tree interactively (this is sometimes called "typeahead find").
Note that even if this is False
, the user can still initiate a search using the “start-interactive-search” key binding.
method set-enable-search ( Bool() $enable-search )
$enable-search;
True
, if the user can search interactively.
set-enable-tree-lines
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets whether to draw lines interconnecting the expanders in $tree-view
. This does not have any visible effects for lists.
method set-enable-tree-lines ( Bool() $enabled )
$enabled;
True
to enable tree line drawing,False
otherwise..
set-expander-column
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the column to draw the expander arrow at. It must be in $tree-view
. If $column
is undefined, then the expander arrow is always at the first visible column.
If you do not want expander arrow to appear in your tree, set the expander column to a hidden column.
method set-expander-column ( N-Object() $column )
$column; undefined, or the column to draw the expander arrow at..
set-fixed-height-mode
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Enables or disables the fixed height mode of $tree-view
. Fixed height mode speeds up Gnome::Gtk4::TreeView by assuming that all rows have the same height. Only enable this option if all rows are the same height and all columns are of type GTK_TREE_VIEW_COLUMN_FIXED
.
method set-fixed-height-mode ( Bool() $enable )
$enable;
True
to enable fixed height mode.
set-grid-lines
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets which grid lines to draw in $tree-view
.
method set-grid-lines ( GtkTreeViewGridLines $grid-lines )
$grid-lines; a Gnome::Gtk4::TreeViewGridLines value indicating which grid lines to enable..
set-headers-clickable
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Allow the column title buttons to be clicked.
method set-headers-clickable ( Bool() $setting )
$setting;
True
if the columns are clickable..
set-headers-visible
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the visibility state of the headers.
method set-headers-visible ( Bool() $headers-visible )
$headers-visible;
True
if the headers are visible.
set-hover-expand
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Enables or disables the hover expansion mode of $tree-view
. Hover expansion makes rows expand or collapse if the pointer moves over them.
method set-hover-expand ( Bool() $expand )
$expand;
True
to enable hover selection mode.
set-hover-selection
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
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
.
method set-hover-selection ( Bool() $hover )
$hover;
True
to enable hover selection mode.
set-level-indentation
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the amount of extra indentation for child levels to use in $tree-view
in addition to the default indentation. The value should be specified in pixels, a value of 0 disables this feature and in this case only the default indentation will be used. This does not have any visible effects for lists.
method set-level-indentation ( Int() $indentation )
$indentation; the amount, in pixels, of extra indentation in
$tree-view
..
set-model
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the model for a Gnome::Gtk4::TreeView. If the $tree-view
already has a model set, it will remove it before setting the new model. If $model
is undefined, then it will unset the old model.
method set-model ( N-Object() $model )
$model; The model..
set-reorderable
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
This function is a convenience function to allow you to reorder models that support the GtkTreeDragSourceIface and the GtkTreeDragDestIface. Both Gnome::Gtk4::TreeStore and Gnome::Gtk4::ListStore support these. If $reorderable
is True
, then the user can reorder the model by dragging and dropping rows. The developer can listen to these changes by connecting to the model’s Gnome::Gtk4::R-TreeModel::row-inserted` and Gnome::Gtk4::R-TreeModel::row-deleted` signals. The reordering is implemented by setting up the tree view as a drag source and destination. Therefore, drag and drop can not be used in a reorderable view for any other purpose.
This function does not give you any degree of control over the order -- any reordering is allowed. If more control is needed, you should probably handle drag and drop manually.
method set-reorderable ( Bool() $reorderable )
$reorderable;
True
, if the tree can be reordered..
set-row-separator-func This function is not yet available
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the row separator function, which is used to determine whether a row should be drawn as a separator. If the row separator function is undefined, no separators are drawn. This is the default value.
method set-row-separator-func ( &func, gpointer $data, … )
&func; a Gnome::Gtk4::TreeViewRowSeparatorFunc. Tthe function must be specified with following signature;
:( N-Object $model, N-Object $iter, gpointer $data --
gboolean )>.$data; user data to pass to
$func
.destroy; destroy notifier for
$data
. Note that each argument must be specified as a type followed by its value!
set-rubber-banding
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Enables or disables rubber banding in $tree-view
. If the selection mode is GTK_SELECTION_MULTIPLE
, rubber banding will allow the user to select multiple rows by dragging the mouse.
method set-rubber-banding ( Bool() $enable )
$enable;
True
to enable rubber banding.
set-search-column
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets $column
as the column where the interactive search code should search in for the current model.
If the search column is set, users can use the “start-interactive-search” key binding to bring up search popup. The enable-search property controls whether simply typing text will also start an interactive search.
Note that $column
refers to a column of the current model. The search column is reset to -1 when the model is changed.
method set-search-column ( Int() $column )
$column; the column of the model to search in, or -1 to disable searching.
set-search-entry
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the entry which the interactive search code will use for this $tree-view
. This is useful when you want to provide a search entry in our interface at all time at a fixed position. Passing undefined for $entry
will make the interactive search code use the built-in popup entry again.
method set-search-entry ( N-Object() $entry )
$entry; the entry the interactive search code of
$tree-view
should use.
set-search-equal-func This function is not yet available
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the compare function for the interactive search capabilities; note that somewhat like strcmp() returning 0 for equality Gnome::Gtk4::TreeViewSearchEqualFunc returns False
on matches.
method set-search-equal-func ( &search-equal-func, gpointer $search-user-data, … )
&search-equal-func; the compare function to use during the search. Tthe function must be specified with following signature;
:( N-Object $model, gint $column, Str $key, N-Object $iter, gpointer $search-data --
gboolean )>.$search-user-data; user data to pass to
$search-equal-func
.search-destroy; Destroy notifier for
$search-user-data
. Note that each argument must be specified as a type followed by its value!
set-show-expanders
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets whether to draw and enable expanders and indent child rows in $tree-view
. When disabled there will be no expanders visible in trees and there will be no way to expand and collapse rows by default. Also note that hiding the expanders will disable the default indentation. You can set a custom indentation in this case using .set-level-indentation()
. This does not have any visible effects for lists.
method set-show-expanders ( Bool() $enabled )
$enabled;
True
to enable expander drawing,False
otherwise..
set-tooltip-cell
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the tip area of $tooltip
to the area $path
, $column
and $cell
have in common. For example if $path
is undefined and $column
is set, the tip area will be set to the full area covered by $column
. See also gtk_tooltip_set_tip_area().
Note that if $path
is not specified and $cell
is set and part of a column containing the expander, the tooltip might not show and hide at the correct position. In such cases $path
must be set to the current node under the mouse cursor for this function to operate correctly.
See also .set-tooltip-column()
for a simpler alternative.
method set-tooltip-cell ( N-Object() $tooltip, N-Object $path, N-Object() $column, N-Object() $cell )
$tooltip; a Gnome::Gtk4::Tooltip.
$path; a Gnome::Gtk4::N-TreePath
$column; a Gnome::Gtk4::TreeViewColumn.
$cell; a Gnome::Gtk4::CellRenderer.
set-tooltip-column
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
If you only plan to have simple (text-only) tooltips on full rows, you can use this function to have Gnome::Gtk4::TreeView handle these automatically for you. $column
should be set to the column in $tree-view
’s model containing the tooltip texts, or -1 to disable this feature.
When enabled, Gnome::Gtk4::Widget:has-tooltip` will be set to True
and $tree-view
will connect a Gnome::Gtk4::Widget::query-tooltip` signal handler.
Note that the signal handler sets the text with gtk_tooltip_set_markup(), so &, <, etc have to be escaped in the text.
method set-tooltip-column ( Int() $column )
$column; an integer, which is a valid column number for
$tree-view
’s model.
set-tooltip-row
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the tip area of $tooltip
to be the area covered by the row at $path
. See also .set-tooltip-column()
for a simpler alternative. See also gtk_tooltip_set_tip_area().
method set-tooltip-row ( N-Object() $tooltip, N-Object $path )
$tooltip; a Gnome::Gtk4::Tooltip.
$path; a Gnome::Gtk4::N-TreePath
unset-rows-drag-dest
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Undoes the effect of .enable-model-drag-dest()
. Calling this method sets Gnome::Gtk4::TreeView:reorderable to False
.
method unset-rows-drag-dest ( )
unset-rows-drag-source
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Undoes the effect of .enable-model-drag-source()
. Calling this method sets Gnome::Gtk4::TreeView:reorderable to False
.
method unset-rows-drag-source ( )
Signals
columns-changed
The number of columns of the treeview has changed.
method handler ( Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::TreeView :$_widget, *C<user>-options )
$_handle_id; The registered event handler id.
$_native-object; The native object provided by the Raku object which registered this event. This a native Gnome::Gtk4::TreeView object.
$_widget; The object which registered the signal. User code may have left the object going out of scope.
user
-options; A list of named arguments provided at the.register-signal()
method from Gnome::GObject::Object.
cursor-changed
The position of the cursor (focused cell) has changed.
method handler ( Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::TreeView :$_widget, *C<user>-options )
$_handle_id; The registered event handler id.
$_native-object; The native object provided by the Raku object which registered this event. This a native Gnome::Gtk4::TreeView object.
$_widget; The object which registered the signal. User code may have left the object going out of scope.
user
-options; A list of named arguments provided at the.register-signal()
method from Gnome::GObject::Object.
expand-collapse-cursor-row
method handler ( gboolean $object, gboolean $p0, gboolean $p1, Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::TreeView :$_widget, *C<user>-options --> gboolean )
$object; .
$p0; .
$p1; .
$_handle_id; The registered event handler id.
$_native-object; The native object provided by the Raku object which registered this event. This a native Gnome::Gtk4::TreeView object.
$_widget; The object which registered the signal. User code may have left the object going out of scope.
user
-options; A list of named arguments provided at the.register-signal()
method from Gnome::GObject::Object.
Return value;
move-cursor
The Gnome::Gtk4::TreeView::move-cursor signal is a [keybinding signal]Gnome::Gtk4::SignalAction which gets emitted when the user presses one of the cursor keys.
Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control the cursor programmatically. In contrast to .set-cursor()
and .set-cursor-on-cell()
when moving horizontally Gnome::Gtk4::TreeView::move-cursor does not reset the current selection.
method handler ( $step, gint $direction, gboolean $extend, gboolean $modify, Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::TreeView :$_widget, *C<user>-options --> gboolean )
$step; the granularity of the move, as a
enumeration GtkMovementStep defined in Gnome::Gtk4::T-enums
.GTK_MOVEMENT_LOGICAL_POSITIONS
,GTK_MOVEMENT_VISUAL_POSITIONS
,GTK_MOVEMENT_DISPLAY_LINES
,GTK_MOVEMENT_PAGES
andGTK_MOVEMENT_BUFFER_ENDS
are supported.GTK_MOVEMENT_LOGICAL_POSITIONS
andGTK_MOVEMENT_VISUAL_POSITIONS
are treated identically..$direction; the direction to move: +1 to move forwards; -1 to move backwards. The resulting movement is undefined for all other values..
$extend; whether to extend the selection.
$modify; whether to modify the selection.
$_handle_id; The registered event handler id.
$_native-object; The native object provided by the Raku object which registered this event. This a native Gnome::Gtk4::TreeView object.
$_widget; The object which registered the signal. User code may have left the object going out of scope.
user
-options; A list of named arguments provided at the.register-signal()
method from Gnome::GObject::Object.
Return value; True
if $step
is supported, False
otherwise.
row-activated
The "row-activated" signal is emitted when the method .row-activated()
is called.
This signal is emitted when the user double-clicks a treeview row with the activate-on-single-click property set to False
, or when the user single-clicks a row when that property set to True
.
This signal is also emitted when a non-editable row is selected and one of the keys: <kbd>Space</kbd>, <kbd>Shift</kbd>+<kbd>Space</kbd>, <kbd>Return</kbd> or <kbd>Enter</kbd> is pressed.
For selection handling refer to the [tree widget conceptual overview](section-tree-widget.html) as well as Gnome::Gtk4::TreeSelection.
method handler ( N-Object $path, N-Object $column, Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::TreeView :$_widget, *C<user>-options )
$path; the Gnome::Gtk4::N-TreePath for the activated row.
$column; the Gnome::Gtk4::TreeViewColumn in which the activation occurred.
$_handle_id; The registered event handler id.
$_native-object; The native object provided by the Raku object which registered this event. This a native Gnome::Gtk4::TreeView object.
$_widget; The object which registered the signal. User code may have left the object going out of scope.
user
-options; A list of named arguments provided at the.register-signal()
method from Gnome::GObject::Object.
row-collapsed
The given row has been collapsed (child nodes are hidden).
method handler ( N-Object $iter, N-Object $path, Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::TreeView :$_widget, *C<user>-options )
$iter; the tree iter of the collapsed row.
$path; a tree path that points to the row.
$_handle_id; The registered event handler id.
$_native-object; The native object provided by the Raku object which registered this event. This a native Gnome::Gtk4::TreeView object.
$_widget; The object which registered the signal. User code may have left the object going out of scope.
user
-options; A list of named arguments provided at the.register-signal()
method from Gnome::GObject::Object.
row-expanded
The given row has been expanded (child nodes are shown).
method handler ( N-Object $iter, N-Object $path, Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::TreeView :$_widget, *C<user>-options )
$iter; the tree iter of the expanded row.
$path; a tree path that points to the row.
$_handle_id; The registered event handler id.
$_native-object; The native object provided by the Raku object which registered this event. This a native Gnome::Gtk4::TreeView object.
$_widget; The object which registered the signal. User code may have left the object going out of scope.
user
-options; A list of named arguments provided at the.register-signal()
method from Gnome::GObject::Object.
select-all
method handler ( Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::TreeView :$_widget, *C<user>-options --> gboolean )
$_handle_id; The registered event handler id.
$_native-object; The native object provided by the Raku object which registered this event. This a native Gnome::Gtk4::TreeView object.
$_widget; The object which registered the signal. User code may have left the object going out of scope.
user
-options; A list of named arguments provided at the.register-signal()
method from Gnome::GObject::Object.
Return value;
select-cursor-parent
method handler ( Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::TreeView :$_widget, *C<user>-options --> gboolean )
$_handle_id; The registered event handler id.
$_native-object; The native object provided by the Raku object which registered this event. This a native Gnome::Gtk4::TreeView object.
$_widget; The object which registered the signal. User code may have left the object going out of scope.
user
-options; A list of named arguments provided at the.register-signal()
method from Gnome::GObject::Object.
Return value;
select-cursor-row
method handler ( gboolean $object, Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::TreeView :$_widget, *C<user>-options --> gboolean )
$object; .
$_handle_id; The registered event handler id.
$_native-object; The native object provided by the Raku object which registered this event. This a native Gnome::Gtk4::TreeView object.
$_widget; The object which registered the signal. User code may have left the object going out of scope.
user
-options; A list of named arguments provided at the.register-signal()
method from Gnome::GObject::Object.
Return value;
start-interactive-search
method handler ( Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::TreeView :$_widget, *C<user>-options --> gboolean )
$_handle_id; The registered event handler id.
$_native-object; The native object provided by the Raku object which registered this event. This a native Gnome::Gtk4::TreeView object.
$_widget; The object which registered the signal. User code may have left the object going out of scope.
user
-options; A list of named arguments provided at the.register-signal()
method from Gnome::GObject::Object.
Return value;
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.
method handler ( N-Object $iter, N-Object $path, Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::TreeView :$_widget, *C<user>-options --> gboolean )
$iter; the tree iter of the row to collapse.
$path; a tree path that points to the row.
$_handle_id; The registered event handler id.
$_native-object; The native object provided by the Raku object which registered this event. This a native Gnome::Gtk4::TreeView object.
$_widget; The object which registered the signal. User code may have left the object going out of scope.
user
-options; A list of named arguments provided at the.register-signal()
method from Gnome::GObject::Object.
Return value; False
to allow collapsing, True
to reject
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.
method handler ( N-Object $iter, N-Object $path, Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::TreeView :$_widget, *C<user>-options --> gboolean )
$iter; the tree iter of the row to expand.
$path; a tree path that points to the row.
$_handle_id; The registered event handler id.
$_native-object; The native object provided by the Raku object which registered this event. This a native Gnome::Gtk4::TreeView object.
$_widget; The object which registered the signal. User code may have left the object going out of scope.
user
-options; A list of named arguments provided at the.register-signal()
method from Gnome::GObject::Object.
Return value; False
to allow expansion, True
to reject
toggle-cursor-row
method handler ( Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::TreeView :$_widget, *C<user>-options --> gboolean )
$_handle_id; The registered event handler id.
$_native-object; The native object provided by the Raku object which registered this event. This a native Gnome::Gtk4::TreeView object.
$_widget; The object which registered the signal. User code may have left the object going out of scope.
user
-options; A list of named arguments provided at the.register-signal()
method from Gnome::GObject::Object.
Return value;
unselect-all
method handler ( Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::TreeView :$_widget, *C<user>-options --> gboolean )
$_handle_id; The registered event handler id.
$_native-object; The native object provided by the Raku object which registered this event. This a native Gnome::Gtk4::TreeView object.
$_widget; The object which registered the signal. User code may have left the object going out of scope.
user
-options; A list of named arguments provided at the.register-signal()
method from Gnome::GObject::Object.
Return value;