| gtk-0.11.2: Binding to the Gtk+ graphical user interface library. | Contents | Index
Graphics.UI.Gtk.Multiline.TextTag |
Portability | portable (depends on GHC)
Stability | provisional
Maintainer | gtk2hs-users@lists.sourceforge.net
Contents
Detail Class Hierarchy Types Constructors Methods Attributes Signals Deprecated
Description
A tag that can be applied to text in a `TextBuffer`
Synopsis
data TextTag
class GObjectClass o => TextTagClass o
castToTextTag :: GObjectClass obj => obj -> TextTag
gTypeTextTag :: GType
toTextTag :: TextTagClass o => o -> TextTag
type TagName = String
textTagNew :: Maybe TagName -> IO TextTag
textTagSetPriority :: TextTagClass self => self -> Int -> IO ()
textTagGetPriority :: TextTagClass self => self -> IO Int
newtype TextAttributes = TextAttributes (ForeignPtr TextAttributes)
textAttributesNew :: IO TextAttributes
textAttributesCopy :: TextAttributes -> IO TextAttributes
textAttributesCopyValues :: TextAttributes -> TextAttributes -> IO ()
makeNewTextAttributes :: Ptr TextAttributes -> IO TextAttributes
textTagName :: TextTagClass self => Attr self (Maybe String)
textTagBackground :: TextTagClass self => WriteAttr self String
textTagBackgroundSet :: TextTagClass self => Attr self Bool
textTagBackgroundFullHeight :: TextTagClass self => Attr self Bool
textTagBackgroundFullHeightSet :: TextTagClass self => Attr self Bool
textTagBackgroundGdk :: TextTagClass self => Attr self Color
textTagBackgroundStipple :: (TextTagClass self, PixmapClass pixmap) => ReadWriteAttr self Pixmap pixmap
textTagBackgroundStippleSet :: TextTagClass self => Attr self Bool
textTagForeground :: TextTagClass self => WriteAttr self String
textTagForegroundSet :: TextTagClass self => Attr self Bool
textTagForegroundGdk :: TextTagClass self => Attr self Color
textTagForegroundStipple :: (TextTagClass self, PixmapClass pixmap) => ReadWriteAttr self Pixmap pixmap
textTagForegroundStippleSet :: TextTagClass self => Attr self Bool
textTagDirection :: TextTagClass self => Attr self TextDirection
textTagEditable :: TextTagClass self => Attr self Bool
textTagEditableSet :: TextTagClass self => Attr self Bool
textTagFont :: TextTagClass self => Attr self String
textTagFontDesc :: TextTagClass self => Attr self FontDescription
textTagFamily :: TextTagClass self => Attr self String
textTagFamilySet :: TextTagClass self => Attr self Bool
textTagStyle :: TextTagClass self => Attr self FontStyle
textTagStyleSet :: TextTagClass self => Attr self Bool
textTagTabsSet :: TextTagClass self => Attr self Bool
textTagVariant :: TextTagClass self => Attr self Variant
textTagVariantSet :: TextTagClass self => Attr self Bool
textTagWeight :: TextTagClass self => Attr self Int
textTagWeightSet :: TextTagClass self => Attr self Bool
textTagStretch :: TextTagClass self => Attr self Stretch
textTagStretchSet :: TextTagClass self => Attr self Bool
textTagSize :: TextTagClass self => Attr self Int
textTagSizeSet :: TextTagClass self => Attr self Bool
textTagScale :: TextTagClass self => Attr self Double
textTagScaleSet :: TextTagClass self => Attr self Bool
textTagSizePoints :: TextTagClass self => Attr self Double
textTagJustification :: TextTagClass self => Attr self Justification
textTagJustificationSet :: TextTagClass self => Attr self Bool
textTagLanguage :: TextTagClass self => Attr self String
textTagLanguageSet :: TextTagClass self => Attr self Bool
textTagLeftMargin :: TextTagClass self => Attr self Int
textTagLeftMarginSet :: TextTagClass self => Attr self Bool
textTagRightMargin :: TextTagClass self => Attr self Int
textTagRightMarginSet :: TextTagClass self => Attr self Bool
textTagIndent :: TextTagClass self => Attr self Int
textTagIndentSet :: TextTagClass self => Attr self Bool
textTagRise :: TextTagClass self => Attr self Int
textTagRiseSet :: TextTagClass self => Attr self Bool
textTagPixelsAboveLines :: TextTagClass self => Attr self Int
textTagPixelsAboveLinesSet :: TextTagClass self => Attr self Bool
textTagPixelsBelowLines :: TextTagClass self => Attr self Int
textTagPixelsBelowLinesSet :: TextTagClass self => Attr self Bool
textTagPixelsInsideWrap :: TextTagClass self => Attr self Int
textTagPixelsInsideWrapSet :: TextTagClass self => Attr self Bool
textTagStrikethrough :: TextTagClass self => Attr self Bool
textTagStrikethroughSet :: TextTagClass self => Attr self Bool
textTagUnderline :: TextTagClass self => Attr self Underline
textTagUnderlineSet :: TextTagClass self => Attr self Bool
textTagWrapMode :: TextTagClass self => Attr self WrapMode
textTagWrapModeSet :: TextTagClass self => Attr self Bool
textTagInvisible :: TextTagClass self => Attr self Bool
textTagInvisibleSet :: TextTagClass self => Attr self Bool
textTagParagraphBackground :: TextTagClass self => WriteAttr self String
textTagParagraphBackgroundSet :: TextTagClass self => Attr self Bool
textTagParagraphBackgroundGdk :: TextTagClass self => Attr self Color
textTagPriority :: TextTagClass self => Attr self Int
textTagEvent :: TextTagClass self => Signal self (GObject -> TextIter -> EventM EAny Bool)
onTextTagEvent :: TextTagClass t => t -> (Event -> TextIter -> IO ()) -> IO (ConnectId t)
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 Graphics.UI.Gtk.Multiline.TextBuffer.TextBuffer before using them with that buffer. Graphics.UI.Gtk.Multiline.TextBuffer.textBufferCreateTag is the best way to create tags. The `textTagInvisible` property was not implemented for Gtk+ 2.0; it's planned to be implemented in future releases.
Class Hierarchy
     | GObject
     | +----TextTag
Types
data TextTag
Instances
Eq TextTag |
Ord TextTag |
GObjectClass TextTag |
TextTagClass TextTag |
class GObjectClass o => TextTagClass o
Instances
TextTagClass TextTag |
castToTextTag :: GObjectClass obj => obj -> TextTag
gTypeTextTag :: GType
toTextTag :: TextTagClass o => o -> TextTag
type TagName = String
Constructors
textTagNew :: Maybe TagName -> IO TextTag
Creates a `TextTag`. Supplying `Nothing` as tag name results in an anonymous tag.
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 Graphics.UI.Gtk.Multiline.TextTagTable.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 Graphics.UI.Gtk.Multiline.TextBuffer.textBufferCreateTag, which adds the tag to the buffer's table automatically.
textTagGetPriority :: TextTagClass self => self -> IO Int
Get the tag priority.
newtype TextAttributes
Constructors
TextAttributes (ForeignPtr TextAttributes) |
textAttributesNew :: IO TextAttributes
Creates a `TextAttributes`, which describes a set of properties on some text.
textAttributesCopy
:: TextAttributes | `src` - a `TextAttributes` to be copied
-> IO TextAttributes |
Copies src and returns a new `TextAttributes`.
textAttributesCopyValues :: TextAttributes -> TextAttributes -> IO ()
Copies the values from src to dest so that dest has the same values as src.
makeNewTextAttributes :: Ptr TextAttributes -> IO TextAttributes
This function is use internal for transform TextAttributes. Don't expoert this function.
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: ""
textTagBackgroundSet :: TextTagClass self => Attr self Bool
Whether this tag affects the background color. Default value: `False`
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`
textTagBackgroundFullHeightSet :: TextTagClass self => Attr self Bool
Whether this tag affects background height. Default value: `False`
textTagBackgroundGdk :: TextTagClass self => Attr self Color
Background color as a (possibly unallocated) GdkColor.
textTagBackgroundStipple :: (TextTagClass self, PixmapClass pixmap) => ReadWriteAttr self Pixmap pixmap
Bitmap to use as a mask when drawing the text background.
textTagBackgroundStippleSet :: TextTagClass self => Attr self Bool
Whether this tag affects the background stipple. Default value: `False`
textTagForeground :: TextTagClass self => WriteAttr self String
Foreground color as a string. Default value: ""
textTagForegroundSet :: TextTagClass self => Attr self Bool
Whether this tag affects the foreground color. Default value: `False`
textTagForegroundGdk :: TextTagClass self => Attr self Color
Foreground color as a (possibly unallocated) GdkColor.
textTagForegroundStipple :: (TextTagClass self, PixmapClass pixmap) => ReadWriteAttr self Pixmap pixmap
Bitmap to use as a mask when drawing the text foreground.
textTagForegroundStippleSet :: TextTagClass self => Attr self Bool
Whether this tag affects the foreground stipple. Default value: `False`
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`
textTagEditableSet :: TextTagClass self => Attr self Bool
Whether this tag affects text editability. Default value: `False`
textTagFont :: TextTagClass self => Attr self String
Font description as a string, e.g. "Sans Italic 12". Default value: ""
textTagFontDesc :: TextTagClass self => Attr self FontDescription
Font description as a `FontDescription` struct.
textTagFamily :: TextTagClass self => Attr self String
Name of the font family, e.g. Sans, Helvetica, Times, Monospace. Default value: ""
textTagFamilySet :: TextTagClass self => Attr self Bool
Whether this tag affects the font family. Default value: `False`
textTagStyle :: TextTagClass self => Attr self FontStyle
Font style as a `Style`, e.g. `StyleItalic`. Default value: `StyleNormal`
textTagStyleSet :: TextTagClass self => Attr self Bool
Whether this tag affects the font style. Default value: `False`
textTagTabsSet :: TextTagClass self => Attr self Bool
Custom tabs for this text. textTagTabs :: TextTagClass self => Attr self TabArray Whether this tag affects tabs. Default value: `False`
textTagVariant :: TextTagClass self => Attr self Variant
Font variant as a `Variant`, e.g. `VariantSmallCaps`. Default value: `VariantNormal`
textTagVariantSet :: TextTagClass self => Attr self Bool
Whether this tag affects the font variant. Default value: `False`
textTagWeight :: TextTagClass self => Attr self Int
Font weight as an integer, see predefined values in Graphics.Rendering.Pango.Enums.Weight; for example, Graphics.Rendering.Pango.Enums.WeightBold. Allowed values: >= 0 Default value: 400
textTagWeightSet :: TextTagClass self => Attr self Bool
Whether this tag affects the font weight. Default value: `False`
textTagStretch :: TextTagClass self => Attr self Stretch
Font stretch as a `Stretch`, e.g. `StretchCondensed`. Default value: `StretchNormal`
textTagStretchSet :: TextTagClass self => Attr self Bool
Whether this tag affects the font stretch.
textTagSize :: TextTagClass self => Attr self Int
Font size in Pango units. Allowed values: >= 0 Default value: 0
textTagSizeSet :: TextTagClass self => Attr self Bool
Whether this tag affects the font size. Default value: `False`
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
textTagScaleSet :: TextTagClass self => Attr self Bool
Whether this tag scales the font size by a factor. Default value: `False`
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`
textTagJustificationSet :: TextTagClass self => Attr self Bool
Whether this tag affects paragraph justification. Default value: `False`
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: ""
textTagLanguageSet :: TextTagClass self => Attr self Bool
Whether this tag affects the language the text is rendered as. Default value: `False`
textTagLeftMargin :: TextTagClass self => Attr self Int
Width of the left margin in pixels. Allowed values: >= 0 Default value: 0
textTagLeftMarginSet :: TextTagClass self => Attr self Bool
Whether this tag affects the left margin. Default value: `False`
textTagRightMargin :: TextTagClass self => Attr self Int
Width of the right margin in pixels. Allowed values: >= 0 Default value: 0
textTagRightMarginSet :: TextTagClass self => Attr self Bool
Whether this tag affects the right margin. Default value: `False`
textTagIndent :: TextTagClass self => Attr self Int
Amount to indent the paragraph, in pixels. Default value: 0
textTagIndentSet :: TextTagClass self => Attr self Bool
Whether this tag affects indentation. Default value: `False`
textTagRise :: TextTagClass self => Attr self Int
Offset of text above the baseline (below the baseline if rise is negative) in pixels. Default value: 0
textTagRiseSet :: TextTagClass self => Attr self Bool
Whether this tag affects the rise.
textTagPixelsAboveLines :: TextTagClass self => Attr self Int
Pixels of blank space above paragraphs. Allowed values: >= 0 Default value: 0
textTagPixelsAboveLinesSet :: TextTagClass self => Attr self Bool
Whether this tag affects the number of pixels above lines. Default value: `False`
textTagPixelsBelowLines :: TextTagClass self => Attr self Int
Pixels of blank space below paragraphs. Allowed values: >= 0 Default value: 0
textTagPixelsBelowLinesSet :: TextTagClass self => Attr self Bool
Whether this tag affects the number of pixels below lines. Default value: `False`
textTagPixelsInsideWrap :: TextTagClass self => Attr self Int
Pixels of blank space between wrapped lines in a paragraph. Allowed values: >= 0 Default value: 0
textTagPixelsInsideWrapSet :: TextTagClass self => Attr self Bool
Whether this tag affects the number of pixels between wrapped lines. Default value: `False`
textTagStrikethrough :: TextTagClass self => Attr self Bool
Whether to strike through the text. Default value: `False`
textTagStrikethroughSet :: TextTagClass self => Attr self Bool
Whether this tag affects strikethrough. Default value: `False`
textTagUnderline :: TextTagClass self => Attr self Underline
Style of underline for this text. Default value: `UnderlineNone`
textTagUnderlineSet :: TextTagClass self => Attr self Bool
Whether this tag affects underlining. Default value: `False`
textTagWrapMode :: TextTagClass self => Attr self WrapMode
Whether to wrap lines never, at word boundaries, or at character boundaries. Default value: `WrapNone`
textTagWrapModeSet :: TextTagClass self => Attr self Bool
Whether this tag affects line wrap mode. Default value: `False`
textTagInvisible :: TextTagClass self => Attr self Bool
Whether this text is hidden. Note that there may still be problems with the support for invisible text, in particular when navigating programmatically inside a buffer containing invisible segments. Default value: `False`
textTagInvisibleSet :: TextTagClass self => Attr self Bool
Whether this tag affects text visibility. Default value: `False`
textTagParagraphBackground :: TextTagClass self => WriteAttr self String
The paragraph background color as a string. Default value: ""
textTagParagraphBackgroundSet :: TextTagClass self => Attr self Bool
Whether this tag affects the paragraph background color. Default value: `False`
textTagParagraphBackgroundGdk :: TextTagClass self => Attr self Color
The paragraph background color as a as a (possibly unallocated) `Color`.
textTagPriority :: TextTagClass self => Attr self Int
'priority' property. See `textTagGetPriority` and `textTagSetPriority`
Signals
textTagEvent :: TextTagClass self => Signal self (GObject -> TextIter -> EventM EAny Bool)
An event has occurred that affects the given tag. Adding an event handler to the tag makes it possible to react on e.g. mouse clicks to implement hyperlinking. The first argument is the object the event was fired from (typically a `TextView`). The second argument is the iterator indicating where the event happened.
Deprecated
onTextTagEvent :: TextTagClass t => t -> (Event -> TextIter -> IO ()) -> IO (ConnectId t)
An event has occurred that affects the given tag. Adding an event handler to the tag makes it possible to react on e.g. mouse clicks to implement hyperlinking.
Produced by Haddock version 2.7.2