Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
You may wish to begin by reading the [text widget conceptual overview][TextWidget] which gives an overview of all the objects and data types related to the text widget and how they work together.
GtkTextTagTables as GtkBuildable
The GtkTextTagTable implementation of the GtkBuildable interface supports adding tags by specifying “tag” as the “type” attribute of a <child> element.
An example of a UI definition fragment specifying tags: > >class="GtkTextTagTable" > type="tag" > class="GtkTextTag"/ > /child >/object
- newtype TextTagTable = TextTagTable (ManagedPtr TextTagTable)
- class GObject o => IsTextTagTable o
- toTextTagTable :: IsTextTagTable o => o -> IO TextTagTable
- noTextTagTable :: Maybe TextTagTable
- data TextTagTableAddMethodInfo
- textTagTableAdd :: (HasCallStack, MonadIO m, IsTextTagTable a, IsTextTag b) => a -> b -> m Bool
- data TextTagTableForeachMethodInfo
- textTagTableForeach :: (HasCallStack, MonadIO m, IsTextTagTable a) => a -> TextTagTableForeach -> m ()
- data TextTagTableGetSizeMethodInfo
- textTagTableGetSize :: (HasCallStack, MonadIO m, IsTextTagTable a) => a -> m Int32
- data TextTagTableLookupMethodInfo
- textTagTableLookup :: (HasCallStack, MonadIO m, IsTextTagTable a) => a -> Text -> m (Maybe TextTag)
- textTagTableNew :: (HasCallStack, MonadIO m) => m TextTagTable
- data TextTagTableRemoveMethodInfo
- textTagTableRemove :: (HasCallStack, MonadIO m, IsTextTagTable a, IsTextTag b) => a -> b -> m ()
- type C_TextTagTableTagAddedCallback = Ptr () -> Ptr TextTag -> Ptr () -> IO ()
- type TextTagTableTagAddedCallback = TextTag -> IO ()
- data TextTagTableTagAddedSignalInfo
- afterTextTagTableTagAdded :: (GObject a, MonadIO m) => a -> TextTagTableTagAddedCallback -> m SignalHandlerId
- genClosure_TextTagTableTagAdded :: TextTagTableTagAddedCallback -> IO Closure
- mk_TextTagTableTagAddedCallback :: C_TextTagTableTagAddedCallback -> IO (FunPtr C_TextTagTableTagAddedCallback)
- noTextTagTableTagAddedCallback :: Maybe TextTagTableTagAddedCallback
- onTextTagTableTagAdded :: (GObject a, MonadIO m) => a -> TextTagTableTagAddedCallback -> m SignalHandlerId
- wrap_TextTagTableTagAddedCallback :: TextTagTableTagAddedCallback -> Ptr () -> Ptr TextTag -> Ptr () -> IO ()
- type C_TextTagTableTagChangedCallback = Ptr () -> Ptr TextTag -> CInt -> Ptr () -> IO ()
- type TextTagTableTagChangedCallback = TextTag -> Bool -> IO ()
- data TextTagTableTagChangedSignalInfo
- afterTextTagTableTagChanged :: (GObject a, MonadIO m) => a -> TextTagTableTagChangedCallback -> m SignalHandlerId
- genClosure_TextTagTableTagChanged :: TextTagTableTagChangedCallback -> IO Closure
- mk_TextTagTableTagChangedCallback :: C_TextTagTableTagChangedCallback -> IO (FunPtr C_TextTagTableTagChangedCallback)
- noTextTagTableTagChangedCallback :: Maybe TextTagTableTagChangedCallback
- onTextTagTableTagChanged :: (GObject a, MonadIO m) => a -> TextTagTableTagChangedCallback -> m SignalHandlerId
- wrap_TextTagTableTagChangedCallback :: TextTagTableTagChangedCallback -> Ptr () -> Ptr TextTag -> CInt -> Ptr () -> IO ()
- type C_TextTagTableTagRemovedCallback = Ptr () -> Ptr TextTag -> Ptr () -> IO ()
- type TextTagTableTagRemovedCallback = TextTag -> IO ()
- data TextTagTableTagRemovedSignalInfo
- afterTextTagTableTagRemoved :: (GObject a, MonadIO m) => a -> TextTagTableTagRemovedCallback -> m SignalHandlerId
- genClosure_TextTagTableTagRemoved :: TextTagTableTagRemovedCallback -> IO Closure
- mk_TextTagTableTagRemovedCallback :: C_TextTagTableTagRemovedCallback -> IO (FunPtr C_TextTagTableTagRemovedCallback)
- noTextTagTableTagRemovedCallback :: Maybe TextTagTableTagRemovedCallback
- onTextTagTableTagRemoved :: (GObject a, MonadIO m) => a -> TextTagTableTagRemovedCallback -> m SignalHandlerId
- wrap_TextTagTableTagRemovedCallback :: TextTagTableTagRemovedCallback -> Ptr () -> Ptr TextTag -> Ptr () -> IO ()
Exported types
newtype TextTagTable Source #
GObject TextTagTable Source # | |
IsObject TextTagTable Source # | |
IsTextTagTable TextTagTable Source # | |
IsBuildable TextTagTable Source # | |
((~) * info (ResolveTextTagTableMethod t TextTagTable), MethodInfo * info TextTagTable p) => IsLabel t (TextTagTable -> p) Source # | |
((~) * info (ResolveTextTagTableMethod t TextTagTable), MethodInfo * info TextTagTable p) => IsLabelProxy t (TextTagTable -> p) Source # | |
HasAttributeList * TextTagTable Source # | |
type AttributeList TextTagTable Source # | |
type SignalList TextTagTable Source # | |
class GObject o => IsTextTagTable o Source #
toTextTagTable :: IsTextTagTable o => o -> IO TextTagTable Source #
Methods
add
data TextTagTableAddMethodInfo Source #
((~) * signature (b -> m Bool), MonadIO m, IsTextTagTable a, IsTextTag b) => MethodInfo * TextTagTableAddMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsTextTagTable a, IsTextTag b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: |
Add a tag to the table. The tag is assigned the highest priority in the table.
tag
must not be in a tag table already, and may not have
the same name as an already-added tag.
foreach
data TextTagTableForeachMethodInfo Source #
((~) * signature (TextTagTableForeach -> m ()), MonadIO m, IsTextTagTable a) => MethodInfo * TextTagTableForeachMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsTextTagTable a) | |
=> a |
|
-> TextTagTableForeach |
|
-> m () |
Calls func
on each tag in table
, with user data data
.
Note that the table may not be modified while iterating
over it (you can’t add/remove tags).
getSize
data TextTagTableGetSizeMethodInfo Source #
((~) * signature (m Int32), MonadIO m, IsTextTagTable a) => MethodInfo * TextTagTableGetSizeMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsTextTagTable a) | |
=> a |
|
-> m Int32 | Returns: number of tags in |
Returns the size of the table (number of tags)
lookup
data TextTagTableLookupMethodInfo Source #
((~) * signature (Text -> m (Maybe TextTag)), MonadIO m, IsTextTagTable a) => MethodInfo * TextTagTableLookupMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsTextTagTable a) | |
=> a |
|
-> Text |
|
-> m (Maybe TextTag) | Returns: The tag, or |
Look up a named tag.
new
:: (HasCallStack, MonadIO m) | |
=> m TextTagTable | Returns: a new |
Creates a new TextTagTable
. The table contains no tags by
default.
remove
data TextTagTableRemoveMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsTextTagTable a, IsTextTag b) => MethodInfo * TextTagTableRemoveMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsTextTagTable a, IsTextTag b) | |
=> a |
|
-> b |
|
-> m () |
Remove a tag from the table. If a TextBuffer
has table
as its tag table,
the tag is removed from the buffer. The table’s reference to the tag is
removed, so the tag will end up destroyed if you don’t have a reference to
it.
Signals
tagAdded
type TextTagTableTagAddedCallback = TextTag -> IO () Source #
afterTextTagTableTagAdded :: (GObject a, MonadIO m) => a -> TextTagTableTagAddedCallback -> m SignalHandlerId Source #
mk_TextTagTableTagAddedCallback :: C_TextTagTableTagAddedCallback -> IO (FunPtr C_TextTagTableTagAddedCallback) Source #
onTextTagTableTagAdded :: (GObject a, MonadIO m) => a -> TextTagTableTagAddedCallback -> m SignalHandlerId Source #
wrap_TextTagTableTagAddedCallback :: TextTagTableTagAddedCallback -> Ptr () -> Ptr TextTag -> Ptr () -> IO () Source #
tagChanged
afterTextTagTableTagChanged :: (GObject a, MonadIO m) => a -> TextTagTableTagChangedCallback -> m SignalHandlerId Source #
mk_TextTagTableTagChangedCallback :: C_TextTagTableTagChangedCallback -> IO (FunPtr C_TextTagTableTagChangedCallback) Source #
onTextTagTableTagChanged :: (GObject a, MonadIO m) => a -> TextTagTableTagChangedCallback -> m SignalHandlerId Source #
wrap_TextTagTableTagChangedCallback :: TextTagTableTagChangedCallback -> Ptr () -> Ptr TextTag -> CInt -> Ptr () -> IO () Source #
tagRemoved
type TextTagTableTagRemovedCallback = TextTag -> IO () Source #
afterTextTagTableTagRemoved :: (GObject a, MonadIO m) => a -> TextTagTableTagRemovedCallback -> m SignalHandlerId Source #
mk_TextTagTableTagRemovedCallback :: C_TextTagTableTagRemovedCallback -> IO (FunPtr C_TextTagTableTagRemovedCallback) Source #
onTextTagTableTagRemoved :: (GObject a, MonadIO m) => a -> TextTagTableTagRemovedCallback -> m SignalHandlerId Source #
wrap_TextTagTableTagRemovedCallback :: TextTagTableTagRemovedCallback -> Ptr () -> Ptr TextTag -> Ptr () -> IO () Source #