Gtk2HsContentsIndex
Graphics.UI.Gtk.TreeList.IconView
Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Contents
Detail
Class Hierarchy
Types
Constructors
Methods
Attributes
Signals
Description

A widget which displays a list of icons in a grid

  • Module available since Gtk+ version 2.6
Synopsis
data IconView
class ContainerClass o => IconViewClass o
castToIconView :: GObjectClass obj => obj -> IconView
iconViewNew :: IO IconView
iconViewNewWithModel :: TreeModelClass model => model -> IO IconView
iconViewSetModel :: (IconViewClass self, TreeModelClass model) => self -> model -> IO ()
iconViewGetModel :: IconViewClass self => self -> IO TreeModel
iconViewSetTextColumn :: IconViewClass self => self -> Int -> IO ()
iconViewGetTextColumn :: IconViewClass self => self -> IO Int
iconViewSetMarkupColumn :: IconViewClass self => self -> Int -> IO ()
iconViewGetMarkupColumn :: IconViewClass self => self -> IO Int
iconViewSetPixbufColumn :: IconViewClass self => self -> Int -> IO ()
iconViewGetPixbufColumn :: IconViewClass self => self -> IO Int
iconViewGetPathAtPos :: IconViewClass self => self -> Int -> Int -> IO TreePath
iconViewSelectedForeach :: IconViewClass self => self -> (TreePath -> IO ()) -> IO ()
iconViewSetSelectionMode :: IconViewClass self => self -> SelectionMode -> IO ()
iconViewGetSelectionMode :: IconViewClass self => self -> IO SelectionMode
iconViewSetOrientation :: IconViewClass self => self -> Orientation -> IO ()
iconViewGetOrientation :: IconViewClass self => self -> IO Orientation
iconViewSetColumns :: IconViewClass self => self -> Int -> IO ()
iconViewGetColumns :: IconViewClass self => self -> IO Int
iconViewSetItemWidth :: IconViewClass self => self -> Int -> IO ()
iconViewGetItemWidth :: IconViewClass self => self -> IO Int
iconViewSetSpacing :: IconViewClass self => self -> Int -> IO ()
iconViewGetSpacing :: IconViewClass self => self -> IO Int
iconViewSetRowSpacing :: IconViewClass self => self -> Int -> IO ()
iconViewGetRowSpacing :: IconViewClass self => self -> IO Int
iconViewSetColumnSpacing :: IconViewClass self => self -> Int -> IO ()
iconViewGetColumnSpacing :: IconViewClass self => self -> IO Int
iconViewSetMargin :: IconViewClass self => self -> Int -> IO ()
iconViewGetMargin :: IconViewClass self => self -> IO Int
iconViewSelectPath :: IconViewClass self => self -> TreePath -> IO ()
iconViewUnselectPath :: IconViewClass self => self -> TreePath -> IO ()
iconViewPathIsSelected :: IconViewClass self => self -> TreePath -> IO Bool
iconViewGetSelectedItems :: IconViewClass self => self -> IO [TreePath]
iconViewSelectAll :: IconViewClass self => self -> IO ()
iconViewUnselectAll :: IconViewClass self => self -> IO ()
iconViewItemActivated :: IconViewClass self => self -> TreePath -> IO ()
iconViewSelectionMode :: IconViewClass self => Attr self SelectionMode
iconViewPixbufColumn :: IconViewClass self => Attr self Int
iconViewTextColumn :: IconViewClass self => Attr self Int
iconViewMarkupColumn :: IconViewClass self => Attr self Int
iconViewModel :: (IconViewClass self, TreeModelClass model) => ReadWriteAttr self TreeModel model
iconViewColumns :: IconViewClass self => Attr self Int
iconViewItemWidth :: IconViewClass self => Attr self Int
iconViewSpacing :: IconViewClass self => Attr self Int
iconViewRowSpacing :: IconViewClass self => Attr self Int
iconViewColumnSpacing :: IconViewClass self => Attr self Int
iconViewMargin :: IconViewClass self => Attr self Int
iconViewOrientation :: IconViewClass self => Attr self Orientation
onSelectAll :: IconViewClass self => self -> IO () -> IO (ConnectId self)
afterSelectAll :: IconViewClass self => self -> IO () -> IO (ConnectId self)
onUnselectAll :: IconViewClass self => self -> IO () -> IO (ConnectId self)
afterUnselectAll :: IconViewClass self => self -> IO () -> IO (ConnectId self)
onSelectCursorItem :: IconViewClass self => self -> IO () -> IO (ConnectId self)
afterSelectCursorItem :: IconViewClass self => self -> IO () -> IO (ConnectId self)
onToggleCursorItem :: IconViewClass self => self -> IO () -> IO (ConnectId self)
afterToggleCursorItem :: IconViewClass self => self -> IO () -> IO (ConnectId self)
onActivateCursorItem :: IconViewClass self => self -> IO Bool -> IO (ConnectId self)
afterActivateCursorItem :: IconViewClass self => self -> IO Bool -> IO (ConnectId self)
Detail
IconView provides an alternative view on a list model. 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.
Class Hierarchy
 |  GObject
 |   +----Object
 |         +----Widget
 |               +----Container
 |                     +----IconView
 
Types
data IconView
show/hide Instances
class ContainerClass o => IconViewClass o
show/hide Instances
castToIconView :: GObjectClass obj => obj -> IconView
Constructors
iconViewNew :: IO IconView
Creates a new IconView widget
iconViewNewWithModel
:: TreeModelClass model
=> modelmodel - The model.
-> IO IconView
Creates a new IconView widget with the model model.
Methods
iconViewSetModel
:: (IconViewClass self, TreeModelClass model)
=> self
-> modelmodel - The model.
-> IO ()
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 {NULL, FIXME: this should probably be converted to a Maybe data type}, then it will unset the old model.
iconViewGetModel
:: IconViewClass self
=> self
-> IO TreeModelreturns A TreeModel, or {NULL, FIXME: this should probably be converted to a Maybe data type} if none is currently being used.
Returns the model the IconView is based on. Returns {NULL, FIXME: this should probably be converted to a Maybe data type} if the model is unset.
iconViewSetTextColumn
:: IconViewClass self
=> self
-> Intcolumn - A column in the currently used model.
-> IO ()
Sets the column with text for iconView to be column. The text column must be of type string.
iconViewGetTextColumn
:: IconViewClass self
=> self
-> IO Intreturns the text column, or -1 if it's unset.
Returns the column with text for iconView.
iconViewSetMarkupColumn
:: IconViewClass self
=> self
-> Intcolumn - A column in the currently used model.
-> IO ()
Sets the column with markup information for iconView to be column. The markup column must be of type {G_TYPE_STRING, FIXME: unknown type/value}. If the markup column is set to something, it overrides the text column set by iconViewSetTextColumn.
iconViewGetMarkupColumn
:: IconViewClass self
=> self
-> IO Intreturns the markup column, or -1 if it's unset.
Returns the column with markup text for iconView.
iconViewSetPixbufColumn
:: IconViewClass self
=> self
-> Intcolumn - A column in the currently used model.
-> IO ()
Sets the column with pixbufs for iconView to be column. The pixbuf column must be of type pixbuf.
iconViewGetPixbufColumn
:: IconViewClass self
=> self
-> IO Intreturns the pixbuf column, or -1 if it's unset.
Returns the column with pixbufs for iconView.
iconViewGetPathAtPos
:: IconViewClass self
=> self
-> Intx - The x position to be identified
-> Inty - The y position to be identified
-> IO TreePathreturns The TreePath corresponding to the icon or [] if no icon exists at that position.
Finds the path at the point (x, y), relative to widget coordinates.
iconViewSelectedForeach
:: IconViewClass self
=> self
-> (TreePath -> IO ())(path -> ...) - The funcion to call for each selected icon.
-> IO ()
Calls a function for each selected icon. Note that the model or selection cannot be modified from within this function.
iconViewSetSelectionMode
:: IconViewClass self
=> self
-> SelectionModemode - The selection mode
-> IO ()
Sets the selection mode of the iconView.
iconViewGetSelectionMode
:: IconViewClass self
=> self
-> IO SelectionModereturns the current selection mode
Gets the selection mode of the iconView.
iconViewSetOrientation
:: IconViewClass self
=> self
-> Orientationorientation - the relative position of texts and icons
-> IO ()
Sets the ::orientation property which determines whether the labels are drawn beside the icons instead of below.
iconViewGetOrientation
:: IconViewClass self
=> self
-> IO Orientationreturns the relative position of texts and icons
Returns the value of the ::orientation property which determines whether the labels are drawn beside the icons instead of below.
iconViewSetColumns
:: IconViewClass self
=> self
-> Intcolumns -
-> IO ()
iconViewGetColumns
:: IconViewClass self
=> self
-> IO Intreturns
iconViewSetItemWidth
:: IconViewClass self
=> self
-> IntitemWidth -
-> IO ()
iconViewGetItemWidth
:: IconViewClass self
=> self
-> IO Intreturns
iconViewSetSpacing
:: IconViewClass self
=> self
-> Intspacing -
-> IO ()
iconViewGetSpacing
:: IconViewClass self
=> self
-> IO Intreturns
iconViewSetRowSpacing
:: IconViewClass self
=> self
-> IntrowSpacing -
-> IO ()
iconViewGetRowSpacing
:: IconViewClass self
=> self
-> IO Intreturns
iconViewSetColumnSpacing
:: IconViewClass self
=> self
-> IntcolumnSpacing -
-> IO ()
iconViewGetColumnSpacing
:: IconViewClass self
=> self
-> IO Intreturns
iconViewSetMargin
:: IconViewClass self
=> self
-> Intmargin -
-> IO ()
iconViewGetMargin
:: IconViewClass self
=> self
-> IO Intreturns
iconViewSelectPath
:: IconViewClass self
=> self
-> TreePathpath - The TreePath to be selected.
-> IO ()
Selects the row at path.
iconViewUnselectPath
:: IconViewClass self
=> self
-> TreePathpath - The TreePath to be unselected.
-> IO ()
Unselects the row at path.
iconViewPathIsSelected
:: IconViewClass self
=> self
-> TreePathpath - A TreePath to check selection on.
-> IO Boolreturns True if path is selected.
Returns True if the icon pointed to by path is currently selected. If icon does not point to a valid location, False is returned.
iconViewGetSelectedItems
:: IconViewClass self
=> self
-> IO [TreePath]returns a list of TreePaths, one 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 {GtkTreeRowReference, FIXME: boxed type}s. To do this, you can use treeRowReferenceNew.
iconViewSelectAll :: IconViewClass self => self -> IO ()
Selects all the icons. iconView must has its selection mode set to SelectionMultiple.
iconViewUnselectAll :: IconViewClass self => self -> IO ()
Unselects all the icons.
iconViewItemActivated
:: IconViewClass self
=> self
-> TreePathpath - The TreePath to be activated
-> IO ()
Activates the item determined by path.
Attributes
iconViewSelectionMode :: IconViewClass self => Attr self SelectionMode

The ::selection-mode property specifies the selection mode of icon view. If the mode is SelectionMultiple, rubberband selection is enabled, for the other modes, only keyboard selection is possible.

Default value: SelectionSingle

iconViewPixbufColumn :: IconViewClass self => Attr self Int

The ::pixbuf-column property contains the number of the model column containing the pixbufs which are displayed. The pixbuf column must be of type pixbuf. Setting this property to -1 turns off the display of pixbufs.

Allowed values: >= -1

Default value: -1

iconViewTextColumn :: IconViewClass self => Attr self Int

The ::text-column property contains the number of the model column containing the texts which are displayed. The text column must be of type string. If this property and the :markup-column property are both set to -1, no texts are displayed.

Allowed values: >= -1

Default value: -1

iconViewMarkupColumn :: IconViewClass self => Attr self Int

The ::markup-column property contains the number of the model column containing markup information to be displayed. The markup column must be of 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.

Allowed values: >= -1

Default value: -1

iconViewModel :: (IconViewClass self, TreeModelClass model) => ReadWriteAttr self TreeModel model
The model for the icon view.
iconViewColumns :: IconViewClass self => Attr self Int

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.

Allowed values: >= -1

Default value: -1

iconViewItemWidth :: IconViewClass self => Attr self Int

The width used for each item.

Allowed values: >= -1

Default value: -1

iconViewSpacing :: IconViewClass self => Attr self Int

Space which is inserted between cells of an item.

Allowed values: >= 0

Default value: 0

iconViewRowSpacing :: IconViewClass self => Attr self Int

Space which is inserted between grid rows.

Allowed values: >= 0

Default value: 6

iconViewColumnSpacing :: IconViewClass self => Attr self Int

Space which is inserted between grid column.

Allowed values: >= 0

Default value: 6

iconViewMargin :: IconViewClass self => Attr self Int

Space which is inserted at the edges of the icon view.

Allowed values: >= 0

Default value: 6

iconViewOrientation :: IconViewClass self => Attr self Orientation

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

Default value: OrientationVertical

Signals
onSelectAll :: IconViewClass self => self -> IO () -> IO (ConnectId self)
afterSelectAll :: IconViewClass self => self -> IO () -> IO (ConnectId self)
onUnselectAll :: IconViewClass self => self -> IO () -> IO (ConnectId self)
afterUnselectAll :: IconViewClass self => self -> IO () -> IO (ConnectId self)
onSelectCursorItem :: IconViewClass self => self -> IO () -> IO (ConnectId self)
afterSelectCursorItem :: IconViewClass self => self -> IO () -> IO (ConnectId self)
onToggleCursorItem :: IconViewClass self => self -> IO () -> IO (ConnectId self)
afterToggleCursorItem :: IconViewClass self => self -> IO () -> IO (ConnectId self)
onActivateCursorItem :: IconViewClass self => self -> IO Bool -> IO (ConnectId self)
afterActivateCursorItem :: IconViewClass self => self -> IO Bool -> IO (ConnectId self)
Produced by Haddock version 0.7