Description Methods and Functions Hierarchy Detailed Description Structures Convenient Construction Enums and Flags User Functions Signals Properties Author(s) References See Also
Stores attributed text for display in a GtkTextView
gtkTextBufferNew(table = NULL)
gtkTextBufferGetLineCount(object)
gtkTextBufferGetCharCount(object)
gtkTextBufferGetTagTable(object)
gtkTextBufferInsert(object, iter, text, len = -1)
gtkTextBufferInsertAtCursor(object, text, len = -1)
gtkTextBufferInsertInteractive(object, iter, text, default.editable)
gtkTextBufferInsertInteractiveAtCursor(object, text, default.editable)
gtkTextBufferInsertRange(object, iter, start, end)
gtkTextBufferInsertRangeInteractive(object, iter, start, end, default.editable)
gtkTextBufferInsertWithTags(object, iter, text, ...)
gtkTextBufferInsertWithTagsByName(object, iter, text, ...)
gtkTextBufferDelete(object, start, end)
gtkTextBufferDeleteInteractive(object, start.iter, end.iter, default.editable)
gtkTextBufferBackspace(object, iter, interactive, default.editable)
gtkTextBufferSetText(object, text, len = -1)
gtkTextBufferGetText(object, start, end, include.hidden.chars = TRUE)
gtkTextBufferGetSlice(object, start, end, include.hidden.chars = TRUE)
gtkTextBufferInsertPixbuf(object, iter, pixbuf)
gtkTextBufferInsertChildAnchor(object, iter, anchor)
gtkTextBufferCreateChildAnchor(object, iter)
gtkTextBufferCreateMark(object, mark.name = NULL, where, left.gravity = FALSE)
gtkTextBufferMoveMark(object, mark, where)
gtkTextBufferMoveMarkByName(object, name, where)
gtkTextBufferAddMark(object, mark, where)
gtkTextBufferDeleteMark(object, mark)
gtkTextBufferDeleteMarkByName(object, name)
gtkTextBufferGetMark(object, name)
gtkTextBufferGetInsert(object)
gtkTextBufferGetSelectionBound(object)
gtkTextBufferGetHasSelection(object)
gtkTextBufferPlaceCursor(object, where)
gtkTextBufferSelectRange(object, ins, bound)
gtkTextBufferApplyTag(object, tag, start, end)
gtkTextBufferRemoveTag(object, tag, start, end)
gtkTextBufferApplyTagByName(object, name, start, end)
gtkTextBufferRemoveTagByName(object, name, start, end)
gtkTextBufferRemoveAllTags(object, start, end)
gtkTextBufferCreateTag(object, tag.name, ...)
gtkTextBufferGetIterAtLineOffset(object, line.number, char.offset)
gtkTextBufferGetIterAtOffset(object, char.offset)
gtkTextBufferGetIterAtLine(object, line.number)
gtkTextBufferGetIterAtLineIndex(object, line.number, byte.index)
gtkTextBufferGetIterAtMark(object, mark)
gtkTextBufferGetIterAtChildAnchor(object, anchor)
gtkTextBufferGetStartIter(object)
gtkTextBufferGetEndIter(object)
gtkTextBufferGetBounds(object)
gtkTextBufferGetModified(object)
gtkTextBufferSetModified(object, setting)
gtkTextBufferDeleteSelection(object, interactive, default.editable)
gtkTextBufferPasteClipboard(object, clipboard, override.location = NULL, default.editable)
gtkTextBufferCopyClipboard(object, clipboard)
gtkTextBufferCutClipboard(object, clipboard, default.editable)
gtkTextBufferGetSelectionBounds(object)
gtkTextBufferBeginUserAction(object)
gtkTextBufferEndUserAction(object)
gtkTextBufferAddSelectionClipboard(object, clipboard)
gtkTextBufferRemoveSelectionClipboard(object, clipboard)
gtkTextBufferDeserialize(object, content.buffer, format, iter, data, .errwarn = TRUE)
gtkTextBufferDeserializeGetCanCreateTags(object, format)
gtkTextBufferDeserializeSetCanCreateTags(object, format, can.create.tags)
gtkTextBufferGetCopyTargetList(object)
gtkTextBufferGetDeserializeFormats(object)
gtkTextBufferGetPasteTargetList(object)
gtkTextBufferGetSerializeFormats(object)
gtkTextBufferRegisterDeserializeFormat(object, mime.type, fun, user.data)
gtkTextBufferRegisterDeserializeTagset(object, tagset.name = NULL)
gtkTextBufferRegisterSerializeFormat(object, mime.type, fun, user.data)
gtkTextBufferRegisterSerializeTagset(object, tagset.name = NULL)
gtkTextBufferSerialize(object, content.buffer, format, start, end)
gtkTextBufferUnregisterDeserializeFormat(object, format)
gtkTextBufferUnregisterSerializeFormat(object, format)
gtkTextBuffer(table = NULL)
1 2 | GObject
+----GtkTextBuffer
|
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.
GtkTextBufferundocumented
tagTable[GtkTextTagTable]
gtkTextBuffer is the equivalent of gtkTextBufferNew.
GtkTextBufferTargetInfoundocumented
buffer-contentsundocumented
rich-textundocumented
textundocumented
GtkTextBufferDeserializeFunc(register.buffer, content.buffer, iter, data, length, create.tags, user.data, error)A function that is called to deserialize rich text that has been
serialized with gtkTextBufferSerialize, and insert it at iter.
register.bufferthe GtkTextBuffer the format is registered with
content.bufferthe GtkTextBuffer to deserialize into
iterinsertion point for the deserialized text
datadata to deserialize
lengthlength of data
create.tagsTRUE if deserializing may create tags
user.datauser data that was specified when registering the format
errorreturn location for a GError
Returns: [logical] TRUE on success, FALSE otherwise
GtkTextBufferSerializeFunc(register.buffer, content.buffer, start, end, length, user.data)A function that is called to serialize the content of a text buffer. It must return the serialized form of the content.
register.bufferthe GtkTextBuffer for which the format is registered
content.bufferthe GtkTextsBuffer to serialize
startstart of the block of text to serialize
endend of the block of text to serialize
lengthReturn location for the length of the serialized data
user.datauser data that was specified when registering the format
Returns: [raw] a newly-allocated list of guint8 which contains the serialized
data, or NULL if an error occurred
apply-tag(textbuffer, tag, start, end, user.data)The ::apply-tag signal is emitted to apply a tag to a
range of text in a GtkTextBuffer.
Applying actually occurs in the default handler.
Note that if your handler runs before the default handler it must not
invalidate the start and end iters (or has to revalidate them).
See also:
gtkTextBufferApplyTag,
gtkTextBufferInsertWithTags,
gtkTextBufferInsertRange.
textbufferthe object which received the signal
tagthe applied tag
startthe start of the range the tag is applied to
endthe end of the range the tag is applied to
user.datauser data set when the signal handler was connected.
begin-user-action(textbuffer, user.data)The ::begin-user-action signal is emitted at the beginning of a single
user-visible operation on a GtkTextBuffer.
See also:
gtkTextBufferBeginUserAction,
gtkTextBufferInsertInteractive,
gtkTextBufferInsertRangeInteractive,
gtkTextBufferDeleteInteractive,
gtkTextBufferBackspace,
gtkTextBufferDeleteSelection.
textbufferthe object which received the signal
user.datauser data set when the signal handler was connected.
changed(textbuffer, user.data)The ::changed signal is emitted when the content of a GtkTextBuffer
has changed.
textbufferthe object which received the signal
user.datauser data set when the signal handler was connected.
delete-range(textbuffer, start, end, user.data)The ::delete-range signal is emitted to delete a range
from a GtkTextBuffer.
Note that if your handler runs before the default handler it must not
invalidate the start and end iters (or has to revalidate them).
The default signal handler revalidates the start and end iters to
both point point to the location where text was deleted. Handlers
which run after the default handler (see gSignalConnectAfter())
do not have access to the deleted text.
See also: gtkTextBufferDelete.
textbufferthe object which received the signal
startthe start of the range to be deleted
endthe end of the range to be deleted
user.datauser data set when the signal handler was connected.
end-user-action(textbuffer, user.data)The ::end-user-action signal is emitted at the end of a single
user-visible operation on the GtkTextBuffer.
See also:
gtkTextBufferEndUserAction,
gtkTextBufferInsertInteractive,
gtkTextBufferInsertRangeInteractive,
gtkTextBufferDeleteInteractive,
gtkTextBufferBackspace,
gtkTextBufferDeleteSelection,
gtkTextBufferBackspace.
textbufferthe object which received the signal
user.datauser data set when the signal handler was connected.
insert-child-anchor(textbuffer, location, anchor, user.data)The ::insert-child-anchor signal is emitted to insert a
GtkTextChildAnchor in a GtkTextBuffer.
Insertion actually occurs in the default handler.
Note that if your handler runs before the default handler it must
not invalidate the location iter (or has to revalidate it).
The default signal handler revalidates it to be placed after the
inserted anchor.
See also: gtkTextBufferInsertChildAnchor.
textbufferthe object which received the signal
locationposition to insert anchor in textbuffer
anchorthe GtkTextChildAnchor to be inserted
user.datauser data set when the signal handler was connected.
insert-pixbuf(textbuffer, location, pixbuf, user.data)The ::insert-pixbuf signal is emitted to insert a GdkPixbuf
in a GtkTextBuffer. Insertion actually occurs in the default handler.
Note that if your handler runs before the default handler it must not
invalidate the location iter (or has to revalidate it).
The default signal handler revalidates it to be placed after the
inserted pixbuf.
See also: gtkTextBufferInsertPixbuf.
textbufferthe object which received the signal
locationposition to insert pixbuf in textbuffer
pixbufthe GdkPixbuf to be inserted
user.datauser data set when the signal handler was connected.
insert-text(textbuffer, location, text, len, user.data)The ::insert-text signal is emitted to insert text in a GtkTextBuffer.
Insertion actually occurs in the default handler.
Note that if your handler runs before the default handler it must not
invalidate the location iter (or has to revalidate it).
The default signal handler revalidates it to point to the end of the
inserted text.
See also:
gtkTextBufferInsert,
gtkTextBufferInsertRange.
textbufferthe object which received the signal
locationposition to insert text in textbuffer
textthe UTF-8 text to be inserted
lenlength of the inserted text in bytes
user.datauser data set when the signal handler was connected.
mark-deleted(textbuffer, mark, user.data)The ::mark-deleted signal is emitted as notification
after a GtkTextMark is deleted.
See also:
gtkTextBufferDeleteMark.
textbufferthe object which received the signal
markThe mark that was deleted
user.datauser data set when the signal handler was connected.
mark-set(textbuffer, location, mark, user.data)The ::mark-set signal is emitted as notification
after a GtkTextMark is set.
See also:
gtkTextBufferCreateMark,
gtkTextBufferMoveMark.
textbufferthe object which received the signal
locationThe location of mark in textbuffer
markThe mark that is set
user.datauser data set when the signal handler was connected.
modified-changed(textbuffer, user.data)The ::modified-changed signal is emitted when the modified bit of a
GtkTextBuffer flips.
See also:
gtkTextBufferSetModified.
textbufferthe object which received the signal
user.datauser data set when the signal handler was connected.
paste-done(textbuffer, user.data)The paste-done signal is emitted after paste operation has been completed.
This is useful to properly scroll the view to the end of the pasted text.
See gtkTextBufferPasteClipboard for more details.
Since 2.16
textbufferthe object which received the signal
user.datauser data set when the signal handler was connected.
remove-tag(textbuffer, tag, start, end, user.data)The ::remove-tag signal is emitted to remove all occurrences of tag from
a range of text in a GtkTextBuffer.
Removal actually occurs in the default handler.
Note that if your handler runs before the default handler it must not
invalidate the start and end iters (or has to revalidate them).
See also:
gtkTextBufferRemoveTag.
textbufferthe object which received the signal
tagthe tag to be removed
startthe start of the range the tag is removed from
endthe end of the range the tag is removed from
user.datauser data set when the signal handler was connected.
copy-target-list [GtkTargetList : * : Read]The list of targets this buffer supports for clipboard copying and as DND source. Since 2.10
cursor-position [integer : Read]The position of the insert mark (as offset from the beginning of the buffer). It is useful for getting notified when the cursor moves. Allowed values: >= 0 Default value: 0 Since 2.10
has-selection [logical : Read]Whether the buffer has some text currently selected. Default value: FALSE Since 2.10
paste-target-list [GtkTargetList : * : Read]The list of targets this buffer supports for clipboard pasting and as DND destination. Since 2.10
tag-table [GtkTextTagTable : * : Read / Write / Construct Only]Text Tag Table.
text [character : * : Read / Write]The text content of the buffer. Without child widgets and images,
see gtkTextBufferGetText for more information.
Default value: "" Since 2.8
Derived by RGtkGen from GTK+ documentation
https://developer.gnome.org/gtk2/stable/GtkTextBuffer.html
GtkTextView
GtkTextIter
GtkTextMark
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.