GtkTextBuffer {RGtk2}R Documentation

GtkTextBuffer

Description

Stores attributed text for display in a GtkTextView

Methods and Functions

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)

Hierarchy

  GObject
   +----GtkTextBuffer

Detailed Description

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.

Structures

GtkTextBuffer
undocumented

tagTable
[GtkTextTagTable]

Convenient Construction

gtkTextBuffer is the equivalent of gtkTextBufferNew.

Enums and Flags

GtkTextBufferTargetInfo
undocumented

buffer-contents
undocumented
rich-text
undocumented
text
undocumented

User Functions

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.buffer
[GtkTextBuffer] the GtkTextBuffer the format is registered with
content.buffer
[GtkTextBuffer] the GtkTextBuffer to deserialize into
iter
[GtkTextIter] insertion point for the deserialized text
data
[raw] data to deserialize
length
[numeric] length of data
create.tags
[logical] TRUE if deserializing may create tags
user.data
[R object] user data that was specified when registering the format
error
[GError] return 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.buffer
[GtkTextBuffer] the GtkTextBuffer for which the format is registered
content.buffer
[GtkTextBuffer] the GtkTextsBuffer to serialize
start
[GtkTextIter] start of the block of text to serialize
end
[GtkTextIter] end of the block of text to serialize
length
[numeric] Return location for the length of the serialized data
user.data
[R object] user 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

Signals

The (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.

textbuffer
[GtkTextBuffer] the object which received the signal
tag
[GtkTextTag] the applied tag
start
[GtkTextIter] the start of the range the tag is applied to
end
[GtkTextIter] the end of the range the tag is applied to
user.data
[R object] user data set when the signal handler was connected.

The (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.

textbuffer
[GtkTextBuffer] the object which received the signal
user.data
[R object] user data set when the signal handler was connected.

The (textbuffer, user.data)
The changed signal is emitted when the content of a GtkTextBuffer has changed.

textbuffer
[GtkTextBuffer] the object which received the signal
user.data
[R object] user data set when the signal handler was connected.

The (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.

textbuffer
[GtkTextBuffer] the object which received the signal
start
[GtkTextIter] the start of the range to be deleted
end
[GtkTextIter] the end of the range to be deleted
user.data
[R object] user data set when the signal handler was connected.

The (textbuffer, user.data)
The end_user_action signal is emitted at the end of a single user-visible operation GtkTextBuffer.

See also: gtkTextBufferEndUserAction, gtkTextBufferInsertInteractive, gtkTextBufferInsertRangeInteractive, gtkTextBufferDeleteInteractive, gtkTextBufferBackspace, gtkTextBufferDeleteSelection, gtkTextBufferBackspace.

textbuffer
[GtkTextBuffer] the object which received the signal
user.data
[R object] user data set when the signal handler was connected.

The (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.

textbuffer
[GtkTextBuffer] the object which received the signal
location
[GtkTextIter] position to insert anchor in textbuffer
anchor
[GtkTextChildAnchor] the GtkTextChildAnchor to be inserted
user.data
[R object] user data set when the signal handler was connected.

The (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.

textbuffer
[GtkTextBuffer] the object which received the signal
location
[GtkTextIter] position to insert pixbuf in textbuffer
pixbuf
[GdkPixbuf] the GdkPixbuf to be inserted
user.data
[R object] user data set when the signal handler was connected.

The (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.

textbuffer
[GtkTextBuffer] the object which received the signal
location
[GtkTextIter] position to insert text in textbuffer
text
[character] the UTF-8 text to be inserted
len
[integer] length of the inserted text in bytes
user.data
[R object] user data set when the signal handler was connected.

The (textbuffer, mark, user.data)
The mark_deleted signal is emitted as notification after a GtkTextMark is deleted.

See also: gtkTextBufferDeleteMark.

textbuffer
[GtkTextBuffer] the object which received the signal
mark
[GtkTextMark] The mark that was deleted
user.data
[R object] user data set when the signal handler was connected.

The (textbuffer, location, mark, user.data)
The mark_set signal is emitted as notification after a GtkTextMark is set.

See also: gtkTextBufferCreateMark, gtkTextBufferMoveMark.

textbuffer
[GtkTextBuffer] the object which received the signal
location
[GtkTextIter] The location of mark in textbuffer
mark
[GtkTextMark] The mark that is set
user.data
[R object] user data set when the signal handler was connected.

The (textbuffer, user.data)
The modified_changed signal is emitted when the modified bit of a GtkTextBuffer flips.

See also: gtkTextBufferSetModified.

textbuffer
[GtkTextBuffer] the object which received the signal
user.data
[R object] user data set when the signal handler was connected.

The (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.

textbuffer
[GtkTextBuffer] the object which received the signal
tag
[GtkTextTag] the tag to be removed
start
[GtkTextIter] the start of the range the tag is removed from
end
[GtkTextIter] the end of the range the tag is removed from
user.data
[R object] user data set when the signal handler was connected.

Properties

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

Author(s)

Derived by RGtkGen from GTK+ documentation

References

http://developer.gnome.org/doc/API/2.0/gtk/GtkTextBuffer.html

See Also

GtkTextView GtkTextIter GtkTextMark


[Package RGtk2 version 2.12.5-3 Index]