Gtk2HsContentsIndex
Graphics.UI.Gtk.ModelView.CellRenderer
Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Contents
Detail
Class Hierarchy
Types
Attributes
Signals
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
cellMode :: CellRendererClass self => Attr self CellRendererMode
cellVisible :: CellRendererClass self => Attr self Bool
cellSensitive :: CellRendererClass self => Attr self Bool
cellXAlign :: CellRendererClass self => Attr self Float
cellYAlign :: CellRendererClass self => Attr self Float
cellXPad :: CellRendererClass self => Attr self Int
cellYPad :: CellRendererClass self => Attr self Int
cellWidth :: CellRendererClass self => Attr self Int
cellHeight :: CellRendererClass self => Attr self Int
cellIsExpander :: CellRendererClass self => Attr self Bool
cellIsExpanded :: CellRendererClass self => Attr self Bool
cellBackground :: CellRendererClass self => WriteAttr self String
cellBackgroundColor :: CellRendererClass self => Attr self Color
cellBackgroundSet :: CellRendererClass self => Attr self Bool
onEditingStarted :: CellRendererClass self => self -> (CellEditable -> TreePath -> IO ()) -> IO (ConnectId self)
afterEditingStarted :: CellRendererClass self => self -> (CellEditable -> TreePath -> IO ()) -> IO (ConnectId self)
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 by changing the Attributes. Then, the cell is measured and rendered in the correct location

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
 |               +----CellRendererCombo
 |               +----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
Attributes
cellMode :: CellRendererClass self => Attr self CellRendererMode

Editable mode of the CellRenderer.

Default value: CellRendererModeInert

cellVisible :: CellRendererClass self => Attr self Bool

Display the cell.

Default value: True

cellSensitive :: CellRendererClass self => Attr self Bool

Display the cell sensitive.

Default value: True

cellXAlign :: CellRendererClass self => Attr self Float

The x-align.

Allowed values: [0,1]

Default value: 0.5

cellYAlign :: CellRendererClass self => Attr self Float

The y-align.

Allowed values: [0,1]

Default value: 0.5

cellXPad :: CellRendererClass self => Attr self Int

The xpad.

Default value: 0

cellYPad :: CellRendererClass self => Attr self Int

The ypad.

Default value: 0

cellWidth :: CellRendererClass self => Attr self Int

The fixed width.

Allowed values: >= -1

Default value: -1

cellHeight :: CellRendererClass self => Attr self Int

The fixed height.

Allowed values: >= -1

Default value: -1

cellIsExpander :: CellRendererClass self => Attr self Bool

Row has children.

Default value: False

cellIsExpanded :: CellRendererClass self => Attr self Bool

Row is an expander row, and is expanded.

Default value: False

cellBackground :: CellRendererClass self => WriteAttr self String

Cell background color as a string.

Default value: ""

cellBackgroundColor :: CellRendererClass self => Attr self Color
Cell background color as a Color.
cellBackgroundSet :: CellRendererClass self => Attr self Bool

Whether the cellBackground / cellBackgroundColor attribute is set.

You can use this to reset the attribute to its default.

Default value: False

Signals
onEditingStarted :: CellRendererClass self => self -> (CellEditable -> TreePath -> IO ()) -> IO (ConnectId self)

This signal gets emitted when a cell starts to be edited.

  • The indended use of this signal is to do special setup on the widget that is created to allow the editing process. For example, the CellRendererText uses an Entry widget which has an EntryCompletion interface. On reception of this signal, the program can set the model from which to retrieve the completions.
afterEditingStarted :: CellRendererClass self => self -> (CellEditable -> TreePath -> IO ()) -> IO (ConnectId self)
Produced by Haddock version 0.8