| ||||||||
| ||||||||
| ||||||||
Description | ||||||||
A tag that can be applied to text in a TextBuffer | ||||||||
Synopsis | ||||||||
Detail | ||||||||
You may wish to begin by reading the text widget conceptual overview which gives an overview of all the objects and data types related to the text widget and how they work together. Tags should be in the TextTagTable for a given TextBuffer before using them with that buffer. textBufferCreateTag is the best way to create tags. The "invisible" property was not implemented for Gtk+ 2.0; it's planned to be implemented in future releases. | ||||||||
Class Hierarchy | ||||||||
| GObject | +----TextTag | ||||||||
Types | ||||||||
data TextTag | ||||||||
| ||||||||
class GObjectClass o => TextTagClass o | ||||||||
| ||||||||
castToTextTag :: GObjectClass obj => obj -> TextTag | ||||||||
type TagName = String | ||||||||
Constructors | ||||||||
textTagNew :: TagName -> IO TextTag | ||||||||
Creates a TextTag. | ||||||||
Methods | ||||||||
textTagSetPriority :: TextTagClass self => self -> Int -> IO () | ||||||||
Sets the priority of a TextTag. Valid priorities are start at 0 and go to one less than textTagTableGetSize. Each tag in a table has a unique priority; setting the priority of one tag shifts the priorities of all the other tags in the table to maintain a unique priority for each tag. Higher priority tags "win" if two tags both set the same text attribute. When adding a tag to a tag table, it will be assigned the highest priority in the table by default; so normally the precedence of a set of tags is the order in which they were added to the table, or created with textBufferCreateTag, which adds the tag to the buffer's table automatically. | ||||||||
textTagGetPriority :: TextTagClass self => self -> IO Int | ||||||||
Get the tag priority. | ||||||||
newtype TextAttributes | ||||||||
| ||||||||
textAttributesNew :: IO TextAttributes | ||||||||
Creates a TextAttributes, which describes a set of properties on some text. | ||||||||
makeNewTextAttributes :: Ptr TextAttributes -> IO TextAttributes | ||||||||
Attributes | ||||||||
textTagName :: TextTagClass self => Attr self (Maybe String) | ||||||||
Name used to refer to the text tag. Nothing for anonymous tags. Default value: Nothing | ||||||||
textTagBackground :: TextTagClass self => WriteAttr self String | ||||||||
Background color as a string. Default value: "" | ||||||||
textTagBackgroundFullHeight :: TextTagClass self => Attr self Bool | ||||||||
Whether the background color fills the entire line height or only the height of the tagged characters. Default value: False | ||||||||
textTagBackgroundStipple :: (TextTagClass self, PixmapClass pixmap) => ReadWriteAttr self Pixmap pixmap | ||||||||
Bitmap to use as a mask when drawing the text background. | ||||||||
textTagForeground :: TextTagClass self => WriteAttr self String | ||||||||
Foreground color as a string. Default value: "" | ||||||||
textTagForegroundStipple :: (TextTagClass self, PixmapClass pixmap) => ReadWriteAttr self Pixmap pixmap | ||||||||
Bitmap to use as a mask when drawing the text foreground. | ||||||||
textTagDirection :: TextTagClass self => Attr self TextDirection | ||||||||
Text direction, e.g. right-to-left or left-to-right. Default value: TextDirLtr | ||||||||
textTagEditable :: TextTagClass self => Attr self Bool | ||||||||
Whether the text can be modified by the user. Default value: True | ||||||||
textTagFont :: TextTagClass self => Attr self String | ||||||||
Font description as a string, e.g. "Sans Italic 12". Default value: "" | ||||||||
textTagFamily :: TextTagClass self => Attr self String | ||||||||
Name of the font family, e.g. Sans, Helvetica, Times, Monospace. Default value: "" | ||||||||
textTagStyle :: TextTagClass self => Attr self FontStyle | ||||||||
Font style as a Style, e.g. StyleItalic. Default value: StyleNormal | ||||||||
textTagVariant :: TextTagClass self => Attr self Variant | ||||||||
Font variant as a Variant, e.g. VariantSmallCaps. Default value: VariantNormal | ||||||||
textTagWeight :: TextTagClass self => Attr self Int | ||||||||
Font weight as an integer, see predefined values in Weight; for example, WeightBold. Allowed values: >= 0 Default value: 400 | ||||||||
textTagStretch :: TextTagClass self => Attr self Stretch | ||||||||
Font stretch as a Stretch, e.g. StretchCondensed. Default value: StretchNormal | ||||||||
textTagSize :: TextTagClass self => Attr self Int | ||||||||
Font size in Pango units. Allowed values: >= 0 Default value: 0 | ||||||||
textTagScale :: TextTagClass self => Attr self Double | ||||||||
Font size as a scale factor relative to the default font size. This properly adapts to theme changes etc. so is recommended. Allowed values: >= 0 Default value: 1 | ||||||||
textTagSizePoints :: TextTagClass self => Attr self Double | ||||||||
Font size in points. Allowed values: >= 0 Default value: 0 | ||||||||
textTagJustification :: TextTagClass self => Attr self Justification | ||||||||
Left, right, or center justification. Default value: JustifyLeft | ||||||||
textTagLanguage :: TextTagClass self => Attr self String | ||||||||
The language this text is in, as an ISO code. Pango can use this as a hint when rendering the text. If not set, an appropriate default will be used. Default value: "" | ||||||||
textTagLeftMargin :: TextTagClass self => Attr self Int | ||||||||
Width of the left margin in pixels. Allowed values: >= 0 Default value: 0 | ||||||||
textTagRightMargin :: TextTagClass self => Attr self Int | ||||||||
Width of the right margin in pixels. Allowed values: >= 0 Default value: 0 | ||||||||
textTagIndent :: TextTagClass self => Attr self Int | ||||||||
Amount to indent the paragraph, in pixels. Default value: 0 | ||||||||
textTagRise :: TextTagClass self => Attr self Int | ||||||||
Offset of text above the baseline (below the baseline if rise is negative) in pixels. Default value: 0 | ||||||||
textTagPixelsAboveLines :: TextTagClass self => Attr self Int | ||||||||
Pixels of blank space above paragraphs. Allowed values: >= 0 Default value: 0 | ||||||||
textTagPixelsBelowLines :: TextTagClass self => Attr self Int | ||||||||
Pixels of blank space below paragraphs. Allowed values: >= 0 Default value: 0 | ||||||||
textTagPixelsInsideWrap :: TextTagClass self => Attr self Int | ||||||||
Pixels of blank space between wrapped lines in a paragraph. Allowed values: >= 0 Default value: 0 | ||||||||
textTagStrikethrough :: TextTagClass self => Attr self Bool | ||||||||
Whether to strike through the text. Default value: False | ||||||||
textTagUnderline :: TextTagClass self => Attr self Underline | ||||||||
Style of underline for this text. Default value: UnderlineNone | ||||||||
textTagWrapMode :: TextTagClass self => Attr self WrapMode | ||||||||
Whether to wrap lines never, at word boundaries, or at character boundaries. Default value: WrapNone | ||||||||
textTagInvisible :: TextTagClass self => Attr self Bool | ||||||||
Whether this text is hidden. Not implemented in Gtk+ 2.0. Default value: False | ||||||||
textTagPriority :: TextTagClass self => Attr self Int | ||||||||
'priority' property. See textTagGetPriority and textTagSetPriority | ||||||||
Produced by Haddock version 0.7 |