{-# 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.
--
module Graphics.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'
-- @

-- * Types
  CellRendererText,
  CellRendererTextClass,
  castToCellRendererText, gTypeCellRendererText,
  toCellRendererText,

-- * Constructors
  cellRendererTextNew,

-- * Methods
  cellRendererTextSetFixedHeightFromFont,

-- * Attributes
  cellText,
  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,


-- * Signals
  edited,

-- * Deprecated




  ) where

import Control.Monad (liftM)

import System.Glib.FFI
import System.Glib.UTFString
import System.Glib.Properties
import System.Glib.Attributes (Attr, WriteAttr)
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.Types
{-# LINE 129 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}
import Graphics.UI.Gtk.Signals
{-# LINE 130 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}
import Graphics.UI.Gtk.ModelView.Types
{-# LINE 131 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}
import Graphics.UI.Gtk.General.Structs ()
import Graphics.Rendering.Pango.Enums
import Graphics.Rendering.Pango.BasicTypes ( FontDescription(..),
                                         makeNewFontDescription )
import Graphics.Rendering.Pango.Layout ( LayoutAlignment, LayoutWrapMode )


{-# LINE 138 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}

--------------------
-- Constructors

-- | Create a new CellRendererText object.
--
cellRendererTextNew :: IO CellRendererText
cellRendererTextNew :: IO CellRendererText
cellRendererTextNew =
  (ForeignPtr CellRendererText -> CellRendererText,
 FinalizerPtr CellRendererText)
-> IO (Ptr CellRendererText) -> IO CellRendererText
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr CellRendererText -> CellRendererText,
 FinalizerPtr CellRendererText)
forall {a}.
(ForeignPtr CellRendererText -> CellRendererText, FinalizerPtr a)
mkCellRendererText (IO (Ptr CellRendererText) -> IO CellRendererText)
-> IO (Ptr CellRendererText) -> IO CellRendererText
forall a b. (a -> b) -> a -> b
$
  (Ptr CellRenderer -> Ptr CellRendererText)
-> IO (Ptr CellRenderer) -> IO (Ptr CellRendererText)
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Ptr CellRenderer -> Ptr CellRendererText
forall a b. Ptr a -> Ptr b
castPtr :: Ptr CellRenderer -> Ptr CellRendererText) (IO (Ptr CellRenderer) -> IO (Ptr CellRendererText))
-> IO (Ptr CellRenderer) -> IO (Ptr CellRendererText)
forall a b. (a -> b) -> a -> b
$
  IO (Ptr CellRenderer)
gtk_cell_renderer_text_new
{-# LINE 149 "./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 inflexible, 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 :: CellRendererTextClass self => self
 -> Int -- ^ @numberOfRows@ - Number of rows of text each cell renderer is
          -- allocated, or -1
 -> IO ()
cellRendererTextSetFixedHeightFromFont :: forall self. CellRendererTextClass self => self -> Int -> IO ()
cellRendererTextSetFixedHeightFromFont self
self Int
numberOfRows =
  (\(CellRendererText ForeignPtr CellRendererText
arg1) CInt
arg2 -> ForeignPtr CellRendererText
-> (Ptr CellRendererText -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr CellRendererText
arg1 ((Ptr CellRendererText -> IO ()) -> IO ())
-> (Ptr CellRendererText -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr CellRendererText
argPtr1 ->Ptr CellRendererText -> CInt -> IO ()
gtk_cell_renderer_text_set_fixed_height_from_font Ptr CellRendererText
argPtr1 CInt
arg2)
{-# LINE 168 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}
    (toCellRendererText self)
    (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
numberOfRows)


--------------------
-- Properties

-- | Text background color as a string.
--
-- Default value: @\"\"@
--
cellTextBackground :: (CellRendererClass self, GlibString string) => WriteAttr self string
cellTextBackground :: forall self string.
(CellRendererClass self, GlibString string) =>
WriteAttr self string
cellTextBackground = String -> WriteAttr self string
forall gobj string.
(GObjectClass gobj, GlibString string) =>
String -> WriteAttr gobj string
writeAttrFromStringProperty String
"background"

-- | Text background color as a 'Color'.
--
cellTextBackgroundColor :: CellRendererClass self => Attr self Color
cellTextBackgroundColor :: forall self. CellRendererClass self => Attr self Color
cellTextBackgroundColor = String -> GType -> Attr self Color
forall gobj boxed.
(GObjectClass gobj, Storable boxed) =>
String -> GType -> Attr gobj boxed
newAttrFromBoxedStorableProperty String
"background-gdk"
  GType
gdk_color_get_type
{-# LINE 187 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}

-- | Whether the 'cellTextBackground'\/'cellTextBackgroundColor' attribute is set.
--
-- Default value: @False@
--
cellTextBackgroundSet :: CellRendererClass self => Attr self Bool
cellTextBackgroundSet :: forall self. CellRendererClass self => Attr self Bool
cellTextBackgroundSet = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"background-set"

-- | Whether the text can be modified by the user.
--
cellTextEditable :: CellRendererTextClass self => Attr self Bool
cellTextEditable :: forall self. CellRendererTextClass self => Attr self Bool
cellTextEditable = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"editable"

-- | Whether the 'cellTextEditable' flag affects text editability.
--
cellTextEditableSet :: CellRendererTextClass self => Attr self Bool
cellTextEditableSet :: forall self. CellRendererTextClass self => Attr self Bool
cellTextEditableSet = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"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 :: CellRendererTextClass self => Attr self EllipsizeMode
cellTextEllipsize :: forall self. CellRendererTextClass self => Attr self EllipsizeMode
cellTextEllipsize = String -> GType -> Attr self EllipsizeMode
forall gobj enum.
(GObjectClass gobj, Enum enum) =>
String -> GType -> Attr gobj enum
newAttrFromEnumProperty String
"ellipsize"
                GType
pango_ellipsize_mode_get_type
{-# LINE 217 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}

-- | Whether the 'cellTextEllipsize' tag affects the ellipsize mode.
--
-- * Available in Gtk 2.6 or higher.
--
cellTextEllipsizeSet :: CellRendererTextClass self => Attr self Bool
cellTextEllipsizeSet :: forall self. CellRendererTextClass self => Attr self Bool
cellTextEllipsizeSet = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"ellipsize-set"


-- | Name of the font family, e.g. Sans, Helvetica, Times, Monospace.
--
cellTextFamily :: (CellRendererTextClass self, GlibString string) => Attr self string
cellTextFamily :: forall self string.
(CellRendererTextClass self, GlibString string) =>
Attr self string
cellTextFamily = String -> Attr self string
forall gobj string.
(GObjectClass gobj, GlibString string) =>
String -> Attr gobj string
newAttrFromStringProperty String
"family"

-- | Determines if 'cellTextFamily' has an effect.
--
cellTextFamilySet :: CellRendererTextClass self => Attr self Bool
cellTextFamilySet :: forall self. CellRendererTextClass self => Attr self Bool
cellTextFamilySet = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"family-set"

-- | Font description as a string.
--
cellTextFont :: (CellRendererTextClass self, GlibString string) => Attr self string
cellTextFont :: forall self string.
(CellRendererTextClass self, GlibString string) =>
Attr self string
cellTextFont = String -> Attr self string
forall gobj string.
(GObjectClass gobj, GlibString string) =>
String -> Attr gobj string
newAttrFromStringProperty String
"font"

-- | Font description as a 'Graphics.Rendering.Pango.FontDescription'.
--
cellTextFontDesc :: CellRendererTextClass self => Attr self FontDescription
cellTextFontDesc :: forall self.
CellRendererTextClass self =>
Attr self FontDescription
cellTextFontDesc = (Ptr FontDescription -> IO FontDescription)
-> (FontDescription -> (Ptr FontDescription -> IO ()) -> IO ())
-> String
-> GType
-> Attr self FontDescription
forall gobj boxed.
GObjectClass gobj =>
(Ptr boxed -> IO boxed)
-> (boxed -> (Ptr boxed -> IO ()) -> IO ())
-> String
-> GType
-> Attr gobj boxed
newAttrFromBoxedOpaqueProperty Ptr FontDescription -> IO FontDescription
makeNewFontDescription
  (\(FontDescription ForeignPtr FontDescription
fd) Ptr FontDescription -> IO ()
act -> ForeignPtr FontDescription
-> (Ptr FontDescription -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FontDescription
fd Ptr FontDescription -> IO ()
act) String
"font-desc"
  GType
pango_font_description_get_type
{-# LINE 247 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}

-- | Text foreground color as a string.
--
-- Default value: @\"\"@
--
cellTextForeground :: (CellRendererClass self, GlibString string) => WriteAttr self string
cellTextForeground :: forall self string.
(CellRendererClass self, GlibString string) =>
WriteAttr self string
cellTextForeground = String -> WriteAttr self string
forall gobj string.
(GObjectClass gobj, GlibString string) =>
String -> WriteAttr gobj string
writeAttrFromStringProperty String
"foreground"

-- | Text foreground color as a 'Color'.
--
cellTextForegroundColor :: CellRendererClass self => Attr self Color
cellTextForegroundColor :: forall self. CellRendererClass self => Attr self Color
cellTextForegroundColor = String -> GType -> Attr self Color
forall gobj boxed.
(GObjectClass gobj, Storable boxed) =>
String -> GType -> Attr gobj boxed
newAttrFromBoxedStorableProperty String
"foreground-gdk"
  GType
gdk_color_get_type
{-# LINE 260 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}

-- | Whether the 'cellTextForeground'\/'cellTextForegroundColor' attribute is set.
--
-- Default value: @False@
--
cellTextForegroundSet :: CellRendererClass self => Attr self Bool
cellTextForegroundSet :: forall self. CellRendererClass self => Attr self Bool
cellTextForegroundSet = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"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 :: (CellRendererTextClass self, GlibString string) => Attr self (Maybe string)
cellTextLanguage :: forall self string.
(CellRendererTextClass self, GlibString string) =>
Attr self (Maybe string)
cellTextLanguage = String -> Attr self (Maybe string)
forall gobj string.
(GObjectClass gobj, GlibString string) =>
String -> Attr gobj (Maybe string)
newAttrFromMaybeStringProperty String
"language"

-- | Whether the 'cellTextLanguage' tag is used, default is @False@.
--
cellTextLanguageSet :: CellRendererTextClass self => Attr self Bool
cellTextLanguageSet :: forall self. CellRendererTextClass self => Attr self Bool
cellTextLanguageSet = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"language-set"

-- | Define a markup string instead of a text. See 'cellText'.
--
cellTextMarkup :: (CellRendererTextClass cr, GlibString string) => WriteAttr cr (Maybe string)
cellTextMarkup :: forall cr string.
(CellRendererTextClass cr, GlibString string) =>
WriteAttr cr (Maybe string)
cellTextMarkup = String -> WriteAttr cr (Maybe string)
forall gobj string.
(GObjectClass gobj, GlibString string) =>
String -> WriteAttr gobj (Maybe string)
writeAttrFromMaybeStringProperty String
"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 :: CellRendererTextClass self => Attr self Int
cellTextRise :: forall self. CellRendererTextClass self => Attr self Int
cellTextRise = String -> Attr self Int
forall gobj. GObjectClass gobj => String -> Attr gobj Int
newAttrFromIntProperty String
"rise"

-- | Whether the 'cellTextRise' tag is used, default is @False@.
--
cellTextRiseSet :: CellRendererTextClass self => Attr self Bool
cellTextRiseSet :: forall self. CellRendererTextClass self => Attr self Bool
cellTextRiseSet = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"rise-set"

-- | Font scaling factor. Default is 1.
--
cellTextScale :: CellRendererTextClass self => Attr self Double
cellTextScale :: forall self. CellRendererTextClass self => Attr self Double
cellTextScale = String -> Attr self Double
forall gobj. GObjectClass gobj => String -> Attr gobj Double
newAttrFromDoubleProperty String
"scale"

-- | Whether the 'cellTextScale' tag is used, default is @False@.
--
cellTextScaleSet :: CellRendererTextClass self => Attr self Bool
cellTextScaleSet :: forall self. CellRendererTextClass self => Attr self Bool
cellTextScaleSet = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"scale-set"

-- %hash c:d85f d:9cfb
-- | Whether or not to keep all text in a single paragraph.
--
-- Default value: @False@
--
cellTextSingleParagraphMode :: CellRendererTextClass self => Attr self Bool
cellTextSingleParagraphMode :: forall self. CellRendererTextClass self => Attr self Bool
cellTextSingleParagraphMode = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"single-paragraph-mode"

-- | Font size in points.
--
cellTextSize :: CellRendererTextClass self => Attr self Double
cellTextSize :: forall self. CellRendererTextClass self => Attr self Double
cellTextSize = String -> Attr self Double
forall gobj. GObjectClass gobj => String -> Attr gobj Double
newAttrFromDoubleProperty String
"size-points"

-- %hash c:d281 d:3b0c
-- | Font size in points.
--
-- Allowed values: >= 0
--
-- Default value: 0
--
cellTextSizePoints :: CellRendererTextClass self => Attr self Double
cellTextSizePoints :: forall self. CellRendererTextClass self => Attr self Double
cellTextSizePoints = String -> Attr self Double
forall gobj. GObjectClass gobj => String -> Attr gobj Double
newAttrFromDoubleProperty String
"size-points"

-- | Whether the 'cellTextSize' tag is used, default is @False@.
--
cellTextSizeSet :: CellRendererTextClass self => Attr self Bool
cellTextSizeSet :: forall self. CellRendererTextClass self => Attr self Bool
cellTextSizeSet = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"size-set"

-- | Font stretch.
--
cellTextStretch :: CellRendererTextClass self => Attr self Stretch
cellTextStretch :: forall self. CellRendererTextClass self => Attr self Stretch
cellTextStretch = String -> GType -> Attr self Stretch
forall gobj enum.
(GObjectClass gobj, Enum enum) =>
String -> GType -> Attr gobj enum
newAttrFromEnumProperty String
"stretch"
              GType
pango_stretch_get_type
{-# LINE 344 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}

-- | Whether the 'cellTextStretch' tag is used, default is @False@.
--
cellTextStretchSet :: CellRendererTextClass self => Attr self Bool
cellTextStretchSet :: forall self. CellRendererTextClass self => Attr self Bool
cellTextStretchSet = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"stretch-set"

-- | Whether to strike through the text.
--
cellTextStrikethrough :: CellRendererTextClass self => Attr self Bool
cellTextStrikethrough :: forall self. CellRendererTextClass self => Attr self Bool
cellTextStrikethrough = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"strikethrough"

-- | Whether the 'cellTextStrikethrough' tag is used, default is @False@.
--
cellTextStrikethroughSet :: CellRendererTextClass self => Attr self Bool
cellTextStrikethroughSet :: forall self. CellRendererTextClass self => Attr self Bool
cellTextStrikethroughSet = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"strikethrough-set"

-- | Font style (e.g. normal or italics).
--
cellTextStyle :: CellRendererTextClass self => Attr self FontStyle
cellTextStyle :: forall self. CellRendererTextClass self => Attr self FontStyle
cellTextStyle = String -> GType -> Attr self FontStyle
forall gobj enum.
(GObjectClass gobj, Enum enum) =>
String -> GType -> Attr gobj enum
newAttrFromEnumProperty String
"style"
            GType
pango_style_get_type
{-# LINE 365 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}

-- | Whether the 'cellTextStyle' tag is used, default is @False@.
--
cellTextStyleSet :: CellRendererTextClass self => Attr self Bool
cellTextStyleSet :: forall self. CellRendererTextClass self => Attr self Bool
cellTextStyleSet = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"style-set"

-- | Define the attribute that specifies the text to be rendered. See
-- also 'cellTextMarkup'.
--
cellText :: (CellRendererTextClass cr, GlibString string) => Attr cr string
cellText :: forall self string.
(CellRendererTextClass self, GlibString string) =>
Attr self string
cellText = String -> Attr cr string
forall gobj string.
(GObjectClass gobj, GlibString string) =>
String -> Attr gobj string
newAttrFromStringProperty String
"text"

-- | Style of underline for this text.
--
cellTextUnderline :: CellRendererTextClass self => Attr self Underline
cellTextUnderline :: forall self. CellRendererTextClass self => Attr self Underline
cellTextUnderline = String -> GType -> Attr self Underline
forall gobj enum.
(GObjectClass gobj, Enum enum) =>
String -> GType -> Attr gobj enum
newAttrFromEnumProperty String
"underline"
                GType
pango_underline_get_type
{-# LINE 382 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}

-- | Whether the 'cellTextUnderline' tag is used, default is @False@.
--
cellTextUnderlineSet :: CellRendererTextClass self => Attr self Bool
cellTextUnderlineSet :: forall self. CellRendererTextClass self => Attr self Bool
cellTextUnderlineSet = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"underline-set"

-- | Font variant (e.g. small caps).
--
cellTextVariant :: CellRendererTextClass self => Attr self Variant
cellTextVariant :: forall self. CellRendererTextClass self => Attr self Variant
cellTextVariant = String -> GType -> Attr self Variant
forall gobj enum.
(GObjectClass gobj, Enum enum) =>
String -> GType -> Attr gobj enum
newAttrFromEnumProperty String
"variant"
              GType
pango_variant_get_type
{-# LINE 393 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}

-- | Whether the 'cellTextVariant' tag is used, default is @False@.
--
cellTextVariantSet :: CellRendererTextClass self => Attr self Bool
cellTextVariantSet :: forall self. CellRendererTextClass self => Attr self Bool
cellTextVariantSet = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"variant-set"

-- | Font weight, default: 400.
--
cellTextWeight :: CellRendererTextClass self => Attr self Int
cellTextWeight :: forall self. CellRendererTextClass self => Attr self Int
cellTextWeight = String -> Attr self Int
forall gobj. GObjectClass gobj => String -> Attr gobj Int
newAttrFromIntProperty String
"weight"

-- | Whether the 'cellTextWeight' tag is used, default is @False@.
--
cellTextWeightSet :: CellRendererTextClass self => Attr self Bool
cellTextWeightSet :: forall self. CellRendererTextClass self => Attr self Bool
cellTextWeightSet = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"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 :: CellRendererTextClass self => Attr self Int
cellTextWidthChars :: forall self. CellRendererTextClass self => Attr self Int
cellTextWidthChars = String -> Attr self Int
forall gobj. GObjectClass gobj => String -> Attr gobj Int
newAttrFromIntProperty String
"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 :: CellRendererTextClass self => Attr self LayoutWrapMode
cellTextWrapMode :: forall self. CellRendererTextClass self => Attr self LayoutWrapMode
cellTextWrapMode = String -> GType -> Attr self LayoutWrapMode
forall gobj enum.
(GObjectClass gobj, Enum enum) =>
String -> GType -> Attr gobj enum
newAttrFromEnumProperty String
"wrap-mode"
               GType
pango_wrap_mode_get_type
{-# LINE 434 "./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 :: CellRendererTextClass self => Attr self Int
cellTextWrapWidth :: forall self. CellRendererTextClass self => Attr self Int
cellTextWrapWidth = String -> Attr self Int
forall gobj. GObjectClass gobj => String -> Attr gobj Int
newAttrFromIntProperty String
"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 :: CellRendererTextClass self => Attr self LayoutAlignment
cellTextAlignment :: forall self.
CellRendererTextClass self =>
Attr self LayoutAlignment
cellTextAlignment = String -> GType -> Attr self LayoutAlignment
forall gobj enum.
(GObjectClass gobj, Enum enum) =>
String -> GType -> Attr gobj enum
newAttrFromEnumProperty String
"alignment"
                              GType
pango_alignment_get_type
{-# LINE 464 "./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 :: (CellRendererTextClass self, GlibString string) =>
          Signal self (TreePath -> string -> IO ())
edited :: forall self string.
(CellRendererTextClass self, GlibString string) =>
Signal self (TreePath -> string -> IO ())
edited = (Bool
 -> self -> (TreePath -> string -> IO ()) -> IO (ConnectId self))
-> Signal self (TreePath -> string -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal Bool
-> self -> (TreePath -> string -> IO ()) -> IO (ConnectId self)
forall cr string.
(CellRendererTextClass cr, GlibString string) =>
Bool -> cr -> (TreePath -> string -> IO ()) -> IO (ConnectId cr)
internalEdited

--------------------
-- Deprecated Signals
{-# LINE 503 "./Graphics/UI/Gtk/ModelView/CellRendererText.chs" #-}
internalEdited :: (CellRendererTextClass cr, GlibString string) =>
                  Bool -> cr ->
                  (TreePath -> string -> IO ()) ->
                  IO (ConnectId cr)
internalEdited :: forall cr string.
(CellRendererTextClass cr, GlibString string) =>
Bool -> cr -> (TreePath -> string -> IO ()) -> IO (ConnectId cr)
internalEdited Bool
after cr
cr TreePath -> string -> IO ()
user =
  String
-> Bool
-> cr
-> (DefaultGlibString -> string -> IO ())
-> IO (ConnectId cr)
forall a' b' obj.
(GlibString a', GlibString b', GObjectClass obj) =>
String -> Bool -> obj -> (a' -> b' -> IO ()) -> IO (ConnectId obj)
connect_GLIBSTRING_GLIBSTRING__NONE String
"edited" Bool
after cr
cr ((DefaultGlibString -> string -> IO ()) -> IO (ConnectId cr))
-> (DefaultGlibString -> string -> IO ()) -> IO (ConnectId cr)
forall a b. (a -> b) -> a -> b
$ \DefaultGlibString
path string
string -> do
    TreePath -> string -> IO ()
user (DefaultGlibString -> TreePath
stringToTreePath DefaultGlibString
path) string
string

foreign import ccall unsafe "gtk_cell_renderer_text_new"
  gtk_cell_renderer_text_new :: (IO (Ptr CellRenderer))

foreign import ccall safe "gtk_cell_renderer_text_set_fixed_height_from_font"
  gtk_cell_renderer_text_set_fixed_height_from_font :: ((Ptr CellRendererText) -> (CInt -> (IO ())))

foreign import ccall unsafe "gdk_color_get_type"
  gdk_color_get_type :: CUInt

foreign import ccall safe "pango_ellipsize_mode_get_type"
  pango_ellipsize_mode_get_type :: CUInt

foreign import ccall unsafe "pango_font_description_get_type"
  pango_font_description_get_type :: CUInt

foreign import ccall safe "pango_stretch_get_type"
  pango_stretch_get_type :: CUInt

foreign import ccall safe "pango_style_get_type"
  pango_style_get_type :: CUInt

foreign import ccall safe "pango_underline_get_type"
  pango_underline_get_type :: CUInt

foreign import ccall safe "pango_variant_get_type"
  pango_variant_get_type :: CUInt

foreign import ccall safe "pango_wrap_mode_get_type"
  pango_wrap_mode_get_type :: CUInt

foreign import ccall unsafe "pango_alignment_get_type"
  pango_alignment_get_type :: CUInt