Gtk2HsContentsIndex
Graphics.UI.Gtk.ModelView.CellRendererText
Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Contents
Detail
Types
Constructors
Methods
Attributes
Signals
Description
A CellRenderer which displays a single-line text.
Synopsis
data CellRendererText
class CellRendererClass o => CellRendererTextClass o
castToCellRendererText :: GObjectClass obj => obj -> CellRendererText
toCellRendererText :: CellRendererTextClass o => o -> CellRendererText
cellRendererTextNew :: IO CellRendererText
cellRendererTextSetFixedHeightFromFont :: CellRendererTextClass self => self -> Int -> IO ()
cellTextBackground :: CellRendererClass self => WriteAttr self String
cellTextBackgroundColor :: CellRendererClass self => Attr self Color
cellTextBackgroundSet :: CellRendererClass self => Attr self Bool
cellEditable :: CellRendererTextClass self => Attr self Bool
cellEditableSet :: CellRendererTextClass self => Attr self Bool
cellEllipsize :: CellRendererTextClass self => Attr self EllipsizeMode
cellEllipsizeSet :: CellRendererTextClass self => Attr self Bool
cellFamily :: CellRendererTextClass self => Attr self String
cellFamilySet :: CellRendererTextClass self => Attr self Bool
cellFont :: CellRendererTextClass self => Attr self String
cellFontDesc :: CellRendererTextClass self => Attr self FontDescription
cellTextForeground :: CellRendererClass self => WriteAttr self String
cellTextForegroundColor :: CellRendererClass self => Attr self Color
cellTextForegroundSet :: CellRendererClass self => Attr self Bool
cellLanguage :: CellRendererTextClass self => Attr self (Maybe String)
cellLanguageSet :: CellRendererTextClass self => Attr self Bool
cellMarkup :: CellRendererTextClass cr => WriteAttr cr (Maybe String)
cellRise :: CellRendererTextClass self => Attr self Int
cellRiseSet :: CellRendererTextClass self => Attr self Bool
cellScale :: CellRendererTextClass self => Attr self Double
cellScaleSet :: CellRendererTextClass self => Attr self Bool
cellSingleParagraphMode :: CellRendererTextClass self => Attr self Bool
cellSize :: CellRendererTextClass self => Attr self Double
cellStretch :: CellRendererTextClass self => Attr self Stretch
cellStretchSet :: CellRendererTextClass self => Attr self Bool
cellStrikethrough :: CellRendererTextClass self => Attr self Bool
cellStrikethroughSet :: CellRendererTextClass self => Attr self Bool
cellStyle :: CellRendererTextClass self => Attr self FontStyle
cellStyleSet :: CellRendererTextClass self => Attr self Bool
cellText :: CellRendererTextClass cr => Attr cr String
cellUnderline :: CellRendererTextClass self => Attr self Underline
cellUnderlineSet :: CellRendererTextClass self => Attr self Bool
cellVariant :: CellRendererTextClass self => Attr self Variant
cellVariantSet :: CellRendererTextClass self => Attr self Bool
cellWeight :: CellRendererTextClass self => Attr self Int
cellWeightSet :: CellRendererTextClass self => Attr self Bool
cellWidthChars :: CellRendererTextClass self => Attr self Int
cellWrapMode :: CellRendererTextClass self => Attr self LayoutWrapMode
cellWrapWidth :: CellRendererTextClass self => Attr self Int
onEdited :: CellRendererTextClass cr => cr -> (TreePath -> String -> IO ()) -> IO (ConnectId cr)
afterEdited :: CellRendererTextClass cr => cr -> (TreePath -> String -> IO ()) -> IO (ConnectId cr)
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.

Types
data CellRendererText
show/hide Instances
class CellRendererClass o => CellRendererTextClass o
show/hide Instances
castToCellRendererText :: GObjectClass obj => obj -> CellRendererText
toCellRendererText :: CellRendererTextClass o => o -> CellRendererText
Constructors
cellRendererTextNew :: IO CellRendererText
Create a new CellRendererText object.
Methods
cellRendererTextSetFixedHeightFromFont
:: CellRendererTextClass self
=> self
-> IntnumberOfRows - 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
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' attribute is set.

Default value: False

cellEditable :: CellRendererTextClass self => Attr self Bool
Whether the text can be modified by the user.
cellEditableSet :: CellRendererTextClass self => Attr self Bool
Whether the cellEditable flag affects text editability.
cellEllipsize :: 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 cellWrapWidth property for another way of making the text fit into a given width.

  • Available in Gtk 2.6 or higher.
cellEllipsizeSet :: CellRendererTextClass self => Attr self Bool

Whether the cellEllipsize tag affects the ellipsize mode.

  • Available in Gtk 2.6 or higher.
cellFamily :: CellRendererTextClass self => Attr self String
Name of the font family, e.g. Sans, Helvetica, Times, Monospace.
cellFamilySet :: CellRendererTextClass self => Attr self Bool
Determines if cellFamily has an effect.
cellFont :: CellRendererTextClass self => Attr self String
Font description as a string.
cellFontDesc :: CellRendererTextClass self => Attr self FontDescription
Font description as a FontDescription.
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' attribute is set.

Default value: False

cellLanguage :: 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.
cellLanguageSet :: CellRendererTextClass self => Attr self Bool
Whether the cellLanguage tag is used, default is False.
cellMarkup :: CellRendererTextClass cr => WriteAttr cr (Maybe String)
Define a markup string instead of a text. See cellText.
cellRise :: CellRendererTextClass self => Attr self Int
Offset of text above the baseline (below the baseline if rise is negative).
cellRiseSet :: CellRendererTextClass self => Attr self Bool
Whether the cellRise tag is used, default is False.
cellScale :: CellRendererTextClass self => Attr self Double
Font scaling factor. Default is 1.
cellScaleSet :: CellRendererTextClass self => Attr self Bool
Whether the cellScale tag is used, default is False.
cellSingleParagraphMode :: CellRendererTextClass self => Attr self Bool
Whether or not to keep all text in a single paragraph.
cellSize :: CellRendererTextClass self => Attr self Double
Font size in points.
cellStretch :: CellRendererTextClass self => Attr self Stretch
Font stretch.
cellStretchSet :: CellRendererTextClass self => Attr self Bool
Whether the cellStretch tag is used, default is False.
cellStrikethrough :: CellRendererTextClass self => Attr self Bool
Whether to strike through the text.
cellStrikethroughSet :: CellRendererTextClass self => Attr self Bool
Whether the cellStrikethrough tag is used, default is False.
cellStyle :: CellRendererTextClass self => Attr self FontStyle
Font style (e.g. normal or italics).
cellStyleSet :: CellRendererTextClass self => Attr self Bool
Whether the cellStyle tag is used, default is False.
cellText :: CellRendererTextClass cr => Attr cr String
Define the attribute that specifies the text to be rendered. See also cellMarkup.
cellUnderline :: CellRendererTextClass self => Attr self Underline
Style of underline for this text.
cellUnderlineSet :: CellRendererTextClass self => Attr self Bool
Whether the cellUnderline tag is used, default is False.
cellVariant :: CellRendererTextClass self => Attr self Variant
Font variant (e.g. small caps).
cellVariantSet :: CellRendererTextClass self => Attr self Bool
Whether the cellVariant tag is used, default is False.
cellWeight :: CellRendererTextClass self => Attr self Int
Font weight, default: 400.
cellWeightSet :: CellRendererTextClass self => Attr self Bool
Whether the cellWeight tag is used, default is False.
cellWidthChars :: 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.
cellWrapMode :: 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 cellWrapWidth property is set.

  • Available in Gtk 2.8 or higher.
cellWrapWidth :: 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.
Signals
onEdited :: CellRendererTextClass cr => cr -> (TreePath -> String -> IO ()) -> IO (ConnectId cr)

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 CellRendererText renderers and CellRendererCombo when the combo box accepts additional entries. If the combo box has a predefined set of possible selections, the string that this handler receives is always empty. In this case the handler of this signal needs to query the currently selected index of the combo box and store that index in the model of this cell renderer. The only time this combo box is passed to the user program is in the onEditingStarted signal of the CellRenderer base class. Hence, when this handler is run, the handler to store the resulting value needs to be installed using this function. See the user manual for an example of this.
  • This signal is not emitted when editing is disabled (see cellEditable) or when the user aborts editing.
afterEdited :: CellRendererTextClass cr => cr -> (TreePath -> String -> IO ()) -> IO (ConnectId cr)
Produced by Haddock version 0.8