Class
GtkIconView
deprecated: 4.10
Description [src]
final class Gtk.IconView : Gtk.Widget
implements Gtk.Accessible, Gtk.Buildable, Gtk.CellLayout, Gtk.ConstraintTarget, Gtk.Scrollable {
/* No available fields */
}
GtkIconView
is a widget which displays data in a grid of icons.
GtkIconView
provides an alternative view on a GtkTreeModel
.
It displays the model as a grid of icons with labels. Like
GtkTreeView
, it allows to select one or multiple items
(depending on the selection mode, see gtk_icon_view_set_selection_mode()
).
In addition to selection with the arrow keys, GtkIconView
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),
GtkIconView
will only display the first level of the tree and
ignore the tree’s branches.
CSS nodes
iconview.view
╰── [rubberband]
GtkIconView
has a single CSS node with name iconview and style class .view.
For rubberband selection, a subnode with name rubberband is used.
Deprecated since: 4.10
Use GtkGridView
instead.
Constructors
gtk_icon_view_new_with_area
Creates a new GtkIconView
widget using the
specified area
to layout cells inside the icons.
deprecated: 4.10
gtk_icon_view_new_with_model
Creates a new GtkIconView
widget with the model model
.
deprecated: 4.10
Instance methods
gtk_icon_view_create_drag_icon
Creates a GdkPaintable
representation of the item at path
.
This image is used for a drag icon.
deprecated: 4.10
gtk_icon_view_enable_model_drag_dest
Turns icon_view
into a drop destination for automatic DND. Calling this
method sets GtkIconView
:reorderable to FALSE
.
deprecated: 4.10
gtk_icon_view_enable_model_drag_source
Turns icon_view
into a drag source for automatic DND. Calling this
method sets GtkIconView
:reorderable to FALSE
.
deprecated: 4.10
gtk_icon_view_get_activate_on_single_click
Gets the setting set by gtk_icon_view_set_activate_on_single_click().
deprecated: 4.10
gtk_icon_view_get_cell_rect
Fills the bounding rectangle in widget coordinates for the cell specified by
path
and cell
. If cell
is NULL
the main cell area is used.
deprecated: 4.10
gtk_icon_view_get_column_spacing
Returns the value of the ::column-spacing property.
deprecated: 4.10
gtk_icon_view_get_cursor
Fills in path
and cell
with the current cursor path and cell.
If the cursor isn’t currently set, then path
will be NULL
.
If no cell currently has focus, then cell
will be NULL
.
deprecated: 4.10
gtk_icon_view_get_dest_item_at_pos
Determines the destination item for a given position.
deprecated: 4.10
gtk_icon_view_get_drag_dest_item
Gets information about the item that is highlighted for feedback.
deprecated: 4.10
gtk_icon_view_get_item_at_pos
Gets the path and cell for the icon at the given position.
deprecated: 4.10
gtk_icon_view_get_item_column
Gets the column in which the item path
is currently
displayed. Column numbers start at 0.
deprecated: 4.10
gtk_icon_view_get_item_orientation
Returns the value of the ::item-orientation property which determines whether the labels are drawn beside the icons instead of below.
deprecated: 4.10
gtk_icon_view_get_item_row
Gets the row in which the item path
is currently
displayed. Row numbers start at 0.
deprecated: 4.10
gtk_icon_view_get_model
Returns the model the GtkIconView
is based on. Returns NULL
if the
model is unset.
deprecated: 4.10
gtk_icon_view_get_reorderable
Retrieves whether the user can reorder the list via drag-and-drop. See gtk_icon_view_set_reorderable().
deprecated: 4.10
gtk_icon_view_get_selected_items
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().
deprecated: 4.10
gtk_icon_view_get_tooltip_column
Returns the column of icon_view
’s model which is being used for
displaying tooltips on icon_view
’s rows.
deprecated: 4.10
gtk_icon_view_get_tooltip_context
This function is supposed to be used in a GtkWidget::query-tooltip
signal handler for GtkIconView
. The x
, y
and keyboard_tip
values
which are received in the signal handler, should be passed to this
function without modification.
deprecated: 4.10
gtk_icon_view_get_visible_range
Sets start_path
and end_path
to be the first and last visible path.
Note that there may be invisible paths in between.
deprecated: 4.10
gtk_icon_view_path_is_selected
Returns TRUE
if the icon pointed to by path
is currently
selected. If path
does not point to a valid location, FALSE
is returned.
deprecated: 4.10
gtk_icon_view_scroll_to_path
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.
deprecated: 4.10
gtk_icon_view_select_all
Selects all the icons. icon_view
must has its selection mode set
to GTK_SELECTION_MULTIPLE
.
deprecated: 4.10
gtk_icon_view_selected_foreach
Calls a function for each selected icon. Note that the model or selection cannot be modified from within this function.
deprecated: 4.10
gtk_icon_view_set_activate_on_single_click
Causes the GtkIconView
::item-activated signal to be emitted on
a single click instead of a double click.
deprecated: 4.10
gtk_icon_view_set_column_spacing
Sets the ::column-spacing property which specifies the space which is inserted between the columns of the icon view.
deprecated: 4.10
gtk_icon_view_set_columns
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.
deprecated: 4.10
gtk_icon_view_set_cursor
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 not NULL
, 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.
deprecated: 4.10
gtk_icon_view_set_item_orientation
Sets the ::item-orientation property which determines whether the labels are drawn beside the icons instead of below.
deprecated: 4.10
gtk_icon_view_set_item_padding
Sets the GtkIconView
:item-padding property which specifies the padding
around each of the icon view’s items.
deprecated: 4.10
gtk_icon_view_set_item_width
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.
deprecated: 4.10
gtk_icon_view_set_margin
Sets the ::margin property which specifies the space which is inserted at the top, bottom, left and right of the icon view.
deprecated: 4.10
gtk_icon_view_set_markup_column
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 gtk_icon_view_set_text_column().
deprecated: 4.10
gtk_icon_view_set_model
Sets the model for a GtkIconView
.
If the icon_view
already has a model set, it will remove
it before setting the new model. If model
is NULL
, then
it will unset the old model.
deprecated: 4.10
gtk_icon_view_set_pixbuf_column
Sets the column with pixbufs for icon_view
to be column
. The pixbuf
column must be of type GDK_TYPE_PIXBUF
.
deprecated: 4.10
gtk_icon_view_set_reorderable
This function is a convenience function to allow you to reorder models that
support the GtkTreeDragSourceIface
and the GtkTreeDragDestIface
. Both
GtkTreeStore
and GtkListStore
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.
deprecated: 4.10
gtk_icon_view_set_row_spacing
Sets the ::row-spacing property which specifies the space which is inserted between the rows of the icon view.
deprecated: 4.10
gtk_icon_view_set_spacing
Sets the ::spacing property which specifies the space which is inserted between the cells (i.e. the icon and the text) of an item.
deprecated: 4.10
gtk_icon_view_set_text_column
Sets the column with text for icon_view
to be column
. The text
column must be of type G_TYPE_STRING
.
deprecated: 4.10
gtk_icon_view_set_tooltip_cell
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().
deprecated: 4.10
gtk_icon_view_set_tooltip_column
If you only plan to have simple (text-only) tooltips on full items, you
can use this function to have GtkIconView
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.
deprecated: 4.10
gtk_icon_view_set_tooltip_item
Sets the tip area of tooltip
to be the area covered by the item at path
.
See also gtk_icon_view_set_tooltip_column()
for a simpler alternative.
See also gtk_tooltip_set_tip_area().
deprecated: 4.10
gtk_icon_view_unset_model_drag_dest
Undoes the effect of gtk_icon_view_enable_model_drag_dest(). Calling this
method sets GtkIconView
:reorderable to FALSE
.
deprecated: 4.10
gtk_icon_view_unset_model_drag_source
Undoes the effect of gtk_icon_view_enable_model_drag_source(). Calling this
method sets GtkIconView
:reorderable to FALSE
.
deprecated: 4.10
Methods inherited from GtkAccessible (19)
gtk_accessible_announce
Requests the user’s screen reader to announce the given message.
since: 4.14
gtk_accessible_get_accessible_parent
Retrieves the accessible parent for an accessible object.
since: 4.10
gtk_accessible_get_accessible_role
Retrieves the accessible role of an accessible object.
gtk_accessible_get_at_context
Retrieves the accessible implementation for the given GtkAccessible
.
since: 4.10
gtk_accessible_get_bounds
Queries the coordinates and dimensions of this accessible.
since: 4.10
gtk_accessible_get_first_accessible_child
Retrieves the first accessible child of an accessible object.
since: 4.10
gtk_accessible_get_next_accessible_sibling
Retrieves the next accessible sibling of an accessible object.
since: 4.10
gtk_accessible_get_platform_state
Query a platform state, such as focus.
since: 4.10
gtk_accessible_reset_property
Resets the accessible property
to its default value.
gtk_accessible_reset_relation
Resets the accessible relation
to its default value.
gtk_accessible_reset_state
Resets the accessible state
to its default value.
gtk_accessible_set_accessible_parent
Sets the parent and sibling of an accessible object.
since: 4.10
gtk_accessible_update_next_accessible_sibling
Updates the next accessible sibling of self
.
since: 4.10
gtk_accessible_update_property
Updates a list of accessible properties.
gtk_accessible_update_property_value
Updates an array of accessible properties.
gtk_accessible_update_relation
Updates a list of accessible relations.
gtk_accessible_update_relation_value
Updates an array of accessible relations.
gtk_accessible_update_state
Updates a list of accessible states. See the GtkAccessibleState
documentation for the value types of accessible states.
gtk_accessible_update_state_value
Updates an array of accessible states.
Methods inherited from GtkBuildable (1)
Methods inherited from GtkCellLayout (10)
gtk_cell_layout_add_attribute
Adds an attribute mapping to the list in cell_layout
.
deprecated: 4.10
gtk_cell_layout_clear
Unsets all the mappings on all renderers on cell_layout
and
removes all renderers from cell_layout
.
deprecated: 4.10
gtk_cell_layout_clear_attributes
Clears all existing attributes previously set with gtk_cell_layout_set_attributes().
deprecated: 4.10
gtk_cell_layout_get_area
Returns the underlying GtkCellArea
which might be cell_layout
if called on a GtkCellArea
or might be NULL
if no GtkCellArea
is used by cell_layout
.
deprecated: 4.10
gtk_cell_layout_get_cells
Returns the cell renderers which have been added to cell_layout
.
deprecated: 4.10
gtk_cell_layout_pack_end
Adds the cell
to the end of cell_layout
. If expand
is FALSE
, then the
cell
is allocated no more space than it needs. Any unused space is
divided evenly between cells for which expand
is TRUE
.
deprecated: 4.10
gtk_cell_layout_pack_start
Packs the cell
into the beginning of cell_layout
. If expand
is FALSE
,
then the cell
is allocated no more space than it needs. Any unused space
is divided evenly between cells for which expand
is TRUE
.
deprecated: 4.10
gtk_cell_layout_reorder
Re-inserts cell
at position
.
deprecated: 4.10
gtk_cell_layout_set_attributes
Sets the attributes in the parameter list as the attributes
of cell_layout
.
deprecated: 4.10
gtk_cell_layout_set_cell_data_func
Sets the GtkCellLayout
DataFunc to use for cell_layout
.
deprecated: 4.10
Methods inherited from GtkScrollable (9)
gtk_scrollable_get_border
Returns the size of a non-scrolling border around the outside of the scrollable.
gtk_scrollable_get_hadjustment
Retrieves the GtkAdjustment
used for horizontal scrolling.
gtk_scrollable_get_hscroll_policy
Gets the horizontal GtkScrollablePolicy
.
gtk_scrollable_get_vadjustment
Retrieves the GtkAdjustment
used for vertical scrolling.
gtk_scrollable_get_vscroll_policy
Gets the vertical GtkScrollablePolicy
.
gtk_scrollable_set_hadjustment
Sets the horizontal adjustment of the GtkScrollable
.
gtk_scrollable_set_hscroll_policy
Sets the GtkScrollablePolicy
.
gtk_scrollable_set_vadjustment
Sets the vertical adjustment of the GtkScrollable
.
gtk_scrollable_set_vscroll_policy
Sets the GtkScrollablePolicy
.
Properties
Gtk.IconView:activate-on-single-click
The activate-on-single-click property specifies whether the “item-activated” signal will be emitted after a single click.
Gtk.IconView:column-spacing
The column-spacing property specifies the space which is inserted between the columns of the icon view.
Gtk.IconView:columns
The columns property contains the number of the columns in which the items should be displayed. If it is -1, the number of columns will be chosen automatically to fill the available area.
Gtk.IconView:item-orientation
The item-orientation property specifies how the cells (i.e. the icon and the text) of the item are positioned relative to each other.
Gtk.IconView:item-padding
The item-padding property specifies the padding around each of the icon view’s item.
Gtk.IconView:item-width
The item-width property specifies the width to use for each item. If it is set to -1, the icon view will automatically determine a suitable item size.
Gtk.IconView:margin
The margin property specifies the space which is inserted at the edges of the icon view.
Gtk.IconView:markup-column
The ::markup-column property contains the number of the model column
containing markup information to be displayed. The markup column must be
of type G_TYPE_STRING
. If this property and the :text-column property
are both set to column numbers, it overrides the text column.
If both are set to -1, no texts are displayed.
Gtk.IconView:pixbuf-column
The ::pixbuf-column property contains the number of the model column
containing the pixbufs which are displayed. The pixbuf column must be
of type GDK_TYPE_PIXBUF
. Setting this property to -1 turns off the
display of pixbufs.
Gtk.IconView:row-spacing
The row-spacing property specifies the space which is inserted between the rows of the icon view.
Gtk.IconView:selection-mode
The ::selection-mode property specifies the selection mode of
icon view. If the mode is GTK_SELECTION_MULTIPLE
, rubberband selection
is enabled, for the other modes, only keyboard selection is possible.
Gtk.IconView:spacing
The spacing property specifies the space which is inserted between the cells (i.e. the icon and the text) of an item.
Gtk.IconView:text-column
The ::text-column property contains the number of the model column
containing the texts which are displayed. The text column must be
of type G_TYPE_STRING
. If this property and the :markup-column
property are both set to -1, no texts are displayed.
Gtk.IconView:tooltip-column
The column of the icon view model which is being used for displaying tooltips on it’s rows.
Properties inherited from GtkWidget (34)
Gtk.Widget:can-focus
Whether the widget or any of its descendents can accept the input focus.
Gtk.Widget:can-target
Whether the widget can receive pointer events.
Gtk.Widget:css-classes
A list of css classes applied to this widget.
Gtk.Widget:css-name
The name of this widget in the CSS tree.
Gtk.Widget:cursor
The cursor used by widget
.
Gtk.Widget:focus-on-click
Whether the widget should grab focus when it is clicked with the mouse.
Gtk.Widget:focusable
Whether this widget itself will accept the input focus.
Gtk.Widget:halign
How to distribute horizontal space if widget gets extra space.
Gtk.Widget:has-default
Whether the widget is the default widget.
Gtk.Widget:has-focus
Whether the widget has the input focus.
Gtk.Widget:has-tooltip
Enables or disables the emission of the GtkWidget::query-tooltip
signal on widget
.
Gtk.Widget:height-request
Overrides for height request of the widget.
Gtk.Widget:hexpand
Whether to expand horizontally.
Gtk.Widget:hexpand-set
Whether to use the hexpand
property.
Gtk.Widget:layout-manager
The GtkLayoutManager
instance to use to compute
the preferred size of the widget, and allocate its children.
Gtk.Widget:margin-bottom
Margin on bottom side of widget.
Gtk.Widget:margin-end
Margin on end of widget, horizontally.
Gtk.Widget:margin-start
Margin on start of widget, horizontally.
Gtk.Widget:margin-top
Margin on top side of widget.
Gtk.Widget:name
The name of the widget.
Gtk.Widget:opacity
The requested opacity of the widget.
Gtk.Widget:overflow
How content outside the widget’s content area is treated.
Gtk.Widget:parent
The parent widget of this widget.
Gtk.Widget:receives-default
Whether the widget will receive the default action when it is focused.
Gtk.Widget:root
The GtkRoot
widget of the widget tree containing this widget.
Gtk.Widget:scale-factor
The scale factor of the widget.
Gtk.Widget:sensitive
Whether the widget responds to input.
Gtk.Widget:tooltip-markup
Sets the text of tooltip to be the given string, which is marked up with Pango markup.
Gtk.Widget:tooltip-text
Sets the text of tooltip to be the given string.
Gtk.Widget:valign
How to distribute vertical space if widget gets extra space.
Gtk.Widget:vexpand
Whether to expand vertically.
Gtk.Widget:vexpand-set
Whether to use the vexpand
property.
Gtk.Widget:visible
Whether the widget is visible.
Gtk.Widget:width-request
Overrides for width request of the widget.
Properties inherited from GtkAccessible (1)
Properties inherited from GtkScrollable (4)
GtkScrollable:hadjustment
Horizontal GtkAdjustment
of the scrollable widget.
GtkScrollable:hscroll-policy
Determines when horizontal scrolling should start.
GtkScrollable:vadjustment
Vertical GtkAdjustment
of the scrollable widget.
GtkScrollable:vscroll-policy
Determines when vertical scrolling should start.
Signals
Gtk.IconView::activate-cursor-item
A keybinding signal which gets emitted when the user activates the currently focused item.
Gtk.IconView::item-activated
The ::item-activated signal is emitted when the method
gtk_icon_view_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.
Gtk.IconView::move-cursor
The ::move-cursor signal is a keybinding signal which gets emitted when the user initiates a cursor movement.
Gtk.IconView::select-cursor-item
A keybinding signal which gets emitted when the user selects the item that is currently focused.
Gtk.IconView::selection-changed
The ::selection-changed signal is emitted when the selection (i.e. the set of selected items) changes.
Gtk.IconView::toggle-cursor-item
A keybinding signal 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.
Gtk.IconView::unselect-all
A keybinding signal which gets emitted when the user unselects all items.
Signals inherited from GtkWidget (13)
GtkWidget::destroy
Signals that all holders of a reference to the widget should release the reference that they hold.
GtkWidget::direction-changed
Emitted when the text direction of a widget changes.
GtkWidget::hide
Emitted when widget
is hidden.
GtkWidget::keynav-failed
Emitted if keyboard navigation fails.
GtkWidget::map
Emitted when widget
is going to be mapped.
GtkWidget::mnemonic-activate
Emitted when a widget is activated via a mnemonic.
GtkWidget::move-focus
Emitted when the focus is moved.
GtkWidget::query-tooltip
Emitted when the widget’s tooltip is about to be shown.
GtkWidget::realize
Emitted when widget
is associated with a GdkSurface
.
GtkWidget::show
Emitted when widget
is shown.
GtkWidget::state-flags-changed
Emitted when the widget state changes.
GtkWidget::unmap
Emitted when widget
is going to be unmapped.
GtkWidget::unrealize
Emitted when the GdkSurface
associated with widget
is destroyed.
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.