{-# LINE 2 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}-- -*-haskell-*--- GIMP Toolkit (GTK) CellRendererText TreeView---- Author : Axel Simon---- Created: 23 May 2001---- Copyright (C) 1999-2006 Axel Simon---- This library is free software; you can redistribute it and/or-- modify it under the terms of the GNU Lesser General Public-- License as published by the Free Software Foundation; either-- version 2.1 of the License, or (at your option) any later version.---- This library is distributed in the hope that it will be useful,-- but WITHOUT ANY WARRANTY; without even the implied warranty of-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU-- Lesser General Public License for more details.---- |-- Maintainer : gtk2hs-users@lists.sourceforge.net-- Stability : provisional-- Portability : portable (depends on GHC)---- A 'CellRenderer' which displays a single-line text.--moduleGraphics.UI.Gtk.ModelView.CellRendererText(-- * 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'-- @-- * TypesCellRendererText,CellRendererTextClass,castToCellRendererText,gTypeCellRendererText,toCellRendererText,-- * ConstructorscellRendererTextNew,-- * MethodscellRendererTextSetFixedHeightFromFont,-- * AttributescellText,cellTextMarkup,--cellTextAttributes,cellTextSingleParagraphMode,cellTextBackground,cellTextBackgroundColor,cellTextBackgroundSet,cellTextForeground,cellTextForegroundColor,cellTextForegroundSet,cellTextEditable,cellTextEditableSet,cellTextFont,cellTextFontDesc,cellTextFamily,cellTextFamilySet,cellTextStyle,cellTextStyleSet,cellTextVariant,cellTextVariantSet,cellTextWeight,cellTextWeightSet,cellTextStretch,cellTextStretchSet,cellTextSize,cellTextSizePoints,cellTextSizeSet,cellTextScale,cellTextScaleSet,cellTextRise,cellTextRiseSet,cellTextStrikethrough,cellTextStrikethroughSet,cellTextUnderline,cellTextUnderlineSet,cellTextLanguage,cellTextLanguageSet,cellTextEllipsize,cellTextEllipsizeSet,cellTextWidthChars,cellTextWrapMode,cellTextWrapWidth,cellTextAlignment,-- * Signalsedited,-- * DeprecatedonEdited,afterEdited)whereimportControl.Monad(liftM)importSystem.Glib.FFIimportSystem.Glib.PropertiesimportSystem.Glib.Attributes(Attr,WriteAttr)importGraphics.UI.Gtk.Abstract.Object(makeNewObject)importGraphics.UI.Gtk.Types{-# LINE 128 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}importGraphics.UI.Gtk.Signals{-# LINE 129 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}importGraphics.UI.Gtk.ModelView.Types{-# LINE 130 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}importGraphics.UI.Gtk.General.Structs(Color(..))importGraphics.Rendering.Pango.EnumsimportGraphics.Rendering.Pango.BasicTypes(FontDescription(..),makeNewFontDescription)importGraphics.Rendering.Pango.Layout(LayoutAlignment,LayoutWrapMode){-# LINE 137 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}---------------------- Constructors-- | Create a new CellRendererText object.--cellRendererTextNew::IOCellRendererTextcellRendererTextNew=makeNewObjectmkCellRendererText$liftM(castPtr::PtrCellRenderer->PtrCellRendererText)$gtk_cell_renderer_text_new{-# LINE 148 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}---------------------- Methods-- | Sets the height of a renderer to explicitly be determined by the-- 'cellTextFont' and 'Graphics.UI.Gtk.ModelView.CellRenderer.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.--cellRendererTextSetFixedHeightFromFont::CellRendererTextClassself=>self->Int-- ^ @numberOfRows@ - Number of rows of text each cell renderer is-- allocated, or -1->IO()cellRendererTextSetFixedHeightFromFontselfnumberOfRows=(\(CellRendererTextarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_cell_renderer_text_set_fixed_height_from_fontargPtr1arg2){-# LINE 167 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}(toCellRendererTextself)(fromIntegralnumberOfRows)---------------------- Properties-- | Text background color as a string.---- Default value: @\"\"@--cellTextBackground::CellRendererClassself=>WriteAttrselfStringcellTextBackground=writeAttrFromStringProperty"background"-- | Text background color as a 'Color'.--cellTextBackgroundColor::CellRendererClassself=>AttrselfColorcellTextBackgroundColor=newAttrFromBoxedStorableProperty"background-gdk"gdk_color_get_type{-# LINE 186 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}-- | Whether the 'cellTextBackground'\/'cellTextBackgroundColor' attribute is set.---- Default value: @False@--cellTextBackgroundSet::CellRendererClassself=>AttrselfBoolcellTextBackgroundSet=newAttrFromBoolProperty"background-set"-- | Whether the text can be modified by the user.--cellTextEditable::CellRendererTextClassself=>AttrselfBoolcellTextEditable=newAttrFromBoolProperty"editable"-- | Whether the 'cellTextEditable' flag affects text editability.--cellTextEditableSet::CellRendererTextClassself=>AttrselfBoolcellTextEditableSet=newAttrFromBoolProperty"editable-set"-- | 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 'Graphics.Rendering.Pango.Enums.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.--cellTextEllipsize::CellRendererTextClassself=>AttrselfEllipsizeModecellTextEllipsize=newAttrFromEnumProperty"ellipsize"pango_ellipsize_mode_get_type{-# LINE 216 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}-- | Whether the 'cellTextEllipsize' tag affects the ellipsize mode.---- * Available in Gtk 2.6 or higher.--cellTextEllipsizeSet::CellRendererTextClassself=>AttrselfBoolcellTextEllipsizeSet=newAttrFromBoolProperty"ellipsize-set"-- | Name of the font family, e.g. Sans, Helvetica, Times, Monospace.--cellTextFamily::CellRendererTextClassself=>AttrselfStringcellTextFamily=newAttrFromStringProperty"family"-- | Determines if 'cellTextFamily' has an effect.--cellTextFamilySet::CellRendererTextClassself=>AttrselfBoolcellTextFamilySet=newAttrFromBoolProperty"family-set"-- | Font description as a string.--cellTextFont::CellRendererTextClassself=>AttrselfStringcellTextFont=newAttrFromStringProperty"font"-- | Font description as a 'Graphics.Rendering.Pango.FontDescription'.--cellTextFontDesc::CellRendererTextClassself=>AttrselfFontDescriptioncellTextFontDesc=newAttrFromBoxedOpaquePropertymakeNewFontDescription(\(FontDescriptionfd)act->withForeignPtrfdact)"font-desc"pango_font_description_get_type{-# LINE 246 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}-- | Text foreground color as a string.---- Default value: @\"\"@--cellTextForeground::CellRendererClassself=>WriteAttrselfStringcellTextForeground=writeAttrFromStringProperty"foreground"-- | Text foreground color as a 'Color'.--cellTextForegroundColor::CellRendererClassself=>AttrselfColorcellTextForegroundColor=newAttrFromBoxedStorableProperty"foreground-gdk"gdk_color_get_type{-# LINE 259 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}-- | Whether the 'cellTextForeground'\/'cellTextForegroundColor' attribute is set.---- Default value: @False@--cellTextForegroundSet::CellRendererClassself=>AttrselfBoolcellTextForegroundSet=newAttrFromBoolProperty"foreground-set"-- | 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.--cellTextLanguage::CellRendererTextClassself=>Attrself(MaybeString)cellTextLanguage=newAttrFromMaybeStringProperty"language"-- | Whether the 'cellTextLanguage' tag is used, default is @False@.--cellTextLanguageSet::CellRendererTextClassself=>AttrselfBoolcellTextLanguageSet=newAttrFromBoolProperty"language-set"-- | Define a markup string instead of a text. See 'cellText'.--cellTextMarkup::CellRendererTextClasscr=>WriteAttrcr(MaybeString)cellTextMarkup=writeAttrFromMaybeStringProperty"markup"-- %hash c:4e25 d:f7c6-- | Offset of text above the baseline (below the baseline if rise is-- negative).---- Allowed values: >= -2147483647---- Default value: 0--cellTextRise::CellRendererTextClassself=>AttrselfIntcellTextRise=newAttrFromIntProperty"rise"-- | Whether the 'cellTextRise' tag is used, default is @False@.--cellTextRiseSet::CellRendererTextClassself=>AttrselfBoolcellTextRiseSet=newAttrFromBoolProperty"rise-set"-- | Font scaling factor. Default is 1.--cellTextScale::CellRendererTextClassself=>AttrselfDoublecellTextScale=newAttrFromDoubleProperty"scale"-- | Whether the 'cellTextScale' tag is used, default is @False@.--cellTextScaleSet::CellRendererTextClassself=>AttrselfBoolcellTextScaleSet=newAttrFromBoolProperty"scale-set"-- %hash c:d85f d:9cfb-- | Whether or not to keep all text in a single paragraph.---- Default value: @False@--cellTextSingleParagraphMode::CellRendererTextClassself=>AttrselfBoolcellTextSingleParagraphMode=newAttrFromBoolProperty"single-paragraph-mode"-- | Font size in points.--cellTextSize::CellRendererTextClassself=>AttrselfDoublecellTextSize=newAttrFromDoubleProperty"size-points"-- %hash c:d281 d:3b0c-- | Font size in points.---- Allowed values: >= 0---- Default value: 0--cellTextSizePoints::CellRendererTextClassself=>AttrselfDoublecellTextSizePoints=newAttrFromDoubleProperty"size-points"-- | Whether the 'cellTextSize' tag is used, default is @False@.--cellTextSizeSet::CellRendererTextClassself=>AttrselfBoolcellTextSizeSet=newAttrFromBoolProperty"size-set"-- | Font stretch.--cellTextStretch::CellRendererTextClassself=>AttrselfStretchcellTextStretch=newAttrFromEnumProperty"stretch"pango_stretch_get_type{-# LINE 343 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}-- | Whether the 'cellTextStretch' tag is used, default is @False@.--cellTextStretchSet::CellRendererTextClassself=>AttrselfBoolcellTextStretchSet=newAttrFromBoolProperty"stretch-set"-- | Whether to strike through the text.--cellTextStrikethrough::CellRendererTextClassself=>AttrselfBoolcellTextStrikethrough=newAttrFromBoolProperty"strikethrough"-- | Whether the 'cellTextStrikethrough' tag is used, default is @False@.--cellTextStrikethroughSet::CellRendererTextClassself=>AttrselfBoolcellTextStrikethroughSet=newAttrFromBoolProperty"strikethrough-set"-- | Font style (e.g. normal or italics).--cellTextStyle::CellRendererTextClassself=>AttrselfFontStylecellTextStyle=newAttrFromEnumProperty"style"pango_style_get_type{-# LINE 364 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}-- | Whether the 'cellTextStyle' tag is used, default is @False@.--cellTextStyleSet::CellRendererTextClassself=>AttrselfBoolcellTextStyleSet=newAttrFromBoolProperty"style-set"-- | Define the attribute that specifies the text to be rendered. See-- also 'cellTextMarkup'.--cellText::CellRendererTextClasscr=>AttrcrStringcellText=newAttrFromStringProperty"text"-- | Style of underline for this text.--cellTextUnderline::CellRendererTextClassself=>AttrselfUnderlinecellTextUnderline=newAttrFromEnumProperty"underline"pango_underline_get_type{-# LINE 381 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}-- | Whether the 'cellTextUnderline' tag is used, default is @False@.--cellTextUnderlineSet::CellRendererTextClassself=>AttrselfBoolcellTextUnderlineSet=newAttrFromBoolProperty"underline-set"-- | Font variant (e.g. small caps).--cellTextVariant::CellRendererTextClassself=>AttrselfVariantcellTextVariant=newAttrFromEnumProperty"variant"pango_variant_get_type{-# LINE 392 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}-- | Whether the 'cellTextVariant' tag is used, default is @False@.--cellTextVariantSet::CellRendererTextClassself=>AttrselfBoolcellTextVariantSet=newAttrFromBoolProperty"variant-set"-- | Font weight, default: 400.--cellTextWeight::CellRendererTextClassself=>AttrselfIntcellTextWeight=newAttrFromIntProperty"weight"-- | Whether the 'cellTextWeight' tag is used, default is @False@.--cellTextWeightSet::CellRendererTextClassself=>AttrselfBoolcellTextWeightSet=newAttrFromBoolProperty"weight-set"-- | 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.--cellTextWidthChars::CellRendererTextClassself=>AttrselfIntcellTextWidthChars=newAttrFromIntProperty"width-chars"-- | 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.--cellTextWrapMode::CellRendererTextClassself=>AttrselfLayoutWrapModecellTextWrapMode=newAttrFromEnumProperty"wrap-mode"pango_wrap_mode_get_type{-# LINE 433 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}-- | 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.--cellTextWrapWidth::CellRendererTextClassself=>AttrselfIntcellTextWrapWidth=newAttrFromIntProperty"wrap-width"-- %hash c:a59c d:a84a-- | 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-- 'Graphics.UI.Gtk.ModelView.CellRenderer.cellXAlign' property of-- 'CellRenderer', on the other hand, sets the horizontal alignment of the-- whole text.---- Default value: 'Graphics.Rendering.Pango.Layout.AlignLeft'---- * Available since Gtk+ version 2.10--cellTextAlignment::CellRendererTextClassself=>AttrselfLayoutAlignmentcellTextAlignment=newAttrFromEnumProperty"alignment"pango_alignment_get_type{-# LINE 463 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}---------------------- Signals-- %hash c:a541 d:18f9-- | 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.--edited::CellRendererTextClassself=>Signalself(TreePath->String->IO())edited=SignalinternalEdited---------------------- Deprecated Signals-- %hash c:76edonEdited::CellRendererTextClassself=>self->(TreePath->String->IO())->IO(ConnectIdself)onEdited=internalEditedFalse{-# DEPRECATED onEdited "instead of 'onEdited obj' use 'on obj edited'" #-}-- %hash c:f70cafterEdited::CellRendererTextClassself=>self->(TreePath->String->IO())->IO(ConnectIdself)afterEdited=internalEditedTrue{-# DEPRECATED afterEdited "instead of 'afterEdited obj' use 'after obj edited'" #-}internalEdited::CellRendererTextClasscr=>Bool->cr->(TreePath->String->IO())->IO(ConnectIdcr)internalEditedaftercruser=connect_STRING_STRING__NONE"edited"aftercr$\pathstring->douser(stringToTreePathpath)stringforeignimportccallunsafe"gtk_cell_renderer_text_new"gtk_cell_renderer_text_new::(IO(PtrCellRenderer))foreignimportccallsafe"gtk_cell_renderer_text_set_fixed_height_from_font"gtk_cell_renderer_text_set_fixed_height_from_font::((PtrCellRendererText)->(CInt->(IO())))foreignimportccallunsafe"gdk_color_get_type"gdk_color_get_type::CUIntforeignimportccallsafe"pango_ellipsize_mode_get_type"pango_ellipsize_mode_get_type::CUIntforeignimportccallunsafe"pango_font_description_get_type"pango_font_description_get_type::CUIntforeignimportccallsafe"pango_stretch_get_type"pango_stretch_get_type::CUIntforeignimportccallsafe"pango_style_get_type"pango_style_get_type::CUIntforeignimportccallsafe"pango_underline_get_type"pango_underline_get_type::CUIntforeignimportccallsafe"pango_variant_get_type"pango_variant_get_type::CUIntforeignimportccallsafe"pango_wrap_mode_get_type"pango_wrap_mode_get_type::CUIntforeignimportccallunsafe"pango_alignment_get_type"pango_alignment_get_type::CUInt