Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
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
Synopsis
- newtype TextTagTable = TextTagTable (ManagedPtr TextTagTable)
- class (GObject o, IsDescendantOf TextTagTable o) => IsTextTagTable o
- toTextTagTable :: (MonadIO m, IsTextTagTable o) => o -> m TextTagTable
- noTextTagTable :: Maybe TextTagTable
- textTagTableAdd :: (HasCallStack, MonadIO m, IsTextTagTable a, IsTextTag b) => a -> b -> m Bool
- textTagTableForeach :: (HasCallStack, MonadIO m, IsTextTagTable a) => a -> TextTagTableForeach -> m ()
- textTagTableGetSize :: (HasCallStack, MonadIO m, IsTextTagTable a) => a -> m Int32
- textTagTableLookup :: (HasCallStack, MonadIO m, IsTextTagTable a) => a -> Text -> m (Maybe TextTag)
- textTagTableNew :: (HasCallStack, MonadIO m) => m TextTagTable
- textTagTableRemove :: (HasCallStack, MonadIO m, IsTextTagTable a, IsTextTag b) => a -> b -> m ()
- type C_TextTagTableTagAddedCallback = Ptr () -> Ptr TextTag -> Ptr () -> IO ()
- type TextTagTableTagAddedCallback = TextTag -> IO ()
- afterTextTagTableTagAdded :: (IsTextTagTable a, MonadIO m) => a -> TextTagTableTagAddedCallback -> m SignalHandlerId
- genClosure_TextTagTableTagAdded :: MonadIO m => TextTagTableTagAddedCallback -> m (GClosure C_TextTagTableTagAddedCallback)
- mk_TextTagTableTagAddedCallback :: C_TextTagTableTagAddedCallback -> IO (FunPtr C_TextTagTableTagAddedCallback)
- noTextTagTableTagAddedCallback :: Maybe TextTagTableTagAddedCallback
- onTextTagTableTagAdded :: (IsTextTagTable a, MonadIO m) => a -> TextTagTableTagAddedCallback -> m SignalHandlerId
- wrap_TextTagTableTagAddedCallback :: TextTagTableTagAddedCallback -> C_TextTagTableTagAddedCallback
- type C_TextTagTableTagChangedCallback = Ptr () -> Ptr TextTag -> CInt -> Ptr () -> IO ()
- type TextTagTableTagChangedCallback = TextTag -> Bool -> IO ()
- afterTextTagTableTagChanged :: (IsTextTagTable a, MonadIO m) => a -> TextTagTableTagChangedCallback -> m SignalHandlerId
- genClosure_TextTagTableTagChanged :: MonadIO m => TextTagTableTagChangedCallback -> m (GClosure C_TextTagTableTagChangedCallback)
- mk_TextTagTableTagChangedCallback :: C_TextTagTableTagChangedCallback -> IO (FunPtr C_TextTagTableTagChangedCallback)
- noTextTagTableTagChangedCallback :: Maybe TextTagTableTagChangedCallback
- onTextTagTableTagChanged :: (IsTextTagTable a, MonadIO m) => a -> TextTagTableTagChangedCallback -> m SignalHandlerId
- wrap_TextTagTableTagChangedCallback :: TextTagTableTagChangedCallback -> C_TextTagTableTagChangedCallback
- type C_TextTagTableTagRemovedCallback = Ptr () -> Ptr TextTag -> Ptr () -> IO ()
- type TextTagTableTagRemovedCallback = TextTag -> IO ()
- afterTextTagTableTagRemoved :: (IsTextTagTable a, MonadIO m) => a -> TextTagTableTagRemovedCallback -> m SignalHandlerId
- genClosure_TextTagTableTagRemoved :: MonadIO m => TextTagTableTagRemovedCallback -> m (GClosure C_TextTagTableTagRemovedCallback)
- mk_TextTagTableTagRemovedCallback :: C_TextTagTableTagRemovedCallback -> IO (FunPtr C_TextTagTableTagRemovedCallback)
- noTextTagTableTagRemovedCallback :: Maybe TextTagTableTagRemovedCallback
- onTextTagTableTagRemoved :: (IsTextTagTable a, MonadIO m) => a -> TextTagTableTagRemovedCallback -> m SignalHandlerId
- wrap_TextTagTableTagRemovedCallback :: TextTagTableTagRemovedCallback -> C_TextTagTableTagRemovedCallback
Exported types
newtype TextTagTable Source #
Memory-managed wrapper type.
Instances
Eq TextTagTable Source # | |
Defined in GI.Gtk.Objects.TextTagTable (==) :: TextTagTable -> TextTagTable -> Bool # (/=) :: TextTagTable -> TextTagTable -> Bool # | |
IsGValue TextTagTable Source # | Convert |
Defined in GI.Gtk.Objects.TextTagTable toGValue :: TextTagTable -> IO GValue # fromGValue :: GValue -> IO TextTagTable # | |
GObject TextTagTable Source # | |
Defined in GI.Gtk.Objects.TextTagTable gobjectType :: IO GType # | |
HasParentTypes TextTagTable Source # | |
Defined in GI.Gtk.Objects.TextTagTable | |
type ParentTypes TextTagTable Source # | |
Defined in GI.Gtk.Objects.TextTagTable |
class (GObject o, IsDescendantOf TextTagTable o) => IsTextTagTable o Source #
Type class for types which can be safely cast to TextTagTable
, for instance with toTextTagTable
.
Instances
(GObject o, IsDescendantOf TextTagTable o) => IsTextTagTable o Source # | |
Defined in GI.Gtk.Objects.TextTagTable |
toTextTagTable :: (MonadIO m, IsTextTagTable o) => o -> m TextTagTable Source #
Cast to TextTagTable
, for types for which this is known to be safe. For general casts, use castTo
.
noTextTagTable :: Maybe TextTagTable Source #
A convenience alias for Nothing
:: Maybe
TextTagTable
.
Methods
Overloaded methods
add
:: (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
:: (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
:: (HasCallStack, MonadIO m, IsTextTagTable a) | |
=> a |
|
-> m Int32 | Returns: number of tags in |
Returns the size of the table (number of tags)
lookup
:: (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
:: (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 C_TextTagTableTagAddedCallback = Ptr () -> Ptr TextTag -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextTagTableTagAddedCallback Source #
No description available in the introspection data.
afterTextTagTableTagAdded :: (IsTextTagTable a, MonadIO m) => a -> TextTagTableTagAddedCallback -> m SignalHandlerId Source #
Connect a signal handler for the tagAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textTagTable #tagAdded callback
genClosure_TextTagTableTagAdded :: MonadIO m => TextTagTableTagAddedCallback -> m (GClosure C_TextTagTableTagAddedCallback) Source #
Wrap the callback into a GClosure
.
mk_TextTagTableTagAddedCallback :: C_TextTagTableTagAddedCallback -> IO (FunPtr C_TextTagTableTagAddedCallback) Source #
Generate a function pointer callable from C code, from a C_TextTagTableTagAddedCallback
.
noTextTagTableTagAddedCallback :: Maybe TextTagTableTagAddedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextTagTableTagAddedCallback
onTextTagTableTagAdded :: (IsTextTagTable a, MonadIO m) => a -> TextTagTableTagAddedCallback -> m SignalHandlerId Source #
Connect a signal handler for the tagAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textTagTable #tagAdded callback
wrap_TextTagTableTagAddedCallback :: TextTagTableTagAddedCallback -> C_TextTagTableTagAddedCallback Source #
Wrap a TextTagTableTagAddedCallback
into a C_TextTagTableTagAddedCallback
.
tagChanged
type C_TextTagTableTagChangedCallback = Ptr () -> Ptr TextTag -> CInt -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextTagTableTagChangedCallback Source #
= TextTag |
|
-> Bool |
|
-> IO () |
No description available in the introspection data.
afterTextTagTableTagChanged :: (IsTextTagTable a, MonadIO m) => a -> TextTagTableTagChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the tagChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textTagTable #tagChanged callback
genClosure_TextTagTableTagChanged :: MonadIO m => TextTagTableTagChangedCallback -> m (GClosure C_TextTagTableTagChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_TextTagTableTagChangedCallback :: C_TextTagTableTagChangedCallback -> IO (FunPtr C_TextTagTableTagChangedCallback) Source #
Generate a function pointer callable from C code, from a C_TextTagTableTagChangedCallback
.
noTextTagTableTagChangedCallback :: Maybe TextTagTableTagChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextTagTableTagChangedCallback
onTextTagTableTagChanged :: (IsTextTagTable a, MonadIO m) => a -> TextTagTableTagChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the tagChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textTagTable #tagChanged callback
wrap_TextTagTableTagChangedCallback :: TextTagTableTagChangedCallback -> C_TextTagTableTagChangedCallback Source #
Wrap a TextTagTableTagChangedCallback
into a C_TextTagTableTagChangedCallback
.
tagRemoved
type C_TextTagTableTagRemovedCallback = Ptr () -> Ptr TextTag -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextTagTableTagRemovedCallback Source #
No description available in the introspection data.
afterTextTagTableTagRemoved :: (IsTextTagTable a, MonadIO m) => a -> TextTagTableTagRemovedCallback -> m SignalHandlerId Source #
Connect a signal handler for the tagRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textTagTable #tagRemoved callback
genClosure_TextTagTableTagRemoved :: MonadIO m => TextTagTableTagRemovedCallback -> m (GClosure C_TextTagTableTagRemovedCallback) Source #
Wrap the callback into a GClosure
.
mk_TextTagTableTagRemovedCallback :: C_TextTagTableTagRemovedCallback -> IO (FunPtr C_TextTagTableTagRemovedCallback) Source #
Generate a function pointer callable from C code, from a C_TextTagTableTagRemovedCallback
.
noTextTagTableTagRemovedCallback :: Maybe TextTagTableTagRemovedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextTagTableTagRemovedCallback
onTextTagTableTagRemoved :: (IsTextTagTable a, MonadIO m) => a -> TextTagTableTagRemovedCallback -> m SignalHandlerId Source #
Connect a signal handler for the tagRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textTagTable #tagRemoved callback