gtk-0.12.4: Binding to the Gtk+ graphical user interface library.

Portability | portable (depends on GHC)
Stability | provisional
Maintainer | gtk2hs-users@lists.sourceforge.net
Safe Haskell | None

Graphics.UI.Gtk.ModelView.CellRendererText

Contents

- Detail
- Class Hierarchy
- Types
- Constructors
- Methods
- Attributes
- Signals
- Deprecated

Description

A `CellRenderer` which displays a single-line text.

Synopsis

- data CellRendererText
- class CellRendererClass o => CellRendererTextClass o
- castToCellRendererText :: GObjectClass obj => obj -> CellRendererText
- gTypeCellRendererText :: GType
- toCellRendererText :: CellRendererTextClass o => o -> CellRendererText
- cellRendererTextNew :: IO CellRendererText
- cellRendererTextSetFixedHeightFromFont :: CellRendererTextClass self => self -> Int -> IO ()
- cellText :: CellRendererTextClass cr => Attr cr String
- cellTextMarkup :: CellRendererTextClass cr => WriteAttr cr (Maybe String)
- cellTextSingleParagraphMode :: CellRendererTextClass self => Attr self Bool
- cellTextBackground :: CellRendererClass self => WriteAttr self String
- cellTextBackgroundColor :: CellRendererClass self => Attr self Color
- cellTextBackgroundSet :: CellRendererClass self => Attr self Bool
- cellTextForeground :: CellRendererClass self => WriteAttr self String
- cellTextForegroundColor :: CellRendererClass self => Attr self Color
- cellTextForegroundSet :: CellRendererClass self => Attr self Bool
- cellTextEditable :: CellRendererTextClass self => Attr self Bool
- cellTextEditableSet :: CellRendererTextClass self => Attr self Bool
- cellTextFont :: CellRendererTextClass self => Attr self String
- cellTextFontDesc :: CellRendererTextClass self => Attr self FontDescription
- cellTextFamily :: CellRendererTextClass self => Attr self String
- cellTextFamilySet :: CellRendererTextClass self => Attr self Bool
- cellTextStyle :: CellRendererTextClass self => Attr self FontStyle
- cellTextStyleSet :: CellRendererTextClass self => Attr self Bool
- cellTextVariant :: CellRendererTextClass self => Attr self Variant
- cellTextVariantSet :: CellRendererTextClass self => Attr self Bool
- cellTextWeight :: CellRendererTextClass self => Attr self Int
- cellTextWeightSet :: CellRendererTextClass self => Attr self Bool
- cellTextStretch :: CellRendererTextClass self => Attr self Stretch
- cellTextStretchSet :: CellRendererTextClass self => Attr self Bool
- cellTextSize :: CellRendererTextClass self => Attr self Double
- cellTextSizePoints :: CellRendererTextClass self => Attr self Double
- cellTextSizeSet :: CellRendererTextClass self => Attr self Bool
- cellTextScale :: CellRendererTextClass self => Attr self Double
- cellTextScaleSet :: CellRendererTextClass self => Attr self Bool
- cellTextRise :: CellRendererTextClass self => Attr self Int
- cellTextRiseSet :: CellRendererTextClass self => Attr self Bool
- cellTextStrikethrough :: CellRendererTextClass self => Attr self Bool
- cellTextStrikethroughSet :: CellRendererTextClass self => Attr self Bool
- cellTextUnderline :: CellRendererTextClass self => Attr self Underline
- cellTextUnderlineSet :: CellRendererTextClass self => Attr self Bool
- cellTextLanguage :: CellRendererTextClass self => Attr self (Maybe String)
- cellTextLanguageSet :: CellRendererTextClass self => Attr self Bool
- cellTextEllipsize :: CellRendererTextClass self => Attr self EllipsizeMode
- cellTextEllipsizeSet :: CellRendererTextClass self => Attr self Bool
- cellTextWidthChars :: CellRendererTextClass self => Attr self Int
- cellTextWrapMode :: CellRendererTextClass self => Attr self LayoutWrapMode
- cellTextWrapWidth :: CellRendererTextClass self => Attr self Int
- cellTextAlignment :: CellRendererTextClass self => Attr self LayoutAlignment
- edited :: CellRendererTextClass self => Signal self (TreePath -> String -> IO ())
- onEdited :: CellRendererTextClass self => self -> (TreePath -> String -> IO ()) -> IO (ConnectId self)
- afterEdited :: CellRendererTextClass self => self -> (TreePath -> String -> IO ()) -> IO (ConnectId self)

# Detail

A `CellRendererText` renders a given text in its cell, using the font, color and style information provided by its attributes. The text will be ellipsized if it is too long and the ellipsize property allows it.

If the `cellMode` is `CellRendererModeEditable`, the `CellRendererText` allows the user to edit its text using an `Entry` widget.

# Class Hierarchy

     | GObject
     | +----Object
     | +----CellRenderer
     | +----CellRendererText
     | +----CellRendererCombo

# Types

data CellRendererText

Instances

Eq CellRendererText |
Ord CellRendererText |
GObjectClass CellRendererText |
CellRendererTextClass CellRendererText |
CellRendererClass CellRendererText |
ObjectClass CellRendererText |

class CellRendererClass o => CellRendererTextClass o

Instances

CellRendererTextClass CellRendererCombo |
CellRendererTextClass CellRendererSpin |
CellRendererTextClass CellRendererAccel |
CellRendererTextClass CellRendererText |

castToCellRendererText :: GObjectClass obj => obj -> CellRendererText

gTypeCellRendererText :: GType

toCellRendererText :: CellRendererTextClass o => o -> CellRendererText

# Constructors

cellRendererTextNew :: IO CellRendererText

Create a new CellRendererText object.

# Methods

cellRendererTextSetFixedHeightFromFont

Arguments

:: CellRendererTextClass self |
=> self |
-> Int | `numberOfRows` - Number of rows of text each cell renderer is allocated, or -1
-> IO () |

Sets the height of a renderer to explicitly be determined by the `cellTextFont` and `cellYPad` attribute set on it. Further changes in these properties do not affect the height, so they must be accompanied by a subsequent call to this function. Using this function is unflexible, and should really only be used if calculating the size of a cell is too slow (ie, a massive number of cells displayed). If `numberOfRows` is -1, then the fixed height is unset, and the height is determined by the properties again.

# Attributes

cellText :: CellRendererTextClass cr => Attr cr String

Define the attribute that specifies the text to be rendered. See also `cellTextMarkup`.

cellTextMarkup :: CellRendererTextClass cr => WriteAttr cr (Maybe String)

Define a markup string instead of a text. See `cellText`.

cellTextSingleParagraphMode :: CellRendererTextClass self => Attr self Bool

Whether or not to keep all text in a single paragraph.

Default value: `False`

cellTextBackground :: CellRendererClass self => WriteAttr self String

Text background color as a string.

Default value: `""`

cellTextBackgroundColor :: CellRendererClass self => Attr self Color

Text background color as a `Color`.

cellTextBackgroundSet :: CellRendererClass self => Attr self Bool

Whether the 'cellTextBackground'\/'cellTextBackgroundColor' attribute is set.

Default value: `False`

cellTextForeground :: CellRendererClass self => WriteAttr self String

Text foreground color as a string.

Default value: `""`

cellTextForegroundColor :: CellRendererClass self => Attr self Color

Text foreground color as a `Color`.

cellTextForegroundSet :: CellRendererClass self => Attr self Bool

Whether the 'cellTextForeground'\/'cellTextForegroundColor' attribute is set.

Default value: `False`

cellTextEditable :: CellRendererTextClass self => Attr self Bool

Whether the text can be modified by the user.

cellTextEditableSet :: CellRendererTextClass self => Attr self Bool

Whether the `cellTextEditable` flag affects text editability.

cellTextFont :: CellRendererTextClass self => Attr self String

Font description as a string.

cellTextFontDesc :: CellRendererTextClass self => Attr self FontDescription

Font description as a `FontDescription`.

cellTextFamily :: CellRendererTextClass self => Attr self String

Name of the font family, e.g. Sans, Helvetica, Times, Monospace.

cellTextFamilySet :: CellRendererTextClass self => Attr self Bool

Determines if `cellTextFamily` has an effect.

cellTextStyle :: CellRendererTextClass self => Attr self FontStyle

Font style (e.g. normal or italics).

cellTextStyleSet :: CellRendererTextClass self => Attr self Bool

Whether the `cellTextStyle` tag is used, default is `False`.

cellTextVariant :: CellRendererTextClass self => Attr self Variant

Font variant (e.g. small caps).

cellTextVariantSet :: CellRendererTextClass self => Attr self Bool

Whether the `cellTextVariant` tag is used, default is `False`.

cellTextWeight :: CellRendererTextClass self => Attr self Int

Font weight, default: 400.

cellTextWeightSet :: CellRendererTextClass self => Attr self Bool

Whether the `cellTextWeight` tag is used, default is `False`.

cellTextStretch :: CellRendererTextClass self => Attr self Stretch

Font stretch.

cellTextStretchSet :: CellRendererTextClass self => Attr self Bool

Whether the `cellTextStretch` tag is used, default is `False`.

cellTextSize :: CellRendererTextClass self => Attr self Double

Font size in points.

cellTextSizePoints :: CellRendererTextClass self => Attr self Double

Font size in points.

Allowed values: >= 0

Default value: 0

cellTextSizeSet :: CellRendererTextClass self => Attr self Bool

Whether the `cellTextSize` tag is used, default is `False`.

cellTextScale :: CellRendererTextClass self => Attr self Double

Font scaling factor. Default is 1.

cellTextScaleSet :: CellRendererTextClass self => Attr self Bool

Whether the `cellTextScale` tag is used, default is `False`.

cellTextRise :: CellRendererTextClass self => Attr self Int

Offset of text above the baseline (below the baseline if rise is negative).

Allowed values: >= -2147483647

Default value: 0

cellTextRiseSet :: CellRendererTextClass self => Attr self Bool

Whether the `cellTextRise` tag is used, default is `False`.

cellTextStrikethrough :: CellRendererTextClass self => Attr self Bool

Whether to strike through the text.

cellTextStrikethroughSet :: CellRendererTextClass self => Attr self Bool

Whether the `cellTextStrikethrough` tag is used, default is `False`.

cellTextUnderline :: CellRendererTextClass self => Attr self Underline

Style of underline for this text.

cellTextUnderlineSet :: CellRendererTextClass self => Attr self Bool

Whether the `cellTextUnderline` tag is used, default is `False`.

cellTextLanguage :: CellRendererTextClass self => Attr self (Maybe String)

The language this text is in, as an ISO code. Pango can use this as a hint when rendering the text. If you don't understand this parameter, you probably don't need it.

cellTextLanguageSet :: CellRendererTextClass self => Attr self Bool

Whether the `cellTextLanguage` tag is used, default is `False`.

cellTextEllipsize :: CellRendererTextClass self => Attr self EllipsizeMode

Specifies the preferred place to ellipsize the string, if the cell renderer does not have enough room to display the entire string. Setting it to `EllipsizeNone` turns off ellipsizing. See the `cellTextWrapWidth` property for another way of making the text fit into a given width.

- Available in Gtk 2.6 or higher.

cellTextEllipsizeSet :: CellRendererTextClass self => Attr self Bool

Whether the `cellTextEllipsize` tag affects the ellipsize mode.

- Available in Gtk 2.6 or higher.

cellTextWidthChars :: CellRendererTextClass self => Attr self Int

The desired width of the cell, in characters. If this property is set to `-1`, the width will be calculated automatically, otherwise the cell will request either 3 characters or the property value, whichever is greater.

- Available in Gtk 2.6 or higher.

cellTextWrapMode :: CellRendererTextClass self => Attr self LayoutWrapMode

Specifies how to break the string into multiple lines, if the cell renderer does not have enough room to display the entire string. This property has no effect unless the `cellTextWrapWidth` property is set.

- Available in Gtk 2.8 or higher.

cellTextWrapWidth :: CellRendererTextClass self => Attr self Int

Specifies the width at which the text is wrapped. The wrap-mode property can be used to influence at what character positions the line breaks can be placed. Setting wrap-width to `-1` turns wrapping off.

- Available in Gtk 2.8 or higher.

cellTextAlignment :: CellRendererTextClass self => Attr self LayoutAlignment

Specifies how to align the lines of text with respect to each other.

Note that this property describes how to align the lines of text in case there are several of them. The `cellXAlign` property of `CellRenderer`, on the other hand, sets the horizontal alignment of the whole text.

Default value: `AlignLeft`

- Available since Gtk+ version 2.10

# Signals

edited :: CellRendererTextClass self => Signal self (TreePath -> String -> IO ())

Emitted when the user finished editing a cell.

Whenever editing is finished successfully, this signal is emitted which indicates that the model should be updated with the supplied value. The value is always a string which matches the `cellText` attribute of `CellRendererText` (and its derivates like `CellRendererCombo`).

- This signal is not emitted when editing is disabled (see `cellTextEditable`) or when the user aborts editing.

# Deprecated

onEdited :: CellRendererTextClass self => self -> (TreePath -> String -> IO ()) -> IO (ConnectId self)

Deprecated: instead of 'onEdited obj' use 'on obj edited'

afterEdited :: CellRendererTextClass self => self -> (TreePath -> String -> IO ()) -> IO (ConnectId self)

Deprecated: instead of 'afterEdited obj' use 'after obj edited'