org.gnu.gtk

Class TextBuffer


public class TextBuffer
extends GObject

The TextBuffer is the object used to store data to be displayed in a TextView widget. See the TextView widget description for details.

Constructor Summary

TextBuffer()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
TextBuffer(TextTagTable table)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Method Summary

void
addClipboard(Clipboard clipboard)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
addListener(TextBufferListener listener)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
applyTag(String name, TextIter start, TextIter end)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
applyTag(TextTag tag, TextIter start, TextIter end)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
boolean
backspace(TextIter iter, boolean interactive, boolean default_editable)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
beginUserAction()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
copyClipboard(Clipboard clip)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
TextChildAnchor
createChildAnchor(TextIter iter)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
TextMark
createMark(String markName, TextIter where, boolean leftGravity)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
TextTag
createTag(String name)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
cutClipboard(Clipboard clipboard, boolean defaultEditable)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
deleteMark(String name)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
deleteMark(TextMark mark)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
boolean
deleteSelection(boolean interactive, boolean defaultEditable)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
deleteText(TextIter start, TextIter end)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
boolean
deleteTextInteractive(TextIter start, TextIter end, boolean defaultEditable)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
endUserAction()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
int
getCharCount()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
TextIter
getEndIter()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Class
getEventListenerClass(String signal)
TextView event handling.
EventType
getEventType(String signal)
TextMark
getInsert()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
TextIter
getIter(int charOffset)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
TextIter
getIter(int lineNumber, int charOffset)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
TextIter
getIter(TextChildAnchor anchor)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
TextIter
getIter(TextMark mark)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
int
getLineCount()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
TextIter
getLineIter(int line)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
TextMark
getMark(String name)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
boolean
getModified()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
boolean
getSelected()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
TextMark
getSelectionBound()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
TextIter
getSelectionEnd()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
TextIter
getSelectionStart()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
String
getSlice(TextIter start, TextIter end, boolean includeHiddenChars)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
TextIter
getStartIter()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
String
getText(TextIter start, TextIter end, boolean includeHiddenChars)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
TextTagTable
getTextTagTable()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
static Type
getType()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
inserChildAnchor(TextIter iter, TextChildAnchor anchor)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
insertPixbuf(TextIter iter, Pixbuf pixbuf)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
insertRange(TextIter iter, TextIter start, TextIter end)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
boolean
insertRangeInteractive(TextIter iter, TextIter start, TextIter end, boolean defaultEditable)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
insertText(String text)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
insertText(TextIter iter, String text)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
insertText(TextIter iter, String text, String tag)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
insertText(TextIter iter, String text, String[] tags)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
boolean
insertTextInteractive(String text, boolean defaultEditable)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
boolean
insertTextInteractive(TextIter iter, String text, boolean defaultEditable)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
boolean
markExists(String name)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
moveMark(String name, TextIter where)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
moveMark(TextMark mark, TextIter where)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
pasteClipboard(Clipboard clipboard, boolean defaultEditable)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
pasteClipboard(Clipboard clipboard, TextIter location, boolean defaultEditable)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
placeCursor(TextIter where)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
removeAllTags(TextIter start, TextIter end)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
removeAllTags(TextTag start, TextTag end)
Deprecated.
void
removeClipboard(Clipboard clipboard)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
removeListener(TextBufferListener listener)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
removeTag(String name, TextIter start, TextIter end)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
removeTag(TextTag tag, TextIter start, TextIter end)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
selectRange(TextIter ins, TextIter bound)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
setModified(boolean setting)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
void
setText(String text)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Constructor Details

TextBuffer

public TextBuffer()

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Creates a new buffer and a new default TextTagTable.

TextBuffer

public TextBuffer(TextTagTable table)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Creates a new text buffer.
Parameters:
table - A tag table

Method Details

addClipboard

public void addClipboard(Clipboard clipboard)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Adds clipboard to the list of clipboards in which the selection contents of buffer are available. In most cases, clipboard will be the GtkClipboard of type GDK_SELECTION_PRIMARY for a view of buffer.
Parameters:
clipboard - A ClipBoard

addListener

public void addListener(TextBufferListener listener)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Register an object to receive text view event notification.
Parameters:
listener - The object that has implemented the TextBufferListener interface that is to receive the text view events.

applyTag

public void applyTag(String name,
                     TextIter start,
                     TextIter end)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Looks up a tag by name and then applies it.
Parameters:
name - Name of a named TextTag
start - One bound of range to be tagged
end - Other bound of range to be tagged

applyTag

public void applyTag(TextTag tag,
                     TextIter start,
                     TextIter end)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Emits the "apply_tag" signal on buffer. The default handler for the signal applies tag to the given range. start and end do not have to be in order.
Parameters:
tag - A TextTag
start - One bound of range to be tagged
end - Other bound of range to be tagged

backspace

public boolean backspace(TextIter iter,
                         boolean interactive,
                         boolean default_editable)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Performs the appropriate action as if the user hit the delete key with the cursor at the position specified by iter. In the normal case a single character will be deleted, but when combining accents are involved, more than one character can be deleted, and when precomposed character and accent combinations are involved, less than one character will be deleted. Because the buffer is modified, all outstanding iterators become invalid after calling this function; however, the iter will be re-initialized to point to the location where text was deleted.
Parameters:
iter - A position in the buffer.
interactive - Whether the deletion is caused by user interaction.
default_editable - Whether the buffer is editable by default.
Returns:
TRUE if the buffer was modified.

beginUserAction

public void beginUserAction()

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Called to indicate that the buffer operations between here and a call to endUserAction() are part of a single user-visible operation. The operations between beginUserAction() and endUserAction() can then be grouped when creating an undo stack. TextBuffer maintains a count of calls to beginUserAction() that have not been closed with a call to endUserAction(), and emits the "begin_user_action" and "end_user_action" event only for the outermost pair of calls. This allows you to build user actions from other user actions.

The "interactive" buffer mutation functions automatically call begin/end user action around the buffer operations they perform, so there's no need to add extra calls if you user action consists solely of a single call to one of those functions.


copyClipboard

public void copyClipboard(Clipboard clip)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Copies the currently-selected text to a clipboard.
Parameters:
clip - The clipboard to copy the text to

createChildAnchor

public TextChildAnchor createChildAnchor(TextIter iter)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

This is a convenience function which simply creates a child anchor with {link TextChildAnchor#TextChildAnchor()} and inserts it into the buffer
Parameters:
iter - Location in the buffer
Returns:
The created child anchor

createMark

public TextMark createMark(String markName,
                           TextIter where,
                           boolean leftGravity)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Creates a mark at position where. Otherwise, the mark can be retrieved by name using getMark(String). If a mark has left gravity, and text is inserted at the mark's current location, the mark will be moved to the left of the newly-inserted text. If the mark has right gravity (leftGravity = FALSE), the mark will end up on the right of newly-inserted text. The standard left-to-right cursor is a mark with right gravity (when you type, the cursor stays on the right side of the text you're typing).

Emits the "mark_set" event as notification of the mark's initial placement.

Parameters:
markName - Name for mark
where - Location to place mark
leftGravity - Whether the mark has left gravity
Returns:
The new TextMark object

createTag

public TextTag createTag(String name)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Creates a TextTag initialised for use in this TextBuffer. If a TextTag already exists with this name null is returned.

cutClipboard

public void cutClipboard(Clipboard clipboard,
                         boolean defaultEditable)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Copies the currently-selected text to a clipboard, then deletes said text if it's editable.
Parameters:
clipboard - The Clipboard object to cut to.
defaultEditable - Default editability of the buffer

deleteMark

public void deleteMark(String name)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Deletes the mark named name; the mark must exist.
Parameters:
name - The name of the mark to delete

deleteMark

public void deleteMark(TextMark mark)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Deletes mark, so that it's no longer located anywhere in the buffer. There is no way to undelete a mark. TextMark.getDeleted() indicates that a mark no longer belongs to a buffer. The "mark_deleted" signal will be emitted as notification after the mark is deleted.
Parameters:
mark - A TextMark in buffer

deleteSelection

public boolean deleteSelection(boolean interactive,
                               boolean defaultEditable)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Deletes the range between the "insert" and "selection_bound" marks, that is, the currently-selected text. If interactive is TRUE, the editability of the selection will be considered (users can't delete uneditable text).
Parameters:
interactive - Whether the deletion is caused by user interaction
defaultEditable - Whether the buffer is editable by default
Returns:
Whether there was a non-empty selection to delete

deleteText

public void deleteText(TextIter start,
                       TextIter end)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Deletes text between start and end. The order of start and end is not actually relevant. This function actually emits the "delete_range" signal, and the default handler of that signal deletes the text. Because the buffer is modified, all outstanding iterators become invalid after calling this function; however, the start and end will be re-initialized to point to the location where text was deleted.
Parameters:
start - A position in buffer
end - Another position in buffer.

deleteTextInteractive

public boolean deleteTextInteractive(TextIter start,
                                     TextIter end,
                                     boolean defaultEditable)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Deletes all editable text in the given range. Calls deleteText(TextIter,TextIter) for each editable sub-range of start,end. start and end are revalidated to point to the location of the last deleted range, or left untouched if no text was deleted.
Parameters:
start - Start of range to delete
end - End of range
defaultEditable - Ehether the buffer is editable by default
Returns:
Whether some text was actually deleted

endUserAction

public void endUserAction()

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Should be paired with a call to beginUserAction(). See that function for a full explanation.

getCharCount

public int getCharCount()

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Gets the number of characters in the buffer. Note that characters and bytes are not the same. You can't expect the contents of the buffer in string form to be this many bytes long. The character count is cached, so this function is very fast.
Returns:
Number of characters in the buffer.

getEndIter

public TextIter getEndIter()

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns Iterator for the end of the text
Returns:
Iterator for the end of the text.

getEventListenerClass

public Class getEventListenerClass(String signal)
TextView event handling.

getEventType

public EventType getEventType(String signal)

getInsert

public TextMark getInsert()

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns the mark that represents the cursor (insertion point). Equivalent to calling gtk_text_buffer_get_mark() to get the mark named "insert", but very slightly more efficient, and involves less typing.
Returns:
Insertion point mark

getIter

public TextIter getIter(int charOffset)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Obtains an iterator pointing to charOffset within the entire string, statring from the beginning
Parameters:
charOffset - Character offset from the beginning of the text
Returns:
Iterator pointing to that point.

getIter

public TextIter getIter(int lineNumber,
                        int charOffset)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Obtains an iterator pointing to charOffset within the given line. The charOffset must exist, offsets off the end of the line are not allowed. Note characters, not bytes; UTF-8 may encode one character as multiple bytes.
Parameters:
lineNumber - Line number counting from 0
charOffset - Char offset from start of line
Returns:
Iterator

getIter

public TextIter getIter(TextChildAnchor anchor)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Obtains the location of anchor within buffer.
Parameters:
anchor - An anchor that appears in the buffer.
Returns:
Iterator

getIter

public TextIter getIter(TextMark mark)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns an iter at the given mark
Parameters:
mark - The position for the iter
Returns:
Iterator

getLineCount

public int getLineCount()

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Obtains the number of lines in the buffer. This value is cached, so the function is very fast.
Returns:
The number of lines in the buffer.

getLineIter

public TextIter getLineIter(int line)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Obtains an iterator pointing to the start of the given line
Parameters:
line - The line
Returns:
Iterator

getMark

public TextMark getMark(String name)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns the mark named name in the buffer, or null if no such mark exists in the buffer

getModified

public boolean getModified()

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Indicates whether the buffer has been modified since the last call to setModified(boolean) set the modification flag to FALSE. Used for example to enable a "save" function in a text editor.
Returns:
TRUE if the buffer has been modified

getSelected

public boolean getSelected()

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns true if an area of the buffer is selected
Returns:
True if an area is selected

getSelectionBound

public TextMark getSelectionBound()

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns the mark that represents the selection bound. Equivalent to calling getMark(String) to get the mark named "selection_bound", but very slightly more efficient, and involves less typing.

The currently-selected text in buffer is the region between the "selection_bound" and "insert" marks. If "selection_bound" and "insert" are in the same place, then there is no current selection.

Returns:
Mark for the selection

getSelectionEnd

public TextIter getSelectionEnd()

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns an iterator for the end of the selection, or null if no text is selected.

getSelectionStart

public TextIter getSelectionStart()

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns an iterator for the start of the selected text, or null if no text is selected.

getSlice

public String getSlice(TextIter start,
                       TextIter end,
                       boolean includeHiddenChars)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns the text in the range start,end. Excludes undisplayed text (text marked with tags that set the invisibility attribute) if includeHiddenChars is FALSE. The returned string includes a 0xFFFC character whenever the buffer contains embedded images, so byte and character indexes into the returned string do correspond to byte and character indexes into the buffer. Contrast with getText(TextIter,TextIter,boolean). Note that 0xFFFC can occur in normal text as well, so it is not a reliable indicator that a pixbuf or widget is in the buffer.
Parameters:
start - Start of a range
end - End of a range.
includeHiddenChars - Whether to include invisible text
Returns:
The string

getStartIter

public TextIter getStartIter()

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns an iterator for the start of the text
Returns:
iterator

getText

public String getText(TextIter start,
                      TextIter end,
                      boolean includeHiddenChars)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns the text in the range start,end. Excludes undisplayed text (text marked with tags that set the invisibility attribute) if includeHiddenChars is FALSE. Does not include characters representing embedded images, so byte and character indexes into the returned string do not correspond to byte and character indexes into the buffer. Contrast with getSlice(TextIter,TextIter,boolean).
Parameters:
start - Start of a range
end - End of a range
includeHiddenChars - Whether to include invisible text
Returns:
The text of the buffer

getTextTagTable

public TextTagTable getTextTagTable()

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Get the GtkTextTagTable associated with this buffer.
Returns:
Associated TextTagTable.

getType

public static Type getType()

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Retrieve the runtime type used by the GLib library.

inserChildAnchor

public void inserChildAnchor(TextIter iter,
                             TextChildAnchor anchor)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Inserts a child widget anchor into the text buffer at iter. The anchor will be counted as one character in character counts, and when obtaining the buffer contents as a string, will be represented by the Unicode "object replacement character" 0xFFFC. Note that the "slice" variants for obtaining portions of the buffer as a string include this character for child anchors, but the "text" variants do not.
Parameters:
iter - Location to insert the anchor
anchor - A TextChildAnchor

insertPixbuf

public void insertPixbuf(TextIter iter,
                         Pixbuf pixbuf)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Inserts an image into the text buffer at iter. The image will be counted as one character in character counts, and when obtaining the buffer contents as a string, will be represented by the Unicode "object replacement character" 0xFFFC. Note that the "slice" variants for obtaining portions of the buffer as a string include this character for pixbufs, but the "text" variants do not.
Parameters:
iter - Location to insert the pixbuf
pixbuf - A Pixbuf

insertRange

public void insertRange(TextIter iter,
                        TextIter start,
                        TextIter end)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Copies text, tags, and pixbufs between start and end (the order of start and end doesn't matter) and inserts the copy at iter. Used instead of simply getting/inserting text because it preserves images and tags. If start and end are in a different buffer from buffer, the two buffers must share the same tag table.

Implemented via emissions of the insert_text and apply_tag signals, so expect those.

Parameters:
iter - A position in the buffer
start - A position in a TextBuffer
end - Another position in the same buffer as start

insertRangeInteractive

public boolean insertRangeInteractive(TextIter iter,
                                      TextIter start,
                                      TextIter end,
                                      boolean defaultEditable)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Same as insertRange(TextIter,TextIter,TextIter), but does nothing if the insertion point isn't editable. The defaultEditable parameter indicates whether the text is editable at iter if no tags enclosing iter affect editability. Typically the result of TextView.getEditable() is appropriate here.
Parameters:
iter - A position in buffer
start - A position in a TextBuffer
end - Another position in the same buffer as start
defaultEditable - default editability of the buffer
Returns:
Whether an insertion was possible at iter.

insertText

public void insertText(String text)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Inserts text at the current cursor position
Parameters:
text - The text to insert

insertText

public void insertText(TextIter iter,
                       String text)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Inserts text at position iter. Emits the "insert_text" signal; insertion actually occurs in the default handler for the signal. iter is invalidated when insertion occurs (because the buffer contents change), but the default signal handler revalidates it to point to the end of the inserted text.
Parameters:
iter - A position in the buffer
text - The text to insert

insertText

public void insertText(TextIter iter,
                       String text,
                       String tag)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Inserts text and applies a tag to that text.
Parameters:
iter - Place to insert text
text - Text to insert
tag - name of TextTag to apply to that text.

insertText

public void insertText(TextIter iter,
                       String text,
                       String[] tags)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Inserts text and applies tags to that text.
Parameters:
iter - Place to insert text
text - Text to insert
tags - Array of TextTag names to apply to that text.

insertTextInteractive

public boolean insertTextInteractive(String text,
                                     boolean defaultEditable)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Calls insertTextInteractive(TextIter,String,boolean) at the cursor position.

defaultEditable indicates the editability of text that doesn't have a tag affecting editability applied to it. Typically the result of TextView.getEditable() is appropriate here.

Parameters:
text - The text to insert.
defaultEditable - Default editability of buffer
Returns:
Whether text was actually inserted.

insertTextInteractive

public boolean insertTextInteractive(TextIter iter,
                                     String text,
                                     boolean defaultEditable)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Like insertText(TextIter,String), but the insertion will not occur if iter is at a non-editable location in the buffer. Usually you want to prevent insertions at ineditable locations if the insertion results from a user action (is interactive).

defaultEditable indicates the editability of text that doesn't have a tag affecting editability applied to it. Typically the result of TextView.getEditable() is appropriate here.

Parameters:
iter - A position in buffer
text - The text to insert
defaultEditable - Default editability of buffer
Returns:
Whether text was actually inserted

markExists

public boolean markExists(String name)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns true if a mark exists with the given name.

moveMark

public void moveMark(String name,
                     TextIter where)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Moves the mark named name (which must exist) to location where
Parameters:
name - Name of a mark
where - New location for mark

moveMark

public void moveMark(TextMark mark,
                     TextIter where)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Moves mark to the new location where. Emits the "mark_set" event as notification of the move.
Parameters:
mark - A TextMark
where - New location for mark in buffer

pasteClipboard

public void pasteClipboard(Clipboard clipboard,
                           boolean defaultEditable)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Pastes the contents of a clipboard at the insertion point. (Note: pasting is asynchronous, that is, we'll ask for the paste data and return, and at some point later after the main loop runs, the paste data will be inserted.)
Parameters:
clipboard - The Clipboard to paste from
defaultEditable - Whether the buffer is editable by default

pasteClipboard

public void pasteClipboard(Clipboard clipboard,
                           TextIter location,
                           boolean defaultEditable)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Pastes the contents of a clipboard at location. (Note: pasting is asynchronous, that is, we'll ask for the paste data and return, and at some point later after the main loop runs, the paste data will be inserted.)
Parameters:
clipboard - The Clipboard to paste from
location - Location to insert pasted text
defaultEditable - Whether the buffer is editable by default

placeCursor

public void placeCursor(TextIter where)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

This function moves the "insert" and "selection_bound" marks simultaneously. If you move them to the same place in two steps with moveMark(TextMark,TextIter), you will temporarily select a region in between their old and new locations, which can be pretty inefficient since the temporarily-selected region will force stuff to be recalculated. This function moves them as a unit, which can be optimized.
Parameters:
where - Where to put the cursor

removeAllTags

public void removeAllTags(TextIter start,
                          TextIter end)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Removes all tags in the range between start and end. Be careful with this function; it could remove tags added in code unrelated to the code you're currently writing. That is, using this function is probably a bad idea if you have two or more unrelated code sections that add tags.
Parameters:
start -
end -

removeAllTags

public void removeAllTags(TextTag start,
                          TextTag end)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Removes all tags in the range between start and end. Be careful with this function; it could remove tags added in code unrelated to the code you're currently writing. That is, using this function is probably a bad idea if you have two or more unrelated code sections that add tags.

THIS METHOD IS INCORRECT AND SHOULD NOT BE USED Use removeAllTags(TextIter,TextIter) instead

Parameters:
start - One bound of range to be untagged
end - Other bound of range to be untagged

removeClipboard

public void removeClipboard(Clipboard clipboard)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Removes a clipboard added with addClipboard(Clipboard)
Parameters:
clipboard - The clipboard to remove

removeListener

public void removeListener(TextBufferListener listener)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Unregister an object that was receiving text view event notification.
Parameters:
listener - The object that is to no longer receive text view events.

removeTag

public void removeTag(String name,
                      TextIter start,
                      TextIter end)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Removes a tag based on it's name.
Parameters:
name - Name of a TextTag
start - One bound of range to be untagged
end - Other bound of range to be untagged

removeTag

public void removeTag(TextTag tag,
                      TextIter start,
                      TextIter end)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Emits the "remove_tag" signal. The default handler for the signal removes all occurrences of tag from the given range. start and end don't have to be in order
Parameters:
tag - A TextTag
start - One bound of range to be untagged
end - Other bound of range to be untagged

selectRange

public void selectRange(TextIter ins,
                        TextIter bound)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

This function moves the "insert" and "selection_bound" marks simultaneously. If you move them in two steps with moveMark, you will temporarily select a region in between their old and new locations, which can be pretty inefficient since the temporarily-selected region will force stuff to be recalculated. This function moves them as a unit, which can be optimized.
Parameters:
ins - where to put the "insert" mark
bound - where to put the "selection_bound" mark
Since:
2.4

setModified

public void setModified(boolean setting)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Used to keep track of whether the buffer has been modified since the last time it was saved. Whenever the buffer is saved to disk, call setModified(FALSE). When the buffer is modified, it will automatically toggled on the modified bit again. When the modified bit flips, the buffer emits a "modified_changed" event.
Parameters:
setting - Modification flag setting

setText

public void setText(String text)

Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Deletes current contents of buffer, and inserts text instead.
Parameters:
text - The text to use as the content of the buffer.