Gnome::Gtk4::IconView
Description
Gnome::Gtk4::IconView is a widget which displays data in a grid of icons.
Gnome::Gtk4::IconView provides an alternative view on a Gnome::Gtk4::R-TreeModel. It displays the model as a grid of icons with labels. Like Gnome::Gtk4::TreeView, it allows to select one or multiple items (depending on the selection mode, see .set-selection-mode()
). In addition to selection with the arrow keys, Gnome::Gtk4::IconView supports rubberband selection, which is controlled by dragging the pointer.
Note that if the tree model is backed by an actual tree store (as opposed to a flat list where the mapping to icons is obvious), Gnome::Gtk4::IconView will only display the first level of the tree and ignore the tree’s branches.
CSS nodes
Gnome::Gtk4::IconView has a single CSS node with name iconview and style class .view. For rubberband selection, a subnode with name rubberband 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-iconview
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Creates a new Gnome::Gtk4::IconView widget
method new-iconview ( --> Gnome::Gtk4::IconView \)
new-with-area
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Creates a new Gnome::Gtk4::IconView widget using the specified $area
to layout cells inside the icons.
method new-with-area ( N-Object() $area --> Gnome::Gtk4::IconView \)
$area; the Gnome::Gtk4::CellArea to use to layout cells.
new-with-model
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Creates a new Gnome::Gtk4::IconView widget with the model $model
.
method new-with-model ( N-Object() $model --> Gnome::Gtk4::IconView \)
$model; The model..
Methods
create-drag-icon
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Creates a Gnome::Gdk4::R-Paintable representation of the item at $path
. This image is used for a drag icon.
method create-drag-icon ( N-Object $path --> N-Object )
$path; a Gnome::Gtk4::N-TreePath in
$icon-view
Return value; a newly-allocated Gnome::Gdk4::R-Paintable 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 $icon-view
into a drop destination for automatic DND. Calling this method sets Gnome::Gtk4::IconView:reorderable to False
.
method enable-model-drag-dest ( N-Object $formats, UInt $actions )
$formats; the formats that the drag will support
$actions; the bitmask of possible actions for a drag to this widget.
enable-model-drag-source
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Turns $icon-view
into a drag source for automatic DND. Calling this method sets Gnome::Gtk4::IconView: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 formats that the drag will support
$actions; the bitmask of possible actions for a drag from this widget.
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 item-activated will be emitted on a single click.
get-cell-rect
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Fills the bounding rectangle in widget coordinates for the cell specified by $path
and $cell
. If $cell
is undefined the main cell area is used.
This function is only valid if $icon-view
is realized.
method get-cell-rect ( N-Object $path, N-Object() $cell, N-Object $rect --> Bool )
$path; a Gnome::Gtk4::N-TreePath
$cell; a Gnome::Gtk4::CellRenderer.
$rect; rectangle to fill with cell rect
Return value; False
if there is no such item, True
otherwise.
get-column-spacing
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the value of the column-spacing property.
method get-column-spacing (--> Int )
Return value; the space between columns.
get-columns
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the value of the columns property.
method get-columns (--> Int )
Return value; the number of columns, or -1.
get-cursor
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Fills in $path
and $cell
with the current cursor path and cell. If the cursor isn’t currently set, then * $path
will be undefined. If no cell currently has focus, then * $cell
will be undefined.
The returned Gnome::Gtk4::N-TreePath must be freed with gtk_tree_path_free().
method get-cursor ( N-Object $path, N-Object() $cell --> Bool )
$path; (transfer ownership: full) Return location for the current cursor path
$cell; Return location the current focus cell.
Return value; True
if the cursor is set..
get-dest-item-at-pos
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Determines the destination item for a given position.
method get-dest-item-at-pos ( Int() $drag-x, Int() $drag-y, N-Object $path, GtkIconViewDropPosition $pos --> Bool )
$drag-x; the position to determine the destination item for.
$drag-y; the position to determine the destination item for.
$path; (transfer ownership: full) Return location for the path of the item
$pos; (transfer ownership: full) Return location for the drop position.
Return value; whether there is an item at the given position..
get-drag-dest-item
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Gets information about the item that is highlighted for feedback.
method get-drag-dest-item ( N-Object $path, GtkIconViewDropPosition $pos )
$path; (transfer ownership: full) Return location for the path of the highlighted item
$pos; (transfer ownership: full) Return location for the drop position.
get-item-at-pos
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Gets the path and cell for the icon at the given position.
method get-item-at-pos ( Int() $x, Int() $y, N-Object $path, N-Object() $cell --> Bool )
$x; The x position to be identified.
$y; The y position to be identified.
$path; (transfer ownership: full) Return location for the path
$cell; Return location for the renderer responsible for the cell at (
$x
,$y
).
Return value; True
if an item exists at the specified position.
get-item-column
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Gets the column in which the item $path
is currently displayed. Column numbers start at 0.
method get-item-column ( N-Object $path --> Int )
$path; the Gnome::Gtk4::N-TreePath of the item
Return value; The column in which the item is displayed.
get-item-orientation
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the value of the item-orientation property which determines whether the labels are drawn beside the icons instead of below.
method get-item-orientation (--> GtkOrientation )
Return value; the relative position of texts and icons.
get-item-padding
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the value of the item-padding property.
method get-item-padding (--> Int )
Return value; the padding around items.
get-item-row
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Gets the row in which the item $path
is currently displayed. Row numbers start at 0.
method get-item-row ( N-Object $path --> Int )
$path; the Gnome::Gtk4::N-TreePath of the item
Return value; The row in which the item is displayed.
get-item-width
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the value of the item-width property.
method get-item-width (--> Int )
Return value; the width of a single item, or -1.
get-margin
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the value of the margin property.
method get-margin (--> Int )
Return value; the space at the borders.
get-markup-column
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the column with markup text for $icon-view
.
method get-markup-column (--> Int )
Return value; the markup column, or -1 if it’s unset..
get-model
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the model the Gnome::Gtk4::IconView is based on. Returns undefined if the model is unset.
method get-model (--> N-Object )
Return value; The currently used Gnome::Gtk4::R-TreeModel.
get-path-at-pos
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Gets the path for the icon at the given position.
method get-path-at-pos ( Int() $x, Int() $y --> N-Object )
$x; The x position to be identified.
$y; The y position to be identified.
Return value; The Gnome::Gtk4::N-TreePath corresponding to the icon or undefined if no icon exists at that position..
get-pixbuf-column
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the column with pixbufs for $icon-view
.
method get-pixbuf-column (--> Int )
Return value; the pixbuf column, or -1 if it’s unset..
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 list via drag-and-drop. See .set-reorderable()
.
method get-reorderable (--> Bool )
Return value; True
if the list can be reordered..
get-row-spacing
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the value of the row-spacing property.
method get-row-spacing (--> Int )
Return value; the space between rows.
get-selected-items
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Creates a list of paths of all selected items. Additionally, if you are planning on modifying the model after calling this function, you may want to convert the returned list into a list of GtkTreeRowReferences. To do this, you can use gtk_tree_row_reference_new().
To free the return value, use g_list_free_full:
method get-selected-items (--> N-List )
Return value; A Gnome::Glib::N-List containing a Gnome::Gtk4::N-TreePath for each selected row..
get-selection-mode
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Gets the selection mode of the $icon-view
.
method get-selection-mode (--> GtkSelectionMode )
Return value; the current selection mode.
get-spacing
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the value of the spacing property.
method get-spacing (--> Int )
Return value; the space between cells.
get-text-column
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the column with text for $icon-view
.
method get-text-column (--> Int )
Return value; the text column, or -1 if it’s unset..
get-tooltip-column
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns the column of $icon-view
’s model which is being used for displaying tooltips on $icon-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 Gnome::Gtk4::Widget::query-tooltip` signal handler for Gnome::Gtk4::IconView. 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 an icon view item at the given coordinates (True
) or not (False
) for mouse tooltips. For keyboard tooltips the item returned will be the cursor item. 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.
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 an item.
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.
Both 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
.
item-activated
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Activates the item determined by $path
.
method item-activated ( N-Object $path )
$path; The Gnome::Gtk4::N-TreePath to be activated
path-is-selected
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns True
if the icon pointed to by $path
is currently selected. If $path
does not point to a valid location, False
is returned.
method path-is-selected ( N-Object $path --> Bool )
$path; A Gnome::Gtk4::N-TreePath to check selection on.
Return value; True
if $path
is selected..
scroll-to-path
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Moves the alignments of $icon-view
to the position specified by $path
. $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 item onto the screen. This means that the item will be scrolled to the edge closest to its current position. If the item 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 $icon-view
is realized, the centered path will be modified to reflect this change.
method scroll-to-path ( N-Object $path, Bool() $use-align, Num() $row-align, Num() $col-align )
$path; The path of the item to move to.
$use-align; whether to use alignment arguments, or
False
..$row-align; The vertical alignment of the item specified by
$path
..$col-align; The horizontal alignment of the item specified by
$path
..
select-all
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Selects all the icons. $icon-view
must has its selection mode set to GTK_SELECTION_MULTIPLE
.
method select-all ( )
select-path
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Selects the row at $path
.
method select-path ( N-Object $path )
$path; The Gnome::Gtk4::N-TreePath to be selected.
selected-foreach
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Calls a function for each selected icon. Note that the model or selection cannot be modified from within this function.
method selected-foreach ( &func, gpointer $data )
&func; The function to call for each selected icon.. Tthe function must be specified with following signature;
:( N-Object $icon-view, N-Object $path, gpointer $data )
.$data; User data to pass to the function..
set-activate-on-single-click
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Causes the Gnome::Gtk4::IconView::item-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 item-activated on a single click.
set-column-spacing
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the column-spacing property which specifies the space which is inserted between the columns of the icon view.
method set-column-spacing ( Int() $column-spacing )
$column-spacing; the column spacing.
set-columns
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the columns property which determines in how many columns the icons are arranged. If $columns
is -1, the number of columns will be chosen automatically to fill the available area.
method set-columns ( Int() $columns )
$columns; the number of columns.
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 item. If $cell
is defined, then focus is given to the cell specified by it. Additionally, if $start-editing
is True
, then editing should be started in the specified cell.
This function is often followed by gtk_widget_grab_focus (icon_view)` in order to give keyboard focus to the widget. Please note that editing can only happen when the widget is realized.
method set-cursor ( N-Object $path, N-Object() $cell, Bool() $start-editing )
$path; A Gnome::Gtk4::N-TreePath
$cell; One of the cell renderers of
$icon-view
.$start-editing;
True
if the specified cell should start being edited..
set-drag-dest-item
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the item that is highlighted for feedback.
method set-drag-dest-item ( N-Object $path, GtkIconViewDropPosition $pos )
$path; The path of the item to highlight
$pos; Specifies where to drop, relative to the item.
set-item-orientation
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the item-orientation property which determines whether the labels are drawn beside the icons instead of below.
method set-item-orientation ( GtkOrientation $orientation )
$orientation; the relative position of texts and icons.
set-item-padding
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the Gnome::Gtk4::IconView:item-padding property which specifies the padding around each of the icon view’s items.
method set-item-padding ( Int() $item-padding )
$item-padding; the item padding.
set-item-width
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the item-width property which specifies the width to use for each item. If it is set to -1, the icon view will automatically determine a suitable item size.
method set-item-width ( Int() $item-width )
$item-width; the width for each item.
set-margin
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the margin property which specifies the space which is inserted at the top, bottom, left and right of the icon view.
method set-margin ( Int() $margin )
$margin; the margin.
set-markup-column
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the column with markup information for $icon-view
to be $column
. The markup column must be of type G_TYPE_STRING. If the markup column is set to something, it overrides the text column set by .set-text-column()
.
method set-markup-column ( Int() $column )
$column; A column in the currently used model, or -1 to display no text.
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::IconView. If the $icon-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-pixbuf-column
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the column with pixbufs for $icon-view
to be $column
. The pixbuf column must be of type GDK_TYPE_PIXBUF
method set-pixbuf-column ( Int() $column )
$column; A column in the currently used model, or -1 to disable.
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 row_inserted and row_deleted signals. The reordering is implemented by setting up the icon 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 list of items can be reordered..
set-row-spacing
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the row-spacing property which specifies the space which is inserted between the rows of the icon view.
method set-row-spacing ( Int() $row-spacing )
$row-spacing; the row spacing.
set-selection-mode
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the selection mode of the $icon-view
.
method set-selection-mode ( GtkSelectionMode $mode )
$mode; The selection mode.
set-spacing
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the spacing property which specifies the space which is inserted between the cells (i.e. the icon and the text) of an item.
method set-spacing ( Int() $spacing )
$spacing; the spacing.
set-text-column
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the column with text for $icon-view
to be $column
. The text column must be of type G_TYPE_STRING.
method set-text-column ( Int() $column )
$column; A column in the currently used model, or -1 to display no text.
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 which $cell
occupies in the item pointed to by $path
. See also gtk_tooltip_set_tip_area().
See also .set-tooltip-column()
for a simpler alternative.
method set-tooltip-cell ( N-Object() $tooltip, N-Object $path, N-Object() $cell )
$tooltip; a Gnome::Gtk4::Tooltip.
$path; a Gnome::Gtk4::N-TreePath
$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 items, you can use this function to have Gnome::Gtk4::IconView handle these automatically for you. $column
should be set to the column in $icon-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 $icon-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
$icon-view
’s model.
set-tooltip-item
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 item at $path
. See also .set-tooltip-column()
for a simpler alternative. See also gtk_tooltip_set_tip_area().
method set-tooltip-item ( N-Object() $tooltip, N-Object $path )
$tooltip; a Gnome::Gtk4::Tooltip.
$path; a Gnome::Gtk4::N-TreePath
unselect-all
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Unselects all the icons.
method unselect-all ( )
unselect-path
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Unselects the row at $path
.
method unselect-path ( N-Object $path )
$path; The Gnome::Gtk4::N-TreePath to be unselected.
unset-model-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::IconView:reorderable to False
.
method unset-model-drag-dest ( )
unset-model-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::IconView:reorderable to False
.
method unset-model-drag-source ( )
Signals
activate-cursor-item
A [keybinding signal]Gnome::Gtk4::SignalAction which gets emitted when the user activates the currently focused item.
Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control activation programmatically.
The default bindings for this signal are Space, Return and Enter.
method handler ( Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::IconView :$_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::IconView 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;
item-activated
The item-activated signal is emitted when the method .item-activated()
is called, when the user double clicks an item with the "activate-on-single-click" property set to False
, or when the user single clicks an item when the "activate-on-single-click" property set to True
. It is also emitted when a non-editable item is selected and one of the keys: Space, Return or Enter is pressed.
method handler ( N-Object $path, Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::IconView :$_widget, *C<user>-options )
$path; the Gnome::Gtk4::N-TreePath for the activated item.
$_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::IconView 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.
move-cursor
The move-cursor signal is a [keybinding signal]Gnome::Gtk4::SignalAction which gets emitted when the user initiates a cursor movement.
Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control the cursor programmatically.
The default bindings for this signal include
Arrow keys which move by individual steps
Home/End keys which move to the first/last item
PageUp/PageDown which move by "pages" All of these will extend the selection when combined with the Shift modifier.
method handler ( $step, gint $count, gboolean $extend, gboolean $modify, Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::IconView :$_widget, *C<user>-options --> gboolean )
$step; the granularity of the move, as a
enumeration GtkMovementStep defined in Gnome::Gtk4::T-enums
.$count; the number of
$step
units to move.$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::IconView 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-all
A [keybinding signal]Gnome::Gtk4::SignalAction which gets emitted when the user selects all items.
Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control selection programmatically.
The default binding for this signal is Ctrl-a.
method handler ( Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::IconView :$_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::IconView 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-cursor-item
A [keybinding signal]Gnome::Gtk4::SignalAction which gets emitted when the user selects the item that is currently focused.
Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control selection programmatically.
There is no default binding for this signal.
method handler ( Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::IconView :$_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::IconView 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.
selection-changed
The selection-changed signal is emitted when the selection (i.e. the set of selected items) changes.
method handler ( Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::IconView :$_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::IconView 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.
toggle-cursor-item
A [keybinding signal]Gnome::Gtk4::SignalAction which gets emitted when the user toggles whether the currently focused item is selected or not. The exact effect of this depend on the selection mode.
Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control selection programmatically.
There is no default binding for this signal is Ctrl-Space.
method handler ( Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::IconView :$_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::IconView 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.
unselect-all
A [keybinding signal]Gnome::Gtk4::SignalAction which gets emitted when the user unselects all items.
Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control selection programmatically.
The default binding for this signal is Ctrl-Shift-a.
method handler ( Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::IconView :$_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::IconView 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.