From: Axel S. <A....@ke...> - 2006-03-26 12:55:53
|
Sun Mar 19 10:52:07 PST 2006 Axel Simon <A....@ke...> * Extend CellRenderers. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRenderer.chs 222 +-- | 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. +-- +onEditingStarted, afterEditingStarted :: CellRendererClass self => self + -> (CellEditable -> TreePath -> IO ()) + -> IO (ConnectId self) +onEditingStarted cr act = connect_OBJECT_PTR__NONE "editing-started" False cr + $ \ce strPtr -> peekTreePath strPtr >>= act ce +afterEditingStarted cr act = connect_OBJECT_PTR__NONE "editing-started" True cr + $ \ce strPtr -> peekTreePath strPtr >>= act ce hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 38 - +-- hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 65 + cellEditable, + cellEditableSet, +#if GTK_CHECK_VERSION(2,6,0) + cellEllipsize, + cellEllipsizeSet, +#endif + cellFamily, + cellFamilySet, + cellFont, + cellFontDesc, hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 78 - cellTextEditable, - cellTextEditableSet, - cellTextFont, --- cellTextFontDescription, - cellTextFamily, - cellTextFamilySet, - cellTextStyle, - cellTextStyleSet, - cellTextVariant, - cellTextVariantSet, - cellTextWeight, - cellTextWeightSet, - cellTextStretch, - cellTextStretchSet, - cellTextSize, - cellTextSizeSet, - cellTextSizePoints, - cellTextScale, - cellTextScaleSet, - cellTextRise, - cellTextRiseSet, - cellTextStrikethrough, - cellTextStrikethroughSet, - cellTextUnderline, - cellTextUnderlineSet, - cellTextLanguage, - cellTextLanguageSet, + cellLanguage, + cellLanguageSet, + cellMarkup, + cellRise, + cellRiseSet, + cellScale, + cellScaleSet, + cellSingleParagraphMode, + cellSize, + cellStretch, + cellStretchSet, + cellStrikethrough, + cellStrikethroughSet, + cellStyle, + cellStyleSet, + cellText, + cellUnderline, + cellUnderlineSet, + cellVariant, + cellVariantSet, + cellWeight, + cellWeightSet, hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 101 - cellTextEllipsize, - cellTextEllipsizeSet, - cellTextWidthChars, + cellWidthChars, hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 104 - cellTextWrapMode, - cellTextWrapWidth, + cellWrapMode, + cellWrapWidth, hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 118 -import System.Glib.Attributes (Attr, WriteAttr) +import System.Glib.Attributes ( Attr, WriteAttr, ReadAttr ) hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 122 -{#import Graphics.UI.Gtk.TreeList.TreeIter#} -import Graphics.UI.Gtk.General.Structs (treeIterSize) +{#import Graphics.UI.Gtk.TreeList.TreePath#} +import Graphics.UI.Gtk.General.Structs (Color(..)) hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 125 -import Graphics.UI.Gtk.General.Enums (WrapMode) -import Graphics.UI.Gtk.Gdk.GC (Color) +{#import Graphics.UI.Gtk.Pango.Types#} ( FontDescription(..), + makeNewFontDescription ) +import Graphics.UI.Gtk.Pango.Layout ( LayoutWrapMode ) hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 162 + hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 165 --- Attributes - --- | Text to render. --- --- Default value: @\"\"@ --- -cellText :: CellRendererTextClass self => Attr self String -cellText = newAttrFromStringProperty "text" - --- | Define a markup string instead of a text. --- --- Default value: @\"\"@ --- -cellMarkup :: CellRendererTextClass self => WriteAttr self String -cellMarkup = writeAttrFromStringProperty "markup" - --- | Whether or not to keep all text in a single paragraph. --- --- Default value: @False@ --- -cellTextSingleParagraphMode :: CellRendererTextClass self => Attr self Bool -cellTextSingleParagraphMode = newAttrFromBoolProperty "single-paragraph-mode" +-- Properties hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 171 -cellTextBackground :: CellRendererTextClass self => WriteAttr self String -cellTextBackground = writeAttrFromStringProperty "background" +cellTextBackground :: CellRendererClass self => WriteAttr self String +cellTextBackground = writeAttrFromStringProperty "cell-background" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 177 -cellTextBackgroundColor = newAttrFromBoxedStorableProperty "background-gdk" +cellTextBackgroundColor = newAttrFromBoxedStorableProperty "cell-background-gdk" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 180 --- | Whether the 'cellTextBackground'\/'cellTextBackgroundColor' attribute is --- set. --- --- You can use this to reset the attribute to its default. +-- | Whether the 'cellTextBackground'\/'cellTextBackgroundColor' attribute is set. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 185 -cellTextBackgroundSet = newAttrFromBoolProperty "background-set" +cellTextBackgroundSet = newAttrFromBoolProperty "cell-background-set" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 187 --- | Text foreground color as a string. --- --- Default value: @\"\"@ +-- | Whether the text can be modified by the user. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 189 -cellTextForeground :: CellRendererTextClass self => WriteAttr self String -cellTextForeground = writeAttrFromStringProperty "foreground" +cellEditable :: CellRendererTextClass self => Attr self Bool +cellEditable = newAttrFromBoolProperty "editable" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 192 --- | Text foreground color as a 'Color'. +-- | Whether the text can be modified by the user. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 194 -cellTextForegroundColor :: CellRendererClass self => Attr self Color -cellTextForegroundColor = newAttrFromBoxedStorableProperty "foreground-gdk" - {# call pure unsafe gdk_color_get_type #} +cellEditableSet :: CellRendererTextClass self => Attr self Bool +cellEditableSet = newAttrFromBoolProperty "editable-set" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 197 --- | Whether the 'cellTextForeground'\/'cellTextForegroundColor' attribute is --- --- You can use this to reset the attribute to its default. +#if GTK_CHECK_VERSION(2,6,0) +-- | 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.UI.Gtk.Pango.Enums.EllipsizeNone' turns off +-- ellipsizing. See the 'cellWrapWidth' property for another way of +-- making the text fit into a given width. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 204 --- Default value: @False@ +-- * Available in Gtk 2.6 or higher. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 206 -cellTextForegroundSet :: CellRendererClass self => Attr self Bool -cellTextForegroundSet = newAttrFromBoolProperty "foreground-set" +cellEllipsize :: CellRendererTextClass self => Attr self EllipsizeMode +cellEllipsize = newAttrFromEnumProperty "ellipsize" + {# call pure pango_ellipsize_mode_get_type #} hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 210 --- | Whether the text can be modified by the user. +-- | Whether the 'cellEllipsize' tag affects the ellipsize mode. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 212 --- Default value: @False@ +-- * Available in Gtk 2.6 or higher. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 214 -cellTextEditable :: CellRendererTextClass self => Attr self Bool -cellTextEditable = newAttrFromBoolProperty "editable" +cellEllipsizeSet :: CellRendererTextClass self => Attr self Bool +cellEllipsizeSet = newAttrFromBoolProperty "ellipsize-set" +#endif hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 218 --- | Whether the 'cellTextEditable' attribute is set. --- --- You can use this to reset the attribute to its default. +-- | Name of the font family, e.g. Sans, Helvetica, Times, Monospace. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 220 --- Default value: @False@ +cellFamily :: CellRendererTextClass self => Attr self String +cellFamily = newAttrFromStringProperty "family" + +-- | Determines if 'cellFamily' has an effect. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 225 -cellTextEditableSet :: CellRendererClass self => Attr self Bool -cellTextEditableSet = newAttrFromBoolProperty "editable-set" +cellFamilySet :: CellRendererTextClass self => Attr self Bool +cellFamilySet = newAttrFromBoolProperty "family-set" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 230 --- Default value: @\"\"@ +cellFont :: CellRendererTextClass self => Attr self String +cellFont = newAttrFromStringProperty "font" + +-- | Font description as a 'Graphics.UI.Gtk.Pango.FontDescription'. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 235 -cellTextFont :: CellRendererTextClass self => Attr self String -cellTextFont = newAttrFromStringProperty "font" +cellFontDesc :: CellRendererTextClass self => Attr self FontDescription +cellFontDesc = newAttrFromBoxedOpaqueProperty makeNewFontDescription + (\(FontDescription fd) act -> withForeignPtr fd act) "font-desc" + {# call pure unsafe pango_font_description_get_type #} hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 240 --- | Name of the font family, e.g. Sans, Helvetica, Times, Monospace. +-- | Text foreground color as a string. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 244 -cellTextFamily :: CellRendererTextClass self => Attr self String -cellTextFamily = newAttrFromStringProperty "family" +cellTextForeground :: CellRendererClass self => WriteAttr self String +cellTextForeground = writeAttrFromStringProperty "cell-foreground" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 247 --- | Whether the 'cellTextFamily' attribute is set. +-- | Text foreground color as a 'Color'. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 249 --- You can use this to reset the attribute to its default. +cellTextForegroundColor :: CellRendererClass self => Attr self Color +cellTextForegroundColor = newAttrFromBoxedStorableProperty "cell-foreground-gdk" + {# call pure unsafe gdk_color_get_type #} + +-- | Whether the 'cellTextForeground'\/'cellTextForegroundColor' attribute is set. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 257 -cellTextFamilySet :: CellRendererClass self => Attr self Bool -cellTextFamilySet = newAttrFromBoolProperty "family-set" +cellTextForegroundSet :: CellRendererClass self => Attr self Bool +cellTextForegroundSet = newAttrFromBoolProperty "cell-foreground-set" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 260 --- | Font style. --- --- Default value: 'StyleNormal' +-- | 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. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 264 -cellTextStyle :: CellRendererTextClass self => Attr self FontStyle -cellTextStyle = newAttrFromEnumProperty "style" - {# call pure unsafe pango_style_get_type #} +cellLanguage :: CellRendererTextClass self => Attr self (Maybe String) +cellLanguage = newAttrFromMaybeStringProperty "language" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 267 --- | Whether the 'cellTextStyle' attribute is set. --- --- You can use this to reset the attribute to its default. --- --- Default value: @False@ +-- | Whether the 'cellLanguage' tag is used, default is @False@. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 269 -cellTextStyleSet :: CellRendererClass self => Attr self Bool -cellTextStyleSet = newAttrFromBoolProperty "style-set" +cellLanguageSet :: CellRendererTextClass self => Attr self Bool +cellLanguageSet = newAttrFromBoolProperty "language-set" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 272 --- | Font variant. --- --- Default value: 'VariantNormal' +-- | Define a markup string instead of a text. See 'cellText'. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 274 -cellTextVariant :: CellRendererTextClass self => Attr self Variant -cellTextVariant = newAttrFromEnumProperty "variant" - {# call pure unsafe pango_variant_get_type #} +cellMarkup :: CellRendererTextClass cr => WriteAttr cr (Maybe String) +cellMarkup = writeAttrFromMaybeStringProperty "markup" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 277 --- | Whether the 'cellTextVariant' attribute is set. --- --- You can use this to reset the attribute to its default. --- --- Default value: @False@ +-- | Offset of text above the baseline (below the baseline if rise is +-- negative). hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 280 -cellTextVariantSet :: CellRendererClass self => Attr self Bool -cellTextVariantSet = newAttrFromBoolProperty "variant-set" +cellRise :: CellRendererTextClass self => Attr self Int +cellRise = newAttrFromIntProperty "rise" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 283 --- | Font weight. --- --- Allowed values: >= 0 --- --- Default value: 400 +-- | Whether the 'cellRise' tag is used, default is @False@. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 285 -cellTextWeight :: CellRendererTextClass self => Attr self Int -cellTextWeight = newAttrFromIntProperty "weight" +cellRiseSet :: CellRendererTextClass self => Attr self Bool +cellRiseSet = newAttrFromBoolProperty "rise-set" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 288 --- | Whether the 'cellTextWeight' attribute is set. --- --- You can use this to reset the attribute to its default. --- --- Default value: @False@ +-- | Font scaling factor. Default is 1. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 290 -cellTextWeightSet :: CellRendererClass self => Attr self Bool -cellTextWeightSet = newAttrFromBoolProperty "weight-set" +cellScale :: CellRendererTextClass self => Attr self Double +cellScale = newAttrFromDoubleProperty "scale" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 293 --- | Font stretch. --- --- Default value: 'StretchNormal' +-- | Whether the 'cellScale' tag is used, default is @False@. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 295 -cellTextStretch :: CellRendererTextClass self => Attr self Stretch -cellTextStretch = newAttrFromEnumProperty "stretch" - {# call pure unsafe pango_stretch_get_type #} +cellScaleSet :: CellRendererTextClass self => Attr self Bool +cellScaleSet = newAttrFromBoolProperty "scale-set" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 298 --- | Whether the 'cellTextStretch' attribute is set. --- --- You can use this to reset the attribute to its default. --- --- Default value: @False@ +-- | Whether or not to keep all text in a single paragraph. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 300 -cellTextStretchSet :: CellRendererClass self => Attr self Bool -cellTextStretchSet = newAttrFromBoolProperty "stretch-set" +cellSingleParagraphMode :: CellRendererTextClass self => Attr self Bool +cellSingleParagraphMode = newAttrFromBoolProperty "single-paragraph-mode" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 303 --- | Font size. --- --- Allowed values: >= 0 --- --- Default value: 0 +-- | Font size in points. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 305 -cellTextSize :: CellRendererTextClass self => Attr self Int -cellTextSize = newAttrFromIntProperty "size" +cellSize :: CellRendererTextClass self => Attr self Double +cellSize = newAttrFromDoubleProperty "size-points" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 308 --- | Whether the 'cellTextSize' attribute is set. --- --- You can use this to reset the attribute to its default. --- --- Default value: @False@ +-- | Whether the 'cellSize' tag is used, default is @False@. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 310 -cellTextSizeSet :: CellRendererClass self => Attr self Bool -cellTextSizeSet = newAttrFromBoolProperty "size-set" +cellSizeSet :: CellRendererTextClass self => Attr self Bool +cellSizeSet = newAttrFromBoolProperty "size-set" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 313 --- | Font size in points. --- --- Allowed values: >= 0 --- --- Default value: 0 +-- | Font stretch. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 315 -cellTextSizePoints :: CellRendererTextClass self => Attr self Double -cellTextSizePoints = newAttrFromDoubleProperty "size-points" +cellStretch :: CellRendererTextClass self => Attr self Stretch +cellStretch = newAttrFromEnumProperty "stretch" + {# call pure pango_stretch_get_type #} hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 319 --- | Font scaling factor. --- --- Allowed values: >= 0 --- --- Default value: 1 +-- | Whether the 'cellStretch' tag is used, default is @False@. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 321 -cellTextScale :: CellRendererTextClass self => Attr self Double -cellTextScale = newAttrFromDoubleProperty "scale" +cellStretchSet :: CellRendererTextClass self => Attr self Bool +cellStretchSet = newAttrFromBoolProperty "stretch-set" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 324 --- | Whether the 'cellTextScale' attribute is set. --- --- You can use this to reset the attribute to its default. --- --- Default value: @False@ +-- | Whether to strike through the text. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 326 -cellTextScaleSet :: CellRendererClass self => Attr self Bool -cellTextScaleSet = newAttrFromBoolProperty "scale-set" +cellStrikethrough :: CellRendererTextClass self => Attr self Bool +cellStrikethrough = newAttrFromBoolProperty "strikethrough" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 329 --- | Offset of text above the baseline (below the baseline if rise is --- negative). --- --- Allowed values: @>= -2147483647@ --- --- Default value: 0 +-- | Whether the 'cellStrikethrough' tag is used, default is @False@. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 331 -cellTextRise :: CellRendererTextClass self => Attr self Int -cellTextRise = newAttrFromIntProperty "rise" +cellStrikethroughSet :: CellRendererTextClass self => Attr self Bool +cellStrikethroughSet = newAttrFromBoolProperty "strikethrough-set" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 334 --- | Whether the 'cellTextRise' attribute is set. --- --- You can use this to reset the attribute to its default. --- --- Default value: @False@ +-- | Font style (e.g. normal or italics). hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 336 -cellTextRiseSet :: CellRendererClass self => Attr self Bool -cellTextRiseSet = newAttrFromBoolProperty "rise-set" +cellStyle :: CellRendererTextClass self => Attr self FontStyle +cellStyle = newAttrFromEnumProperty "style" + {# call pure pango_style_get_type #} hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 340 --- | Whether to strike through the text. --- --- Default value: @False@ +-- | Whether the 'cellStyle' tag is used, default is @False@. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 342 -cellTextStrikethrough :: CellRendererTextClass self => Attr self Bool -cellTextStrikethrough = newAttrFromBoolProperty "strikethrough" +cellStyleSet :: CellRendererTextClass self => Attr self Bool +cellStyleSet = newAttrFromBoolProperty "style-set" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 345 --- | Whether the 'cellTextStrikethrough' attribute is set. --- --- You can use this to reset the attribute to its default. --- --- Default value: @False@ +-- | Define the attribute that specifies the text to be rendered. See +-- also 'cellMarkup'. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 348 -cellTextStrikethroughSet :: CellRendererClass self => Attr self Bool -cellTextStrikethroughSet = newAttrFromBoolProperty "strikethrough-set" +cellText :: CellRendererTextClass cr => Attr cr (Maybe String) +cellText = newAttrFromMaybeStringProperty "text" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 353 --- Default value: 'UnderlineNone' +cellUnderline :: CellRendererTextClass self => Attr self Underline +cellUnderline = newAttrFromEnumProperty "underline" + {# call pure pango_underline_get_type #} + +-- | Whether the 'cellUnderline' tag is used, default is @False@. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 359 -cellTextUnderline :: CellRendererTextClass self => Attr self Underline -cellTextUnderline = newAttrFromEnumProperty "underline" - {# call pure unsafe pango_underline_get_type #} +cellUnderlineSet :: CellRendererTextClass self => Attr self Bool +cellUnderlineSet = newAttrFromBoolProperty "underline-set" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 362 --- | Whether the 'cellTextUnderline' attribute is set. --- --- You can use this to reset the attribute to its default. +-- | Font variant (e.g. small caps). hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 364 --- Default value: @False@ +cellVariant :: CellRendererTextClass self => Attr self Variant +cellVariant = newAttrFromEnumProperty "variant" + {# call pure pango_variant_get_type #} + +-- | Whether the 'cellVariant' tag is used, default is @False@. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 370 -cellTextUnderlineSet :: CellRendererClass self => Attr self Bool -cellTextUnderlineSet = newAttrFromBoolProperty "underline-set" +cellVariantSet :: CellRendererTextClass self => Attr self Bool +cellVariantSet = newAttrFromBoolProperty "variant-set" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 373 --- | 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. --- --- Default value: @\"\"@ +-- | Font weight, default: 400. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 375 -cellTextLanguage :: CellRendererTextClass self => Attr self String -cellTextLanguage = newAttrFromStringProperty "language" +cellWeight :: CellRendererTextClass self => Attr self Int +cellWeight = newAttrFromIntProperty "weight" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 378 --- | Whether the 'cellTextLanguage' attribute is set. --- --- You can use this to reset the attribute to its default. --- --- Default value: @False@ +-- | Whether the 'cellWeight' tag is used, default is @False@. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 380 -cellTextLanguageSet :: CellRendererClass self => Attr self Bool -cellTextLanguageSet = newAttrFromBoolProperty "language-set" +cellWeightSet :: CellRendererTextClass self => Attr self Bool +cellWeightSet = newAttrFromBoolProperty "weight-set" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 384 --- | 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 wrap-width property for --- another way of making the text fit into a given width. --- --- Default value: 'EllipsizeNone' --- -cellTextEllipsize :: CellRendererTextClass self => Attr self EllipsizeMode -cellTextEllipsize = newAttrFromEnumProperty "ellipsize" - {# call pure unsafe pango_ellipsize_mode_get_type #} hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 385 --- | Whether the 'cellTextEllipsize' attribute is set. --- --- You can use this to reset the attribute to its default. +-- | 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. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 390 --- Default value: @False@ +-- * Available in Gtk 2.6 or higher. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 392 -cellTextEllipsizeSet :: CellRendererClass self => Attr self Bool -cellTextEllipsizeSet = newAttrFromBoolProperty "ellipsize-set" +cellWidthChars :: CellRendererTextClass self => Attr self Int +cellWidthChars = newAttrFromIntProperty "width-chars" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 395 --- | 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. --- --- Allowed values: >= -1 --- --- Default value: -1 --- -cellTextWidthChars :: CellRendererTextClass self => Attr self Int -cellTextWidthChars = newAttrFromIntProperty "width-chars" hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 398 + hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 400 --- renderer does not have enough room to display the entire string. This --- property has no effect unless the wrap-width property is set. +-- renderer does not have enough room to display the entire string. +-- This property has no effect unless the 'cellWrapWidth' property is set. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 403 --- Default value: 'WrapChar' +-- * Available in Gtk 2.8 or higher. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 405 -cellTextWrapMode :: CellRendererTextClass self => Attr self WrapMode -cellTextWrapMode = newAttrFromEnumProperty "wrap-mode" - {# call pure unsafe gtk_wrap_mode_get_type #} +cellWrapMode :: CellRendererTextClass self => Attr self LayoutWrapMode +cellWrapMode = newAttrFromEnumProperty "wrap-mode" + {# call pure pango_wrap_mode_get_type #} hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 409 --- | 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. --- --- Allowed values: >= -1 +-- | 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. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 413 --- Default value: -1 +-- * Available in Gtk 2.8 or higher. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 415 -cellTextWrapWidth :: CellRendererTextClass self => Attr self Int -cellTextWrapWidth = newAttrFromIntProperty "wrap-width" +cellWrapWidth :: CellRendererTextClass self => Attr self Int +cellWrapWidth = newAttrFromIntProperty "wrap-width" + hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 419 - - --------------------- --- Signals hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 421 +-- +-- * 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. hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 440 -onEdited, afterEdited :: TreeModelClass tm => CellRendererText -> tm -> - (TreeIter -> String -> IO ()) -> - IO (ConnectId CellRendererText) +onEdited, afterEdited :: CellRendererTextClass cr => + cr -> (TreePath -> String -> IO ()) -> + IO (ConnectId cr) hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 445 - -internalEdited :: TreeModelClass tm => Bool -> [_$_] - CellRendererText -> tm -> - (TreeIter -> String -> IO ()) -> - IO (ConnectId CellRendererText) -internalEdited after cr tm user = - connect_PTR_STRING__NONE "edited" after cr $ \strPtr string -> - (receiveTreeIter $ \iterPtr -> - {# call gtk_tree_model_get_iter_from_string #} - (toTreeModel tm) - iterPtr - strPtr) - >>= \res -> - case res of - Nothing -> fail "edited signal: invalid tree path" - Just iter -> user iter string hunk ./gtk/Graphics/UI/Gtk/TreeList/CellRendererText.chs.pp 446 +internalEdited :: CellRendererTextClass cr => + Bool -> cr -> + (TreePath -> String -> IO ()) -> + IO (ConnectId cr) +internalEdited after cr user = + connect_PTR_STRING__NONE "edited" after cr $ \pathPtr string -> do + path <- peekTreePath pathPtr + user path string hunk ./tools/callbackGen/gtkmarshal.list 107 +# This is for the "editing-started" in CellRenderer +VOID:OBJECT,POINTER |