gi-gtk-3.0.26: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.IconView

Contents

Description

IconView provides an alternative view on a TreeModel. It displays the model as a grid of icons with labels. Like TreeView, it allows to select one or multiple items (depending on the selection mode, see iconViewSetSelectionMode). In addition to selection with the arrow keys, 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), IconView will only display the first level of the tree and ignore the tree’s branches.

CSS nodes

plain code

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.

Synopsis

Exported types

newtype IconView Source #

Memory-managed wrapper type.

Constructors

IconView (ManagedPtr IconView) 
Instances
GObject IconView Source # 
Instance details

Defined in GI.Gtk.Objects.IconView

IsImplementorIface IconView Source # 
Instance details

Defined in GI.Gtk.Objects.IconView

IsObject IconView Source # 
Instance details

Defined in GI.Gtk.Objects.IconView

IsBuildable IconView Source # 
Instance details

Defined in GI.Gtk.Objects.IconView

IsCellLayout IconView Source # 
Instance details

Defined in GI.Gtk.Objects.IconView

IsScrollable IconView Source # 
Instance details

Defined in GI.Gtk.Objects.IconView

IsContainer IconView Source # 
Instance details

Defined in GI.Gtk.Objects.IconView

IsIconView IconView Source # 
Instance details

Defined in GI.Gtk.Objects.IconView

IsWidget IconView Source # 
Instance details

Defined in GI.Gtk.Objects.IconView

class GObject o => IsIconView o Source #

Type class for types which can be safely cast to IconView, for instance with toIconView.

Instances
(GObject a, (UnknownAncestorError IconView a :: Constraint)) => IsIconView a Source # 
Instance details

Defined in GI.Gtk.Objects.IconView

IsIconView IconView Source # 
Instance details

Defined in GI.Gtk.Objects.IconView

toIconView :: (MonadIO m, IsIconView o) => o -> m IconView Source #

Cast to IconView, for types for which this is known to be safe. For general casts, use castTo.

noIconView :: Maybe IconView Source #

A convenience alias for Nothing :: Maybe IconView.

Methods

convertWidgetToBinWindowCoords

iconViewConvertWidgetToBinWindowCoords Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> Int32

wx: X coordinate relative to the widget

-> Int32

wy: Y coordinate relative to the widget

-> m (Int32, Int32) 

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

Since: 2.12

createDragIcon

iconViewCreateDragIcon Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> TreePath

path: a TreePath in iconView

-> m Surface

Returns: a newly-allocated surface of the drag icon.

Creates a Surface representation of the item at path. This image is used for a drag icon.

Since: 2.8

enableModelDragDest

iconViewEnableModelDragDest Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> [TargetEntry]

targets: the table of targets that the drag will support

-> [DragAction]

actions: the bitmask of possible actions for a drag to this widget

-> m () 

Turns iconView into a drop destination for automatic DND. Calling this method sets IconView:reorderable to False.

Since: 2.8

enableModelDragSource

iconViewEnableModelDragSource Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> [ModifierType]

startButtonMask: Mask of allowed buttons to start drag

-> [TargetEntry]

targets: the table of targets that the drag will support

-> [DragAction]

actions: the bitmask of possible actions for a drag from this widget

-> m () 

Turns iconView into a drag source for automatic DND. Calling this method sets IconView:reorderable to False.

Since: 2.8

getActivateOnSingleClick

iconViewGetActivateOnSingleClick Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> m Bool

Returns: True if item-activated will be emitted on a single click

Gets the setting set by iconViewSetActivateOnSingleClick.

Since: 3.8

getCellRect

iconViewGetCellRect Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a, IsCellRenderer b) 
=> a

iconView: a IconView

-> TreePath

path: a TreePath

-> Maybe b

cell: a CellRenderer or Nothing

-> m (Bool, Rectangle)

Returns: False if there is no such item, True otherwise

Fills the bounding rectangle in widget coordinates for the cell specified by path and cell. If cell is Nothing the main cell area is used.

This function is only valid if iconView is realized.

Since: 3.6

getColumnSpacing

iconViewGetColumnSpacing Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> m Int32

Returns: the space between columns

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

Since: 2.6

getColumns

iconViewGetColumns Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> m Int32

Returns: the number of columns, or -1

Returns the value of the ::columns property.

Since: 2.6

getCursor

iconViewGetCursor Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView

-> m (Bool, TreePath, CellRenderer)

Returns: True if the cursor is set.

Fills in path and cell with the current cursor path and cell. If the cursor isn’t currently set, then *path will be Nothing. If no cell currently has focus, then *cell will be Nothing.

The returned TreePath must be freed with treePathFree.

Since: 2.8

getDestItemAtPos

iconViewGetDestItemAtPos Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> Int32

dragX: the position to determine the destination item for

-> Int32

dragY: the position to determine the destination item for

-> m (Bool, TreePath, IconViewDropPosition)

Returns: whether there is an item at the given position.

Determines the destination item for a given position.

Since: 2.8

getDragDestItem

iconViewGetDragDestItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> m (TreePath, IconViewDropPosition) 

Gets information about the item that is highlighted for feedback.

Since: 2.8

getItemAtPos

iconViewGetItemAtPos Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> Int32

x: The x position to be identified

-> Int32

y: The y position to be identified

-> m (Bool, TreePath, CellRenderer)

Returns: True if an item exists at the specified position

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

Since: 2.8

getItemColumn

iconViewGetItemColumn Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> TreePath

path: the TreePath of the item

-> m Int32

Returns: The column in which the item is displayed

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

Since: 2.22

getItemOrientation

iconViewGetItemOrientation Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> m Orientation

Returns: the relative position of texts and icons

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

Since: 2.6

getItemPadding

iconViewGetItemPadding Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> m Int32

Returns: the padding around items

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

Since: 2.18

getItemRow

iconViewGetItemRow Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> TreePath

path: the TreePath of the item

-> m Int32

Returns: The row in which the item is displayed

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

Since: 2.22

getItemWidth

iconViewGetItemWidth Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> m Int32

Returns: the width of a single item, or -1

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

Since: 2.6

getMargin

iconViewGetMargin Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> m Int32

Returns: the space at the borders

Returns the value of the ::margin property.

Since: 2.6

getMarkupColumn

iconViewGetMarkupColumn Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> m Int32

Returns: the markup column, or -1 if it’s unset.

Returns the column with markup text for iconView.

Since: 2.6

getModel

iconViewGetModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> m (Maybe TreeModel)

Returns: A TreeModel, or Nothing if none is currently being used.

Returns the model the IconView is based on. Returns Nothing if the model is unset.

Since: 2.6

getPathAtPos

iconViewGetPathAtPos Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> Int32

x: The x position to be identified

-> Int32

y: The y position to be identified

-> m (Maybe TreePath)

Returns: The TreePath corresponding to the icon or Nothing if no icon exists at that position.

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

Since: 2.6

getPixbufColumn

iconViewGetPixbufColumn Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> m Int32

Returns: the pixbuf column, or -1 if it’s unset.

Returns the column with pixbufs for iconView.

Since: 2.6

getReorderable

iconViewGetReorderable Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> m Bool

Returns: True if the list can be reordered.

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

Since: 2.8

getRowSpacing

iconViewGetRowSpacing Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> m Int32

Returns: the space between rows

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

Since: 2.6

getSelectedItems

iconViewGetSelectedItems Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> m [TreePath]

Returns: A List containing a TreePath for each selected row.

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

To free the return value, use:

C code

g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);

Since: 2.6

getSelectionMode

iconViewGetSelectionMode Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> m SelectionMode

Returns: the current selection mode

Gets the selection mode of the iconView.

Since: 2.6

getSpacing

iconViewGetSpacing Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> m Int32

Returns: the space between cells

Returns the value of the ::spacing property.

Since: 2.6

getTextColumn

iconViewGetTextColumn Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> m Int32

Returns: the text column, or -1 if it’s unset.

Returns the column with text for iconView.

Since: 2.6

getTooltipColumn

iconViewGetTooltipColumn Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> m Int32

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

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

Since: 2.12

getTooltipContext

iconViewGetTooltipContext Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: an IconView

-> Int32

x: the x coordinate (relative to widget coordinates)

-> Int32

y: the y coordinate (relative to widget coordinates)

-> Bool

keyboardTip: whether this is a keyboard tooltip or not

-> m (Bool, Int32, Int32, TreeModel, TreePath, TreeIter)

Returns: whether or not the given tooltip context points to a item

This function is supposed to be used in a Widget::query-tooltip signal handler for IconView. The x, y and keyboardTip 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 iconView’s bin_window if keyboardTooltip is False.

Since: 2.12

getVisibleRange

iconViewGetVisibleRange Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView

-> m (Bool, TreePath, TreePath)

Returns: True, if valid paths were placed in startPath and endPath

Sets startPath and endPath to be the first and last visible path. Note that there may be invisible paths in between.

Both paths should be freed with treePathFree after use.

Since: 2.8

itemActivated

iconViewItemActivated Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView

-> TreePath

path: The TreePath to be activated

-> m () 

Activates the item determined by path.

Since: 2.6

new

iconViewNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m IconView

Returns: A newly created IconView widget

Creates a new IconView widget

Since: 2.6

newWithArea

iconViewNewWithArea Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellArea a) 
=> a

area: the CellArea to use to layout cells

-> m IconView

Returns: A newly created IconView widget

Creates a new IconView widget using the specified area to layout cells inside the icons.

Since: 3.0

newWithModel

iconViewNewWithModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeModel a) 
=> a

model: The model.

-> m IconView

Returns: A newly created IconView widget.

Creates a new IconView widget with the model model.

Since: 2.6

pathIsSelected

iconViewPathIsSelected Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> TreePath

path: A TreePath to check selection on.

-> m Bool

Returns: True if 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.

Since: 2.6

scrollToPath

iconViewScrollToPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> TreePath

path: The path of the item to move to.

-> Bool

useAlign: whether to use alignment arguments, or False.

-> Float

rowAlign: The vertical alignment of the item specified by path.

-> Float

colAlign: The horizontal alignment of the item specified by path.

-> m () 

Moves the alignments of iconView to the position specified by path. rowAlign determines where the row is placed, and colAlign 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 useAlign 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 iconView is realized, the centered path will be modified to reflect this change.

Since: 2.8

selectAll

iconViewSelectAll Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> m () 

Selects all the icons. iconView must has its selection mode set to GTK_SELECTION_MULTIPLE.

Since: 2.6

selectPath

iconViewSelectPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> TreePath

path: The TreePath to be selected.

-> m () 

Selects the row at path.

Since: 2.6

selectedForeach

iconViewSelectedForeach Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> IconViewForeachFunc

func: The function to call for each selected icon.

-> m () 

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

Since: 2.6

setActivateOnSingleClick

iconViewSetActivateOnSingleClick Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> Bool

single: True to emit item-activated on a single click

-> m () 

Causes the IconView::item-activated signal to be emitted on a single click instead of a double click.

Since: 3.8

setColumnSpacing

iconViewSetColumnSpacing Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> Int32

columnSpacing: the column spacing

-> m () 

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

Since: 2.6

setColumns

iconViewSetColumns Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> Int32

columns: the number of columns

-> m () 

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.

Since: 2.6

setCursor

iconViewSetCursor Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a, IsCellRenderer b) 
=> a

iconView: A IconView

-> TreePath

path: A TreePath

-> Maybe b

cell: One of the cell renderers of iconView, or Nothing

-> Bool

startEditing: True if the specified cell should start being edited.

-> m () 

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 Nothing, then focus is given to the cell specified by it. Additionally, if startEditing 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.

Since: 2.8

setDragDestItem

iconViewSetDragDestItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> Maybe TreePath

path: The path of the item to highlight, or Nothing.

-> IconViewDropPosition

pos: Specifies where to drop, relative to the item

-> m () 

Sets the item that is highlighted for feedback.

Since: 2.8

setItemOrientation

iconViewSetItemOrientation Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> Orientation

orientation: the relative position of texts and icons

-> m () 

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

Since: 2.6

setItemPadding

iconViewSetItemPadding Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> Int32

itemPadding: the item padding

-> m () 

Sets the IconView:item-padding property which specifies the padding around each of the icon view’s items.

Since: 2.18

setItemWidth

iconViewSetItemWidth Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> Int32

itemWidth: the width for each item

-> m () 

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.

Since: 2.6

setMargin

iconViewSetMargin Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> Int32

margin: the margin

-> m () 

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

Since: 2.6

setMarkupColumn

iconViewSetMarkupColumn Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> Int32

column: A column in the currently used model, or -1 to display no text

-> m () 

Sets the column with markup information for iconView 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 iconViewSetTextColumn.

Since: 2.6

setModel

iconViewSetModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a, IsTreeModel b) 
=> a

iconView: A IconView.

-> Maybe b

model: The model.

-> m () 

Sets the model for a IconView. If the iconView already has a model set, it will remove it before setting the new model. If model is Nothing, then it will unset the old model.

Since: 2.6

setPixbufColumn

iconViewSetPixbufColumn Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> Int32

column: A column in the currently used model, or -1 to disable

-> m () 

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

Since: 2.6

setReorderable

iconViewSetReorderable Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> Bool

reorderable: True, if the list of items can be reordered.

-> m () 

This function is a convenience function to allow you to reorder models that support the TreeDragSourceIface and the TreeDragDestIface. Both TreeStore and 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.

Since: 2.8

setRowSpacing

iconViewSetRowSpacing Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> Int32

rowSpacing: the row spacing

-> m () 

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

Since: 2.6

setSelectionMode

iconViewSetSelectionMode Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> SelectionMode

mode: The selection mode

-> m () 

Sets the selection mode of the iconView.

Since: 2.6

setSpacing

iconViewSetSpacing Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> Int32

spacing: the spacing

-> m () 

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

Since: 2.6

setTextColumn

iconViewSetTextColumn Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> Int32

column: A column in the currently used model, or -1 to display no text

-> m () 

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

Since: 2.6

setTooltipCell

iconViewSetTooltipCell Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a, IsTooltip b, IsCellRenderer c) 
=> a

iconView: a IconView

-> b

tooltip: a Tooltip

-> TreePath

path: a TreePath

-> Maybe c

cell: a CellRenderer or Nothing

-> m () 

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

See also iconViewSetTooltipColumn for a simpler alternative.

Since: 2.12

setTooltipColumn

iconViewSetTooltipColumn Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> Int32

column: an integer, which is a valid column number for iconView’s model

-> m () 

If you only plan to have simple (text-only) tooltips on full items, you can use this function to have IconView handle these automatically for you. column should be set to the column in iconView’s model containing the tooltip texts, or -1 to disable this feature.

When enabled, Widget:has-tooltip will be set to True and iconView will connect a Widget::query-tooltip signal handler.

Note that the signal handler sets the text with tooltipSetMarkup, so &, <, etc have to be escaped in the text.

Since: 2.12

setTooltipItem

iconViewSetTooltipItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a, IsTooltip b) 
=> a

iconView: a IconView

-> b

tooltip: a Tooltip

-> TreePath

path: a TreePath

-> m () 

Sets the tip area of tooltip to be the area covered by the item at path. See also iconViewSetTooltipColumn for a simpler alternative. See also tooltipSetTipArea.

Since: 2.12

unselectAll

iconViewUnselectAll Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> m () 

Unselects all the icons.

Since: 2.6

unselectPath

iconViewUnselectPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: A IconView.

-> TreePath

path: The TreePath to be unselected.

-> m () 

Unselects the row at path.

Since: 2.6

unsetModelDragDest

iconViewUnsetModelDragDest Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> m () 

Undoes the effect of iconViewEnableModelDragDest. Calling this method sets IconView:reorderable to False.

Since: 2.8

unsetModelDragSource

iconViewUnsetModelDragSource Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconView a) 
=> a

iconView: a IconView

-> m () 

Undoes the effect of iconViewEnableModelDragSource. Calling this method sets IconView:reorderable to False.

Since: 2.8

Properties

activateOnSingleClick

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

Since: 3.8

constructIconViewActivateOnSingleClick :: IsIconView o => Bool -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “activate-on-single-click” property. This is rarely needed directly, but it is used by new.

getIconViewActivateOnSingleClick :: (MonadIO m, IsIconView o) => o -> m Bool Source #

Get the value of the “activate-on-single-click” property. When overloading is enabled, this is equivalent to

get iconView #activateOnSingleClick

setIconViewActivateOnSingleClick :: (MonadIO m, IsIconView o) => o -> Bool -> m () Source #

Set the value of the “activate-on-single-click” property. When overloading is enabled, this is equivalent to

set iconView [ #activateOnSingleClick := value ]

cellArea

The CellArea used to layout cell renderers for this view.

If no area is specified when creating the icon view with iconViewNewWithArea a CellAreaBox will be used.

Since: 3.0

constructIconViewCellArea :: (IsIconView o, IsCellArea a) => a -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “cell-area” property. This is rarely needed directly, but it is used by new.

getIconViewCellArea :: (MonadIO m, IsIconView o) => o -> m (Maybe CellArea) Source #

Get the value of the “cell-area” property. When overloading is enabled, this is equivalent to

get iconView #cellArea

columnSpacing

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

Since: 2.6

constructIconViewColumnSpacing :: IsIconView o => Int32 -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “column-spacing” property. This is rarely needed directly, but it is used by new.

getIconViewColumnSpacing :: (MonadIO m, IsIconView o) => o -> m Int32 Source #

Get the value of the “column-spacing” property. When overloading is enabled, this is equivalent to

get iconView #columnSpacing

setIconViewColumnSpacing :: (MonadIO m, IsIconView o) => o -> Int32 -> m () Source #

Set the value of the “column-spacing” property. When overloading is enabled, this is equivalent to

set iconView [ #columnSpacing := value ]

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.

Since: 2.6

constructIconViewColumns :: IsIconView o => Int32 -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “columns” property. This is rarely needed directly, but it is used by new.

getIconViewColumns :: (MonadIO m, IsIconView o) => o -> m Int32 Source #

Get the value of the “columns” property. When overloading is enabled, this is equivalent to

get iconView #columns

setIconViewColumns :: (MonadIO m, IsIconView o) => o -> Int32 -> m () Source #

Set the value of the “columns” property. When overloading is enabled, this is equivalent to

set iconView [ #columns := value ]

itemOrientation

The item-orientation property specifies how the cells (i.e. the icon and the text) of the item are positioned relative to each other.

Since: 2.6

constructIconViewItemOrientation :: IsIconView o => Orientation -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “item-orientation” property. This is rarely needed directly, but it is used by new.

getIconViewItemOrientation :: (MonadIO m, IsIconView o) => o -> m Orientation Source #

Get the value of the “item-orientation” property. When overloading is enabled, this is equivalent to

get iconView #itemOrientation

setIconViewItemOrientation :: (MonadIO m, IsIconView o) => o -> Orientation -> m () Source #

Set the value of the “item-orientation” property. When overloading is enabled, this is equivalent to

set iconView [ #itemOrientation := value ]

itemPadding

The item-padding property specifies the padding around each of the icon view's item.

Since: 2.18

constructIconViewItemPadding :: IsIconView o => Int32 -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “item-padding” property. This is rarely needed directly, but it is used by new.

getIconViewItemPadding :: (MonadIO m, IsIconView o) => o -> m Int32 Source #

Get the value of the “item-padding” property. When overloading is enabled, this is equivalent to

get iconView #itemPadding

setIconViewItemPadding :: (MonadIO m, IsIconView o) => o -> Int32 -> m () Source #

Set the value of the “item-padding” property. When overloading is enabled, this is equivalent to

set iconView [ #itemPadding := value ]

itemWidth

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.

Since: 2.6

constructIconViewItemWidth :: IsIconView o => Int32 -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “item-width” property. This is rarely needed directly, but it is used by new.

getIconViewItemWidth :: (MonadIO m, IsIconView o) => o -> m Int32 Source #

Get the value of the “item-width” property. When overloading is enabled, this is equivalent to

get iconView #itemWidth

setIconViewItemWidth :: (MonadIO m, IsIconView o) => o -> Int32 -> m () Source #

Set the value of the “item-width” property. When overloading is enabled, this is equivalent to

set iconView [ #itemWidth := value ]

margin

The margin property specifies the space which is inserted at the edges of the icon view.

Since: 2.6

constructIconViewMargin :: IsIconView o => Int32 -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “margin” property. This is rarely needed directly, but it is used by new.

getIconViewMargin :: (MonadIO m, IsIconView o) => o -> m Int32 Source #

Get the value of the “margin” property. When overloading is enabled, this is equivalent to

get iconView #margin

setIconViewMargin :: (MonadIO m, IsIconView o) => o -> Int32 -> m () Source #

Set the value of the “margin” property. When overloading is enabled, this is equivalent to

set iconView [ #margin := value ]

markupColumn

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.

Since: 2.6

constructIconViewMarkupColumn :: IsIconView o => Int32 -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “markup-column” property. This is rarely needed directly, but it is used by new.

getIconViewMarkupColumn :: (MonadIO m, IsIconView o) => o -> m Int32 Source #

Get the value of the “markup-column” property. When overloading is enabled, this is equivalent to

get iconView #markupColumn

setIconViewMarkupColumn :: (MonadIO m, IsIconView o) => o -> Int32 -> m () Source #

Set the value of the “markup-column” property. When overloading is enabled, this is equivalent to

set iconView [ #markupColumn := value ]

model

No description available in the introspection data.

clearIconViewModel :: (MonadIO m, IsIconView o) => o -> m () Source #

Set the value of the “model” property to Nothing. When overloading is enabled, this is equivalent to

clear #model

constructIconViewModel :: (IsIconView o, IsTreeModel a) => a -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “model” property. This is rarely needed directly, but it is used by new.

getIconViewModel :: (MonadIO m, IsIconView o) => o -> m (Maybe TreeModel) Source #

Get the value of the “model” property. When overloading is enabled, this is equivalent to

get iconView #model

setIconViewModel :: (MonadIO m, IsIconView o, IsTreeModel a) => o -> a -> m () Source #

Set the value of the “model” property. When overloading is enabled, this is equivalent to

set iconView [ #model := value ]

pixbufColumn

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.

Since: 2.6

constructIconViewPixbufColumn :: IsIconView o => Int32 -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “pixbuf-column” property. This is rarely needed directly, but it is used by new.

getIconViewPixbufColumn :: (MonadIO m, IsIconView o) => o -> m Int32 Source #

Get the value of the “pixbuf-column” property. When overloading is enabled, this is equivalent to

get iconView #pixbufColumn

setIconViewPixbufColumn :: (MonadIO m, IsIconView o) => o -> Int32 -> m () Source #

Set the value of the “pixbuf-column” property. When overloading is enabled, this is equivalent to

set iconView [ #pixbufColumn := value ]

reorderable

The reorderable property specifies if the items can be reordered by DND.

Since: 2.8

constructIconViewReorderable :: IsIconView o => Bool -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “reorderable” property. This is rarely needed directly, but it is used by new.

getIconViewReorderable :: (MonadIO m, IsIconView o) => o -> m Bool Source #

Get the value of the “reorderable” property. When overloading is enabled, this is equivalent to

get iconView #reorderable

setIconViewReorderable :: (MonadIO m, IsIconView o) => o -> Bool -> m () Source #

Set the value of the “reorderable” property. When overloading is enabled, this is equivalent to

set iconView [ #reorderable := value ]

rowSpacing

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

Since: 2.6

constructIconViewRowSpacing :: IsIconView o => Int32 -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “row-spacing” property. This is rarely needed directly, but it is used by new.

getIconViewRowSpacing :: (MonadIO m, IsIconView o) => o -> m Int32 Source #

Get the value of the “row-spacing” property. When overloading is enabled, this is equivalent to

get iconView #rowSpacing

setIconViewRowSpacing :: (MonadIO m, IsIconView o) => o -> Int32 -> m () Source #

Set the value of the “row-spacing” property. When overloading is enabled, this is equivalent to

set iconView [ #rowSpacing := value ]

selectionMode

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.

Since: 2.6

constructIconViewSelectionMode :: IsIconView o => SelectionMode -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “selection-mode” property. This is rarely needed directly, but it is used by new.

getIconViewSelectionMode :: (MonadIO m, IsIconView o) => o -> m SelectionMode Source #

Get the value of the “selection-mode” property. When overloading is enabled, this is equivalent to

get iconView #selectionMode

setIconViewSelectionMode :: (MonadIO m, IsIconView o) => o -> SelectionMode -> m () Source #

Set the value of the “selection-mode” property. When overloading is enabled, this is equivalent to

set iconView [ #selectionMode := value ]

spacing

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

Since: 2.6

constructIconViewSpacing :: IsIconView o => Int32 -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “spacing” property. This is rarely needed directly, but it is used by new.

getIconViewSpacing :: (MonadIO m, IsIconView o) => o -> m Int32 Source #

Get the value of the “spacing” property. When overloading is enabled, this is equivalent to

get iconView #spacing

setIconViewSpacing :: (MonadIO m, IsIconView o) => o -> Int32 -> m () Source #

Set the value of the “spacing” property. When overloading is enabled, this is equivalent to

set iconView [ #spacing := value ]

textColumn

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.

Since: 2.6

constructIconViewTextColumn :: IsIconView o => Int32 -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “text-column” property. This is rarely needed directly, but it is used by new.

getIconViewTextColumn :: (MonadIO m, IsIconView o) => o -> m Int32 Source #

Get the value of the “text-column” property. When overloading is enabled, this is equivalent to

get iconView #textColumn

setIconViewTextColumn :: (MonadIO m, IsIconView o) => o -> Int32 -> m () Source #

Set the value of the “text-column” property. When overloading is enabled, this is equivalent to

set iconView [ #textColumn := value ]

tooltipColumn

No description available in the introspection data.

constructIconViewTooltipColumn :: IsIconView o => Int32 -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “tooltip-column” property. This is rarely needed directly, but it is used by new.

getIconViewTooltipColumn :: (MonadIO m, IsIconView o) => o -> m Int32 Source #

Get the value of the “tooltip-column” property. When overloading is enabled, this is equivalent to

get iconView #tooltipColumn

setIconViewTooltipColumn :: (MonadIO m, IsIconView o) => o -> Int32 -> m () Source #

Set the value of the “tooltip-column” property. When overloading is enabled, this is equivalent to

set iconView [ #tooltipColumn := value ]

Signals

activateCursorItem

type C_IconViewActivateCursorItemCallback = Ptr () -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type IconViewActivateCursorItemCallback = IO Bool Source #

A [keybinding signal][GtkBindingSignal] 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.

afterIconViewActivateCursorItem :: (IsIconView a, MonadIO m) => a -> IconViewActivateCursorItemCallback -> m SignalHandlerId Source #

Connect a signal handler for the “activate-cursor-item” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after iconView #activateCursorItem callback

onIconViewActivateCursorItem :: (IsIconView a, MonadIO m) => a -> IconViewActivateCursorItemCallback -> m SignalHandlerId Source #

Connect a signal handler for the “activate-cursor-item” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on iconView #activateCursorItem callback

itemActivated

type C_IconViewItemActivatedCallback = Ptr () -> Ptr TreePath -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type IconViewItemActivatedCallback Source #

Arguments

 = TreePath

path: the TreePath for the activated item

-> IO () 

The ::item-activated signal is emitted when the method iconViewItemActivated 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.

afterIconViewItemActivated :: (IsIconView a, MonadIO m) => a -> IconViewItemActivatedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “item-activated” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after iconView #itemActivated callback

onIconViewItemActivated :: (IsIconView a, MonadIO m) => a -> IconViewItemActivatedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “item-activated” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on iconView #itemActivated callback

moveCursor

type C_IconViewMoveCursorCallback = Ptr () -> CUInt -> Int32 -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type IconViewMoveCursorCallback Source #

Arguments

 = MovementStep

step: the granularity of the move, as a MovementStep

-> Int32

count: the number of step units to move

-> IO Bool 

The ::move-cursor signal is a [keybinding signal][GtkBindingSignal] 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.

afterIconViewMoveCursor :: (IsIconView a, MonadIO m) => a -> IconViewMoveCursorCallback -> m SignalHandlerId Source #

Connect a signal handler for the “move-cursor” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after iconView #moveCursor callback

onIconViewMoveCursor :: (IsIconView a, MonadIO m) => a -> IconViewMoveCursorCallback -> m SignalHandlerId Source #

Connect a signal handler for the “move-cursor” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on iconView #moveCursor callback

selectAll

type C_IconViewSelectAllCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type IconViewSelectAllCallback = IO () Source #

A [keybinding signal][GtkBindingSignal] 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.

afterIconViewSelectAll :: (IsIconView a, MonadIO m) => a -> IconViewSelectAllCallback -> m SignalHandlerId Source #

Connect a signal handler for the “select-all” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after iconView #selectAll callback

onIconViewSelectAll :: (IsIconView a, MonadIO m) => a -> IconViewSelectAllCallback -> m SignalHandlerId Source #

Connect a signal handler for the “select-all” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on iconView #selectAll callback

selectCursorItem

type C_IconViewSelectCursorItemCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type IconViewSelectCursorItemCallback = IO () Source #

A [keybinding signal][GtkBindingSignal] 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.

afterIconViewSelectCursorItem :: (IsIconView a, MonadIO m) => a -> IconViewSelectCursorItemCallback -> m SignalHandlerId Source #

Connect a signal handler for the “select-cursor-item” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after iconView #selectCursorItem callback

onIconViewSelectCursorItem :: (IsIconView a, MonadIO m) => a -> IconViewSelectCursorItemCallback -> m SignalHandlerId Source #

Connect a signal handler for the “select-cursor-item” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on iconView #selectCursorItem callback

selectionChanged

type C_IconViewSelectionChangedCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type IconViewSelectionChangedCallback = IO () Source #

The ::selection-changed signal is emitted when the selection (i.e. the set of selected items) changes.

afterIconViewSelectionChanged :: (IsIconView a, MonadIO m) => a -> IconViewSelectionChangedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “selection-changed” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after iconView #selectionChanged callback

onIconViewSelectionChanged :: (IsIconView a, MonadIO m) => a -> IconViewSelectionChangedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “selection-changed” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on iconView #selectionChanged callback

toggleCursorItem

type C_IconViewToggleCursorItemCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type IconViewToggleCursorItemCallback = IO () Source #

A [keybinding signal][GtkBindingSignal] 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.

afterIconViewToggleCursorItem :: (IsIconView a, MonadIO m) => a -> IconViewToggleCursorItemCallback -> m SignalHandlerId Source #

Connect a signal handler for the “toggle-cursor-item” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after iconView #toggleCursorItem callback

onIconViewToggleCursorItem :: (IsIconView a, MonadIO m) => a -> IconViewToggleCursorItemCallback -> m SignalHandlerId Source #

Connect a signal handler for the “toggle-cursor-item” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on iconView #toggleCursorItem callback

unselectAll

type C_IconViewUnselectAllCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type IconViewUnselectAllCallback = IO () Source #

A [keybinding signal][GtkBindingSignal] 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.

afterIconViewUnselectAll :: (IsIconView a, MonadIO m) => a -> IconViewUnselectAllCallback -> m SignalHandlerId Source #

Connect a signal handler for the “unselect-all” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after iconView #unselectAll callback

onIconViewUnselectAll :: (IsIconView a, MonadIO m) => a -> IconViewUnselectAllCallback -> m SignalHandlerId Source #

Connect a signal handler for the “unselect-all” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on iconView #unselectAll callback