---
name: "Gtk2::IconView"
section: "3pm"
platform: "linux"
package: "libgtk2-perl-doc"
version: "2:1.24992-1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/Gtk2::IconView"
---

# Gtk2::IconView(3pm)

wrapper for GtkIconView

## NAME

Gtk2::IconView - wrapper for GtkIconView

## HIERARCHY

```
  Glib::Object
  +----Glib::InitiallyUnowned
       +----Gtk2::Object
            +----Gtk2::Widget
                 +----Gtk2::Container
                      +----Gtk2::IconView
```

## INTERFACES

```
  Glib::Object::_Unregistered::AtkImplementorIface
  Gtk2::Buildable
  Gtk2::CellLayout
```

## METHODS

### widget = Gtk2::IconView-\>new

### widget = Gtk2::IconView-\>new\_with\_model ($model)

- •

  `$model` (Gtk2::TreeModel)

### integer = $icon\_view-\>get\_column\_spacing

### $icon\_view-\>set\_column\_spacing ($column\_spacing)

- •

  `$column_spacing` (integer)

### integer = $icon\_view-\>get\_columns

### $icon\_view-\>set\_columns ($columns)

- •

  `$columns` (integer)

### (bx, by) = $icon\_view-\>convert\_widget\_to\_bin\_window\_coords ($wx, $wy)

- •

  `$wx` (integer)

- •

  `$wy` (integer)

Since: gtk+ 2.12

### pixmap = $icon\_view-\>create\_drag\_icon ($path)

- •

  `$path` (Gtk2::TreePath)

Since: gtk+ 2.8

### list = $icon\_view-\>get\_cursor

Since: gtk+ 2.8

### $icon\_view-\>set\_cursor ($path, $cell, $start\_editing)

- •

  `$path` (Gtk2::TreePath)

- •

  `$cell` (Gtk2::CellRenderer or undef)

- •

  `$start_editing` (boolean)

Since: gtk+ 2.8

### $icon\_view-\>get\_dest\_item\_at\_pos ($drag\_x, $drag\_y)

- •

  `$drag_x` (integer)

- •

  `$drag_y` (integer)

Since: gtk+ 2.8

### list = $icon\_view-\>get\_drag\_dest\_item

Since: gtk+ 2.8

### $icon\_view-\>set\_drag\_dest\_item ($path, $pos)

- •

  `$path` (Gtk2::TreePath)

- •

  `$pos` (Gtk2::IconView::DropPosition)

Since: gtk+ 2.8

### $icon\_view-\>enable\_model\_drag\_dest ($actions, ...)

- •

  `$actions` (Gtk2::Gdk::DragAction)

- •

  ... (list) of Gtk2::TargetEntry's

Since: gtk+ 2.8

### $icon\_view-\>enable\_model\_drag\_source ($start\_button\_mask, $actions, ...)

- •

  `$start_button_mask` (Gtk2::Gdk::ModifierType)

- •

  `$actions` (Gtk2::Gdk::DragAction)

- •

  ... (list) of Gtk2::TargetEntry's

Since: gtk+ 2.8

### $icon\_view-\>item\_activated ($path)

- •

  `$path` (Gtk2::TreePath)

### $icon\_view-\>get\_item\_at\_pos ($x, $y)

- •

  `$x` (integer)

- •

  `$y` (integer)

Since: gtk+ 2.8

### integer = $icon\_view-\>get\_item\_column ($path)

- •

  `$path` (Gtk2::TreePath)

Since: gtk+ 2.22

### orientation = $icon\_view-\>get\_item\_orientation

Since: gtk+ 2.22

### $icon\_view-\>set\_item\_orientation ($orientation)

- •

  `$orientation` (Gtk2::Orientation)

Since: gtk+ 2.22

### integer = $icon\_view-\>get\_item\_padding

Since: gtk+ 2.18

### $icon\_view-\>set\_item\_padding ($item\_padding)

- •

  `$item_padding` (integer)

Since: gtk+ 2.18

### integer = $icon\_view-\>get\_item\_row ($path)

- •

  `$path` (Gtk2::TreePath)

Since: gtk+ 2.22

### integer = $icon\_view-\>get\_item\_width

### $icon\_view-\>set\_item\_width ($item\_width)

- •

  `$item_width` (integer)

### integer = $icon\_view-\>get\_margin

### $icon\_view-\>set\_margin ($margin)

- •

  `$margin` (integer)

### integer = $icon\_view-\>get\_markup\_column

### $icon\_view-\>set\_markup\_column ($column)

- •

  `$column` (integer)

### treemodel = $icon\_view-\>get\_model

### $icon\_view-\>set\_model ($model)

- •

  `$model` (Gtk2::TreeModel)

### orientation = $icon\_view-\>get\_orientation

### $icon\_view-\>set\_orientation ($orientation)

- •

  `$orientation` (Gtk2::Orientation)

### treepath = $icon\_view-\>get\_path\_at\_pos ($x, $y)

- •

  `$x` (integer)

- •

  `$y` (integer)

### boolean = $icon\_view-\>path\_is\_selected ($path)

- •

  `$path` (Gtk2::TreePath)

### integer = $icon\_view-\>get\_pixbuf\_column

### $icon\_view-\>set\_pixbuf\_column ($column)

- •

  `$column` (integer)

### boolean = $icon\_view-\>get\_reorderable

Since: gtk+ 2.8

### $icon\_view-\>set\_reorderable ($reorderable)

- •

  `$reorderable` (boolean)

Since: gtk+ 2.8

### integer = $icon\_view-\>get\_row\_spacing

### $icon\_view-\>set\_row\_spacing ($row\_spacing)

- •

  `$row_spacing` (integer)

### $icon\_view-\>scroll\_to\_path ($path, $use\_align=FALSE, $row\_align=0.0, $col\_align=0.0)

- •

  `$path` (Gtk2::TreePath)

- •

  `$use_align` (boolean)

- •

  `$row_align` (double)

- •

  `$col_align` (double)

Since: gtk+ 2.8

### $icon\_view-\>select\_all

### $icon\_view-\>select\_path ($path)

- •

  `$path` (Gtk2::TreePath)

### $icon\_view-\>selected\_foreach ($func, $data=undef)

- •

  `$func` (scalar)

- •

  `$data` (scalar)

### list = $icon\_view-\>get\_selected\_items

### selectionmode = $icon\_view-\>get\_selection\_mode

### $icon\_view-\>set\_selection\_mode ($mode)

- •

  `$mode` (Gtk2::SelectionMode)

### integer = $icon\_view-\>get\_spacing

### $icon\_view-\>set\_spacing ($spacing)

- •

  `$spacing` (integer)

### integer = $icon\_view-\>get\_text\_column

### $icon\_view-\>set\_text\_column ($column)

- •

  `$column` (integer)

### $icon\_view-\>set\_tooltip\_cell ($tooltip, $path, $cell)

- •

  `$tooltip` (Gtk2::Tooltip)

- •

  `$path` (Gtk2::TreePath)

- •

  `$cell` (Gtk2::CellRenderer)

Since: gtk+ 2.12

### integer = $icon\_view-\>get\_tooltip\_column

Since: gtk+ 2.12

### $icon\_view-\>set\_tooltip\_column ($column)

- •

  `$column` (integer)

Since: gtk+ 2.12

### list = $icon\_view-\>get\_tooltip\_context ($x, $y, $keyboard\_tip)

- •

  `$x` (integer)

- •

  `$y` (integer)

- •

  `$keyboard_tip` (boolean)

Since: gtk+ 2.12

### $icon\_view-\>set\_tooltip\_item ($tooltip, $path)

- •

  `$tooltip` (Gtk2::Tooltip)

- •

  `$path` (Gtk2::TreePath)

Since: gtk+ 2.12

### $icon\_view-\>unselect\_all

### $icon\_view-\>unselect\_path ($path)

- •

  `$path` (Gtk2::TreePath)

### $icon\_view-\>unset\_model\_drag\_dest

Since: gtk+ 2.8

### $icon\_view-\>unset\_model\_drag\_source

Since: gtk+ 2.8

### list = $icon\_view-\>get\_visible\_range

Since: gtk+ 2.8

## PROPERTIES

- 'column-spacing' (integer : default 6 : readable / writable / private)

  Space which is inserted between grid columns

- 'columns' (integer : default -1 : readable / writable / private)

  Number of columns to display

- 'item-orientation' (Gtk2::Orientation : default "vertical" : readable / writable / private)

  How the text and icon of each item are positioned relative to each other

- 'item-padding' (integer : default 6 : readable / writable / private)

  Padding around icon view items

- 'item-width' (integer : default -1 : readable / writable / private)

  The width used for each item

- 'margin' (integer : default 6 : readable / writable / private)

  Space which is inserted at the edges of the icon view

- 'markup-column' (integer : default -1 : readable / writable / private)

  Model column used to retrieve the text if using Pango markup

- 'model' (Gtk2::TreeModel : default undef : readable / writable / private)

  The model for the icon view

- 'orientation' (Gtk2::Orientation : default "vertical" : readable / writable / private)

  How the text and icon of each item are positioned relative to each other

- 'pixbuf-column' (integer : default -1 : readable / writable / private)

  Model column used to retrieve the icon pixbuf from

- 'reorderable' (boolean : default false : readable / writable)

  View is reorderable

- 'row-spacing' (integer : default 6 : readable / writable / private)

  Space which is inserted between grid rows

- 'selection-mode' (Gtk2::SelectionMode : default "single" : readable / writable / private)

  The selection mode

- 'spacing' (integer : default 0 : readable / writable / private)

  Space which is inserted between cells of an item

- 'text-column' (integer : default -1 : readable / writable / private)

  Model column used to retrieve the text from

- 'tooltip-column' (integer : default -1 : readable / writable / private)

  The column in the model containing the tooltip texts for the items

## STYLE PROPERTIES

- 'selection-box-alpha' (Glib::UChar : default 64 : readable / private)

  Opacity of the selection box

- 'selection-box-color' (Gtk2::Gdk::Color : default undef : readable / private)

  Color of the selection box

## SIGNALS

- boolean = **activate-cursor-item** (Gtk2::IconView)

  - **item-activated** (Gtk2::IconView, Gtk2::TreePath)

  - boolean = **move-cursor** (Gtk2::IconView, Gtk2::MovementStep, integer)

  - **select-all** (Gtk2::IconView)

  - **select-cursor-item** (Gtk2::IconView)

  - **selection-changed** (Gtk2::IconView)

  - **set-scroll-adjustments** (Gtk2::IconView, Gtk2::Adjustment, Gtk2::Adjustment)

  - **toggle-cursor-item** (Gtk2::IconView)

  - **unselect-all** (Gtk2::IconView)

  ## ENUMS AND FLAGS

### flags Gtk2::Gdk::DragAction

- •

  'default' / 'GDK\_ACTION\_DEFAULT'

- •

  'copy' / 'GDK\_ACTION\_COPY'

- •

  'move' / 'GDK\_ACTION\_MOVE'

- •

  'link' / 'GDK\_ACTION\_LINK'

- •

  'private' / 'GDK\_ACTION\_PRIVATE'

- •

  'ask' / 'GDK\_ACTION\_ASK'

### flags Gtk2::Gdk::ModifierType

- •

  'shift-mask' / 'GDK\_SHIFT\_MASK'

- •

  'lock-mask' / 'GDK\_LOCK\_MASK'

- •

  'control-mask' / 'GDK\_CONTROL\_MASK'

- •

  'mod1-mask' / 'GDK\_MOD1\_MASK'

- •

  'mod2-mask' / 'GDK\_MOD2\_MASK'

- •

  'mod3-mask' / 'GDK\_MOD3\_MASK'

- •

  'mod4-mask' / 'GDK\_MOD4\_MASK'

- •

  'mod5-mask' / 'GDK\_MOD5\_MASK'

- •

  'button1-mask' / 'GDK\_BUTTON1\_MASK'

- •

  'button2-mask' / 'GDK\_BUTTON2\_MASK'

- •

  'button3-mask' / 'GDK\_BUTTON3\_MASK'

- •

  'button4-mask' / 'GDK\_BUTTON4\_MASK'

- •

  'button5-mask' / 'GDK\_BUTTON5\_MASK'

- •

  'super-mask' / 'GDK\_SUPER\_MASK'

- •

  'hyper-mask' / 'GDK\_HYPER\_MASK'

- •

  'meta-mask' / 'GDK\_META\_MASK'

- •

  'release-mask' / 'GDK\_RELEASE\_MASK'

- •

  'modifier-mask' / 'GDK\_MODIFIER\_MASK'

### enum Gtk2::IconView::DropPosition

- •

  'no-drop' / 'GTK\_ICON\_VIEW\_NO\_DROP'

- •

  'drop-into' / 'GTK\_ICON\_VIEW\_DROP\_INTO'

- •

  'drop-left' / 'GTK\_ICON\_VIEW\_DROP\_LEFT'

- •

  'drop-right' / 'GTK\_ICON\_VIEW\_DROP\_RIGHT'

- •

  'drop-above' / 'GTK\_ICON\_VIEW\_DROP\_ABOVE'

- •

  'drop-below' / 'GTK\_ICON\_VIEW\_DROP\_BELOW'

### enum Gtk2::MovementStep

- •

  'logical-positions' / 'GTK\_MOVEMENT\_LOGICAL\_POSITIONS'

- •

  'visual-positions' / 'GTK\_MOVEMENT\_VISUAL\_POSITIONS'

- •

  'words' / 'GTK\_MOVEMENT\_WORDS'

- •

  'display-lines' / 'GTK\_MOVEMENT\_DISPLAY\_LINES'

- •

  'display-line-ends' / 'GTK\_MOVEMENT\_DISPLAY\_LINE\_ENDS'

- •

  'paragraphs' / 'GTK\_MOVEMENT\_PARAGRAPHS'

- •

  'paragraph-ends' / 'GTK\_MOVEMENT\_PARAGRAPH\_ENDS'

- •

  'pages' / 'GTK\_MOVEMENT\_PAGES'

- •

  'buffer-ends' / 'GTK\_MOVEMENT\_BUFFER\_ENDS'

- •

  'horizontal-pages' / 'GTK\_MOVEMENT\_HORIZONTAL\_PAGES'

### enum Gtk2::Orientation

- •

  'horizontal' / 'GTK\_ORIENTATION\_HORIZONTAL'

- •

  'vertical' / 'GTK\_ORIENTATION\_VERTICAL'

### enum Gtk2::SelectionMode

- •

  'none' / 'GTK\_SELECTION\_NONE'

- •

  'single' / 'GTK\_SELECTION\_SINGLE'

- •

  'browse' / 'GTK\_SELECTION\_BROWSE'

- •

  'multiple' / 'GTK\_SELECTION\_MULTIPLE'

- •

  'extended' / 'GTK\_SELECTION\_EXTENDED'

## SEE ALSO

Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container

## COPYRIGHT

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL.  See Gtk2 for a full notice.
