| Gtk2Hs | Contents | Index

Graphics.UI.Gtk.TreeList.IconView

Portability | portable (depends on GHC)
Stability | provisional
Maintainer | gtk2hs-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
- This module and all other modules in Graphics.UI.Gtk.TreeList are deprecated. Please use the modules in Graphics.UI.Gtk.ModelView.

Synopsis

data IconView
class ContainerClass o => IconViewClass o
castToIconView :: GObjectClass obj => obj -> IconView
toIconView :: IconViewClass o => o -> IconView
iconViewNew :: IO IconView
iconViewNewWithModel :: TreeModelClass model => model -> IO IconView
iconViewSetModel :: (IconViewClass self, TreeModelClass model) => self -> Maybe model -> IO ()
iconViewGetModel :: IconViewClass self => self -> IO (Maybe 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 (Maybe TreeModel) (Maybe 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

Instances

GObjectClass IconView
CellLayoutClass IconView
CellLayoutClass IconView
IconViewClass IconView
ContainerClass IconView
WidgetClass IconView
ObjectClass IconView

class ContainerClass o => IconViewClass o

Instances

IconViewClass IconView

castToIconView :: GObjectClass obj => obj -> IconView
toIconView :: IconViewClass o => o -> IconView
Constructors
iconViewNew :: IO IconView
Creates a new `IconView` widget
iconViewNewWithModel

:: TreeModelClass model |
=> model | `model` - The model.
-> IO IconView |
Creates a new `IconView` widget with the model `model`.

Methods
iconViewSetModel

:: (IconViewClass self, TreeModelClass model) |
=> self |
-> Maybe model | `model` - 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 `Nothing`, then it will unset the old model.

iconViewGetModel

:: IconViewClass self |
=> self |
-> IO (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.

iconViewSetTextColumn

:: IconViewClass self |
=> self |
-> Int | `column` - 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 Int | returns the text column, or -1 if it's unset.
Returns the column with text for `iconView`.

iconViewSetMarkupColumn

:: IconViewClass self |
=> self |
-> Int | `column` - 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 string. If the markup column is set to something, it overrides the text column set by `iconViewSetTextColumn`.

iconViewGetMarkupColumn

:: IconViewClass self |
=> self |
-> IO Int | returns the markup column, or -1 if it's unset.
Returns the column with markup text for `iconView`.

iconViewSetPixbufColumn

:: IconViewClass self |
=> self |
-> Int | `column` - 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 Int | returns the pixbuf column, or -1 if it's unset.
Returns the column with pixbufs for `iconView`.

iconViewGetPathAtPos

:: IconViewClass self |
=> self |
-> Int | `x` - The x position to be identified
-> Int | `y` - The y position to be identified
-> IO TreePath | returns 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 |
-> SelectionMode | `mode` - The selection mode
-> IO () |
Sets the selection mode of the `iconView`.

iconViewGetSelectionMode

:: IconViewClass self |
=> self |
-> IO SelectionMode | returns the current selection mode
Gets the selection mode of the `iconView`.

iconViewSetOrientation

:: IconViewClass self |
=> self |
-> Orientation | `orientation` - 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 Orientation | returns 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 |
-> Int | `columns` -
-> IO () |

iconViewGetColumns

:: IconViewClass self |
=> self |
-> IO Int | returns

iconViewSetItemWidth

:: IconViewClass self |
=> self |
-> Int | `itemWidth` -
-> IO () |

iconViewGetItemWidth

:: IconViewClass self |
=> self |
-> IO Int | returns

iconViewSetSpacing

:: IconViewClass self |
=> self |
-> Int | `spacing` -
-> IO () |

iconViewGetSpacing

:: IconViewClass self |
=> self |
-> IO Int | returns

iconViewSetRowSpacing

:: IconViewClass self |
=> self |
-> Int | `rowSpacing` -
-> IO () |

iconViewGetRowSpacing

:: IconViewClass self |
=> self |
-> IO Int | returns

iconViewSetColumnSpacing

:: IconViewClass self |
=> self |
-> Int | `columnSpacing` -
-> IO () |

iconViewGetColumnSpacing

:: IconViewClass self |
=> self |
-> IO Int | returns

iconViewSetMargin

:: IconViewClass self |
=> self |
-> Int | `margin` -
-> IO () |

iconViewGetMargin

:: IconViewClass self |
=> self |
-> IO Int | returns

iconViewSelectPath

:: IconViewClass self |
=> self |
-> TreePath | `path` - The `TreePath` to be selected.
-> IO () |
Selects the row at `path`.

iconViewUnselectPath

:: IconViewClass self |
=> self |
-> TreePath | `path` - The `TreePath` to be unselected.
-> IO () |
Unselects the row at `path`.

iconViewPathIsSelected

:: IconViewClass self |
=> self |
-> TreePath | `path` - A `TreePath` to check selection on.
-> IO Bool | returns `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 `TreePath`s, 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 TreeRowReferences. 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 |
-> TreePath | `path` - 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 (Maybe TreeModel) (Maybe 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 2.4.2