W Wrapl, The Programming Language

Libraries:Gtk:Gtk:IconView

Types

T

Inherits from:

T provides an alternative view on a list model. It displays the model as a grid of icons with labels. Like Gtk.Gtk.TreeView.T, it allows to select one or multiple items (depending on the selection mode, see SetSelectionMode). In addition to selection with the arrow keys, T supports rubberband selection, which is controlled by dragging the pointer.



Constants

Nil : T

Functions

GetType() : Gtk.GObject.Type.T



New() : Gtk.Gtk.IconView.T

Creates a new T widget

Returns A newly created T widget


NewWithModel(model @ Gtk.Gtk.TreeModel.T) : Gtk.Gtk.IconView.T

Creates a new T widget with the model model.

model The model.
Returns A newly created T widget.


Methods

:ConvertWidgetToBinWindowCoords(self @ T, wx @ Std.Integer.SmallT, wy @ Std.Integer.SmallT, bx, by) : Std.Object.T

Converts widget coordinates to coordinates for the bin_window, as expected by e.g. GetPathAtPos.

icon_view a T
wx X coordinate relative to the widget
wy Y coordinate relative to the widget
bx return location for bin_window X coordinate. [out]
by return location for bin_window Y coordinate. [out]


:CreateDragIcon(self @ T, path @ Gtk.Gtk.TreePath.T) : Gtk.Gdk.Pixmap.T

Creates a Gtk.Gdk.Pixmap.T representation of the item at path. This image is used for a drag icon.

icon_view a T
path a Gtk.Gtk.TreePath.T in icon_view
Returns a newly-allocated pixmap of the drag icon. [transfer full]


:EnableModelDragDest(self @ T, targets @ Gtk.Gtk.TargetEntry.T, n_targets @ Std.Integer.SmallT, actions @ Std.Integer.SmallT) : Std.Object.T

Turns icon_view into a drop destination for automatic DND. Calling this method sets "reorderable" to FALSE.

icon_view a T
targets the table of targets that the drag will support
n_targets the number of items in targets
actions the bitmask of possible actions for a drag to this widget


:EnableModelDragSource(self @ T, start_button_mask @ Std.Integer.SmallT, targets @ Gtk.Gtk.TargetEntry.T, n_targets @ Std.Integer.SmallT, actions @ Std.Integer.SmallT) : Std.Object.T

Turns icon_view into a drag source for automatic DND. Calling this method sets "reorderable" to FALSE.

icon_view a GtkIconTreeView
start_button_mask Mask of allowed buttons to start drag
targets the table of targets that the drag will support
n_targets the number of items in targets
actions the bitmask of possible actions for a drag from this widget


:GetColumnSpacing(self @ T) : Std.Integer.SmallT

Returns the value of the ::column-spacing property.

icon_view a T
Returns the space between columns


:GetColumns(self @ T) : Std.Integer.SmallT

Returns the value of the ::columns property.

icon_view a T
Returns the number of columns, or -1


:GetCursor(self @ T, path @ Std.Object.T, cell @ Std.Object.T) : Std.Symbol.T

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.

The returned Gtk.Gtk.TreePath.T must be freed with Gtk.Gtk.TreePath.Free.

icon_view A T
path Return location for the current cursor path, or NULL. [allow-none]
cell Return location the current focus cell, or NULL. [allow-none]
Returns TRUE if the cursor is set.


:GetDestItemAtPos(self @ T, drag_x @ Std.Integer.SmallT, drag_y @ Std.Integer.SmallT, path @ Std.Object.T, pos @ Std.Object.T) : Std.Symbol.T

Determines the destination item for a given position.

icon_view a T
drag_x the position to determine the destination item for
drag_y the position to determine the destination item for
path Return location for the path of the item, or NULL. [allow-none]
pos Return location for the drop position, or NULL. [allow-none]
Returns whether there is an item at the given position.


:GetDragDestItem(self @ T, path @ Std.Object.T, pos @ Std.Object.T) : Std.Object.T

Gets information about the item that is highlighted for feedback.

icon_view a T
path Return location for the path of the highlighted item, or NULL. [allow-none]
pos Return location for the drop position, or NULL. [allow-none]


:GetItemAtPos(self @ T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, path @ Std.Object.T, cell @ Std.Object.T) : Std.Symbol.T

Finds the path at the point (x, y), relative to bin_window coordinates. In contrast to GetPathAtPos, this function also obtains the cell at the specified position. The returned path should be freed with Gtk.Gtk.TreePath.Free. See ConvertWidgetToBinWindowCoords for converting widget coordinates to bin_window coordinates.

icon_view A T.
x The x position to be identified
y The y position to be identified
path Return location for the path, or NULL. [allow-none]
cell Return location for the renderer responsible for the cell at (x, y), or NULL
Returns TRUE if an item exists at the specified position


:GetItemColumn(self @ T, path @ Gtk.Gtk.TreePath.T) : Std.Integer.SmallT

Gets the column in which the item path is currently displayed. Column numbers start at 0.

icon_view a T
path the Gtk.Gtk.TreePath.T of the item
Returns The column in which the item is displayed


:GetItemOrientation(self @ T) : Gtk.Gtk.Orientation.T

Returns the value of the ::item-orientation property which determines whether the labels are drawn beside the icons instead of below.

icon_view a T
Returns the relative position of texts and icons


:GetItemPadding(self @ T) : Std.Integer.SmallT

Returns the value of the ::item-padding property.

icon_view a T
Returns the padding around items


:GetItemRow(self @ T, path @ Gtk.Gtk.TreePath.T) : Std.Integer.SmallT

Gets the row in which the item path is currently displayed. Row numbers start at 0.

icon_view a T
path the Gtk.Gtk.TreePath.T of the item
Returns The row in which the item is displayed


:GetItemWidth(self @ T) : Std.Integer.SmallT

Returns the value of the ::item-width property.

icon_view a T
Returns the width of a single item, or -1


:GetMargin(self @ T) : Std.Integer.SmallT

Returns the value of the ::margin property.

icon_view a T
Returns the space at the borders


:GetMarkupColumn(self @ T) : Std.Integer.SmallT

Returns the column with markup text for icon_view.

icon_view A T.
Returns the markup column, or -1 if it's unset.


:GetModel(self @ T) : Gtk.Gtk.TreeModel.T

Returns the model the T is based on. Returns NULL if the model is unset.

icon_view a T
Returns A Gtk.Gtk.TreeModel.T, or NULL if none is currently being used. [transfer none]


:GetOrientation(self @ T) : Gtk.Gtk.Orientation.T

Warning

GetOrientation has been deprecated since version 2.22 and should not be used in newly-written code. Use GetItemOrientation



:GetPathAtPos(self @ T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT) : Gtk.Gtk.TreePath.T

Finds the path at the point (x, y), relative to bin_window coordinates. See GetItemAtPos, if you are also interested in the cell at the specified position. See ConvertWidgetToBinWindowCoords for converting widget coordinates to bin_window coordinates.

icon_view A T.
x The x position to be identified
y The y position to be identified
Returns The Gtk.Gtk.TreePath.T corresponding to the icon or NULL if no icon exists at that position.


:GetPixbufColumn(self @ T) : Std.Integer.SmallT

Returns the column with pixbufs for icon_view.

icon_view A T.
Returns the pixbuf column, or -1 if it's unset.


:GetReorderable(self @ T) : Std.Symbol.T

Retrieves whether the user can reorder the list via drag-and-drop. See SetReorderable.

icon_view a T
Returns TRUE if the list can be reordered.


:GetRowSpacing(self @ T) : Std.Integer.SmallT

Returns the value of the ::row-spacing property.

icon_view a T
Returns the space between rows


:GetSelectedItems(self @ T) : Std.Object.T

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 Gtk.Gtk.TreeRowReference.Ts. To do this, you can use gtk_tree_row_reference_new().

To free the return value, use:

1
2
g_list_foreach (list, (GFunc)gtk_tree_path_free, NULL);
g_list_free (list);


:GetSelectionMode(self @ T) : Gtk.Gtk.SelectionMode.T

Gets the selection mode of the icon_view.

icon_view A T.
Returns the current selection mode


:GetSpacing(self @ T) : Std.Integer.SmallT

Returns the value of the ::spacing property.

icon_view a T
Returns the space between cells


:GetTextColumn(self @ T) : Std.Integer.SmallT

Returns the column with text for icon_view.

icon_view A T.
Returns the text column, or -1 if it's unset.


:GetTooltipColumn(self @ T) : Std.Integer.SmallT

Returns the column of icon_view's model which is being used for displaying tooltips on icon_view's rows.

icon_view a T
Returns the index of the tooltip column that is currently being used, or -1 if this is disabled.


:GetTooltipContext(self @ T, x @ Std.Object.T, y @ Std.Object.T, keyboard_tip @ Std.Symbol.T, model @ Std.Object.T, path @ Std.Object.T, iter @ Gtk.Gtk.TreeIter.T) : Std.Symbol.T

This function is supposed to be used in a "query-tooltip" signal handler for T. 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. x and y will always be converted to be relative to icon_view's bin_window if keyboard_tooltip is FALSE.

icon_view an T
x the x coordinate (relative to widget coordinates). [inout]
y the y coordinate (relative to widget coordinates). [inout]
keyboard_tip whether this is a keyboard tooltip or not
model a pointer to receive a Gtk.Gtk.TreeModel.T or NULL. [out][allow-none]
path a pointer to receive a Gtk.Gtk.TreePath.T or NULL. [out][allow-none]
iter a pointer to receive a Gtk.Gtk.TreeIter.T or NULL. [out][allow-none]
Returns whether or not the given tooltip context points to a item


:GetVisibleRange(self @ T, start_path @ Std.Object.T, end_path @ Std.Object.T) : Std.Symbol.T

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.Gtk.TreePath.Free after use.

icon_view A T
start_path Return location for start of region, or NULL. [allow-none]
end_path Return location for end of region, or NULL. [allow-none]
Returns TRUE, if valid paths were placed in start_path and end_path


:ItemActivated(self @ T, path @ Gtk.Gtk.TreePath.T) : Std.Object.T

Activates the item determined by path.

icon_view A T
path The Gtk.Gtk.TreePath.T to be activated


:PathIsSelected(self @ T, path @ Gtk.Gtk.TreePath.T) : Std.Symbol.T

Returns TRUE if the icon pointed to by path is currently selected. If path does not point to a valid location, FALSE is returned.

icon_view A T.
path A Gtk.Gtk.TreePath.T to check selection on.
Returns TRUE if path is selected.


:ScrollToPath(self @ T, path @ Gtk.Gtk.TreePath.T, use_align @ Std.Symbol.T, row_align @ Std.Real.T, col_align @ Std.Real.T) : Std.Object.T

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.

icon_view A T.
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.


:SelectAll(self @ T) : Std.Object.T

Selects all the icons. icon_view must has its selection mode set to Gtk.Gtk.SelectionMode.Multiple.

icon_view A T.


:SelectPath(self @ T, path @ Gtk.Gtk.TreePath.T) : Std.Object.T

Selects the row at path.

icon_view A T.
path The Gtk.Gtk.TreePath.T to be selected.


:SelectedForeach(self @ T, func @ Std.Function.T, data @ Std.Address.T) : Std.Object.T

Calls a function for each selected icon. Note that the model or selection cannot be modified from within this function.

icon_view A T.
func The function to call for each selected icon. [scope call]
data User data to pass to the function.


:SetColumnSpacing(self @ T, column_spacing @ Std.Integer.SmallT) : Std.Object.T

Sets the ::column-spacing property which specifies the space which is inserted between the columns of the icon view.

icon_view a T
column_spacing the column spacing


:SetColumns(self @ T, columns @ Std.Integer.SmallT) : Std.Object.T

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.

icon_view a T
columns the number of columns


:SetCursor(self @ T, path @ Gtk.Gtk.TreePath.T, cell @ Gtk.Gtk.CellRenderer.T, start_editing @ Std.Symbol.T) : Std.Object.T

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.

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.

icon_view A T
path A Gtk.Gtk.TreePath.T
cell One of the cell renderers of icon_view, or NULL. [allow-none]
start_editing TRUE if the specified cell should start being edited.


:SetDragDestItem(self @ T, path @ Gtk.Gtk.TreePath.T, pos @ Gtk.Gtk.IconViewDropPosition.T) : Std.Object.T

Sets the item that is highlighted for feedback.

icon_view a T
path The path of the item to highlight, or NULL. [allow-none]
pos Specifies where to drop, relative to the item


:SetItemOrientation(self @ T, orientation @ Gtk.Gtk.Orientation.T) : Std.Object.T

Sets the ::item-orientation property which determines whether the labels are drawn beside the icons instead of below.

icon_view a T
orientation the relative position of texts and icons


:SetItemPadding(self @ T, item_padding @ Std.Integer.SmallT) : Std.Object.T

Sets the "item-padding" property which specifies the padding around each of the icon view's items.

icon_view a T
item_padding the item padding


:SetItemWidth(self @ T, item_width @ Std.Integer.SmallT) : Std.Object.T

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.

icon_view a T
item_width the width for each item


:SetMargin(self @ T, margin @ Std.Integer.SmallT) : Std.Object.T

Sets the ::margin property which specifies the space which is inserted at the top, bottom, left and right of the icon view.

icon_view a T
margin the margin


:SetMarkupColumn(self @ T, column @ Std.Integer.SmallT) : Std.Object.T

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 SetTextColumn.

icon_view A T.
column A column in the currently used model, or -1 to display no text


:SetModel(self @ T, model @ Gtk.Gtk.TreeModel.T) : Std.Object.T

Sets the model for a T. 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.

icon_view A T.
model The model. [allow-none]


:SetOrientation(self @ T, orientation @ Gtk.Gtk.Orientation.T) : Std.Object.T

Warning

SetOrientation has been deprecated since version 2.22 and should not be used in newly-written code. Use SetItemOrientation



:SetPixbufColumn(self @ T, column @ Std.Integer.SmallT) : Std.Object.T

Sets the column with pixbufs for icon_view to be column. The pixbuf column must be of type GDK_TYPE_PIXBUF

icon_view A T.
column A column in the currently used model, or -1 to disable


:SetReorderable(self @ T, reorderable @ Std.Symbol.T) : Std.Object.T

This function is a convenience function to allow you to reorder models that support the GtkTreeDragSourceIface and the GtkTreeDragDestIface. Both Gtk.Gtk.TreeStore.T and Gtk.Gtk.ListStore.T 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.

icon_view A T.
reorderable TRUE, if the list of items can be reordered.


:SetRowSpacing(self @ T, row_spacing @ Std.Integer.SmallT) : Std.Object.T

Sets the ::row-spacing property which specifies the space which is inserted between the rows of the icon view.

icon_view a T
row_spacing the row spacing


:SetSelectionMode(self @ T, mode @ Gtk.Gtk.SelectionMode.T) : Std.Object.T

Sets the selection mode of the icon_view.

icon_view A T.
mode The selection mode


:SetSpacing(self @ T, spacing @ Std.Integer.SmallT) : Std.Object.T

Sets the ::spacing property which specifies the space which is inserted between the cells (i.e. the icon and the text) of an item.

icon_view a T
spacing the spacing


:SetTextColumn(self @ T, column @ Std.Integer.SmallT) : Std.Object.T

Sets the column with text for icon_view to be column. The text column must be of type G_TYPE_STRING.

icon_view A T.
column A column in the currently used model, or -1 to display no text


:SetTooltipCell(self @ T, tooltip @ Gtk.Gtk.Tooltip.T, path @ Gtk.Gtk.TreePath.T, cell @ Gtk.Gtk.CellRenderer.T) : Std.Object.T

Sets the tip area of tooltip to the area which cell occupies in the item pointed to by path. See also Gtk.Gtk.Tooltip.SetTipArea.

See also SetTooltipColumn for a simpler alternative.

icon_view a T
tooltip a Gtk.Gtk.Tooltip.T
path a Gtk.Gtk.TreePath.T
cell a Gtk.Gtk.CellRenderer.T or NULL. [allow-none]


:SetTooltipColumn(self @ T, column @ Std.Integer.SmallT) : Std.Object.T

If you only plan to have simple (text-only) tooltips on full items, you can use this function to have T 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, "has-tooltip" will be set to TRUE and icon_view will connect a "query-tooltip" signal handler.

icon_view a T
column an integer, which is a valid column number for icon_view's model


:SetTooltipItem(self @ T, tooltip @ Gtk.Gtk.Tooltip.T, path @ Gtk.Gtk.TreePath.T) : Std.Object.T

Sets the tip area of tooltip to be the area covered by the item at path. See also SetTooltipColumn for a simpler alternative. See also Gtk.Gtk.Tooltip.SetTipArea.

icon_view a T
tooltip a Gtk.Gtk.Tooltip.T
path a Gtk.Gtk.TreePath.T


:UnselectAll(self @ T) : Std.Object.T

Unselects all the icons.

icon_view A T.


:UnselectPath(self @ T, path @ Gtk.Gtk.TreePath.T) : Std.Object.T

Unselects the row at path.

icon_view A T.
path The Gtk.Gtk.TreePath.T to be unselected.


:UnsetModelDragDest(self @ T) : Std.Object.T

Undoes the effect of EnableModelDragDest. Calling this method sets "reorderable" to FALSE.

icon_view a T


:UnsetModelDragSource(self @ T) : Std.Object.T

Undoes the effect of EnableModelDragSource. Calling this method sets "reorderable" to FALSE.

icon_view a T