gi-gtk-4.0.2: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.TextTagTable

Description

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

Exported types

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

Instances details
(GObject o, IsDescendantOf TextTagTable o) => IsTextTagTable o Source # 
Instance details

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.

Methods

Overloaded methods

add

textTagTableAdd Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextTagTable a, IsTextTag b) 
=> a

table: a TextTagTable

-> b

tag: a TextTag

-> m Bool

Returns: True on success.

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

textTagTableForeach Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextTagTable a) 
=> a

table: a TextTagTable

-> TextTagTableForeach

func: a function to call on each tag

-> 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

textTagTableGetSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextTagTable a) 
=> a

table: a TextTagTable

-> m Int32

Returns: number of tags in table

Returns the size of the table (number of tags)

lookup

textTagTableLookup Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextTagTable a) 
=> a

table: a TextTagTable

-> Text

name: name of a tag

-> m (Maybe TextTag)

Returns: The tag, or Nothing if none by that name is in the table.

Look up a named tag.

new

textTagTableNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m TextTagTable

Returns: a new TextTagTable

Creates a new TextTagTable. The table contains no tags by default.

remove

textTagTableRemove Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextTagTable a, IsTextTag b) 
=> a

table: a TextTagTable

-> b

tag: a TextTag

-> 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 #

Arguments

 = TextTag

tag: the added tag.

-> IO () 

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

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

tagChanged

type C_TextTagTableTagChangedCallback = Ptr () -> Ptr TextTag -> CInt -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type TextTagTableTagChangedCallback Source #

Arguments

 = TextTag

tag: the changed tag.

-> Bool

sizeChanged: whether the change affects the TextView layout.

-> 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

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

tagRemoved

type C_TextTagTableTagRemovedCallback = Ptr () -> Ptr TextTag -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type TextTagTableTagRemovedCallback Source #

Arguments

 = TextTag

tag: the removed tag.

-> IO () 

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

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