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

A CellRenderer is an object that determines how the cell of a TreeView widget is displayed.

Synopsis
data CellRenderer
class ObjectClass o => CellRendererClass o
castToCellRenderer :: GObjectClass obj => obj -> CellRenderer
toCellRenderer :: CellRendererClass o => o -> CellRenderer
data Attribute cr a = Attribute [String] [TMType] (a -> IO [GenericValue]) ([GenericValue] -> IO a)
cellRendererSet :: CellRendererClass cr => cr -> Attribute cr val -> val -> IO ()
cellRendererGet :: CellRendererClass cr => cr -> Attribute cr val -> IO val
Detail

The CellRenderer is a base class of a set of objects used for rendering a cell to a Drawable. These objects are used primarily by the TreeView widget, though they aren't tied to them in any specific way. It is worth noting that CellRenderer is not a Widget and cannot be treated as such.

The primary use of a CellRenderer is for drawing a certain graphical elements on a Drawable. Typically, one cell renderer is used to draw many cells on the screen. To this extent, it isn't expected that a CellRenderer keep any permanent state around. Instead, any state is set just prior to use using GObjects property system. Then, the cell is measured using cellRendererGetSize. Finally, the cell is rendered in the correct location using cellRendererRender.

Beyond merely rendering a cell, cell renderers can optionally provide active user interface elements. A cell renderer can be activatable like CellRendererToggle, which toggles when it gets activated by a mouse click, or it can be editable like CellRendererText, which allows the user to edit the text using a Entry.

Class Hierarchy
 |  GObject
 |   +----Object
 |         +----CellRenderer
 |               +----CellRendererText
 |               +----CellRendererPixbuf
 |               +----CellRendererProgress
 |               +----CellRendererToggle
 
Types
data CellRenderer
show/hide Instances
class ObjectClass o => CellRendererClass o
show/hide Instances
castToCellRenderer :: GObjectClass obj => obj -> CellRenderer
toCellRenderer :: CellRendererClass o => o -> CellRenderer
data Attribute cr a

Definition of the Attribute data type.

Constructors
Attribute [String] [TMType] (a -> IO [GenericValue]) ([GenericValue] -> IO a)
Methods
cellRendererSet :: CellRendererClass cr => cr -> Attribute cr val -> val -> IO ()

Set a property statically.

cellRendererGet :: CellRendererClass cr => cr -> Attribute cr val -> IO val

Get a static property.

Produced by Haddock version 0.8