|
Graphics.UI.Gtk.ModelView.IconView | Portability | portable (depends on GHC) | Stability | provisional | Maintainer | gtk2hs-users@lists.sourceforge.net |
|
|
|
|
|
Description |
A widget which displays a list of icons in a grid
- Module available since Gtk+ version 2.6
|
|
Synopsis |
|
|
|
|
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 | |
|
|
class ContainerClass o => IconViewClass o |
| Instances | |
|
|
castToIconView :: GObjectClass obj => obj -> IconView |
|
toIconView :: IconViewClass o => o -> IconView |
|
Constructors
|
|
iconViewNew :: IO IconView |
Creates a new IconView widget
|
|
iconViewNewWithModel |
|
|
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 |
|
|
iconViewGetSelectionMode |
|
|
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 |
|
|
iconViewGetColumns |
|
|
iconViewSetItemWidth |
|
|
iconViewGetItemWidth |
|
|
iconViewSetSpacing |
|
|
iconViewGetSpacing |
|
|
iconViewSetRowSpacing |
|
|
iconViewGetRowSpacing |
|
|
iconViewSetColumnSpacing |
|
|
iconViewGetColumnSpacing |
|
|
iconViewSetMargin |
|
|
iconViewGetMargin |
|
|
iconViewSelectPath |
|
|
iconViewUnselectPath |
|
|
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 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 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 |
|
|
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 0.8 |