|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.GObject
org.gnu.gtk.TextBuffer
org.gnome.gtk.TextBuffer
.
You should be aware that there is a considerably different API
in the new library: the architecture is completely different
and most notably internals are no longer exposed to public view.
public class TextBuffer
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(java.lang.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(java.lang.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(java.lang.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(java.lang.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. |
java.lang.Class |
getEventListenerClass(java.lang.String signal)
Deprecated. TextView event handling. |
org.gnu.glib.EventType |
getEventType(java.lang.String signal)
Deprecated. |
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(java.lang.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. |
java.lang.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. |
java.lang.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 org.gnu.glib.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(java.lang.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,
java.lang.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,
java.lang.String text,
java.lang.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,
java.lang.String text,
java.lang.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(java.lang.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,
java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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. |
Methods inherited from class org.gnu.glib.GObject |
---|
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setProperty, setStringProperty, thawNotify |
Methods inherited from class org.gnu.glib.Struct |
---|
equals, getHandle, getNullHandle, hashCode |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextBuffer(TextTagTable table)
table
- A tag tablepublic TextBuffer()
Method Detail |
---|
public int getLineCount()
public int getCharCount()
public TextTagTable getTextTagTable()
public void insertText(TextIter iter, java.lang.String text)
iter
- A position in the buffertext
- The text to insert
java.lang.IllegalArgumentException
- If text
is nullpublic void insertText(java.lang.String text)
text
- The text to insert
java.lang.IllegalArgumentException
- If text
is nullpublic boolean insertTextInteractive(TextIter iter, java.lang.String text, boolean defaultEditable)
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.
iter
- A position in buffertext
- The text to insertdefaultEditable
- Default editability of buffer
java.lang.IllegalArgumentException
- If text
is nullpublic boolean insertTextInteractive(java.lang.String text, boolean defaultEditable)
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.
text
- The text to insert.defaultEditable
- Default editability of buffer
java.lang.IllegalArgumentException
- If text
is nullpublic void insertRange(TextIter iter, TextIter start, TextIter end)
Implemented via emissions of the insert_text and apply_tag signals, so expect those.
iter
- A position in the bufferstart
- A position in a TextBufferend
- Another position in the same buffer as startpublic void insertText(TextIter iter, java.lang.String text, java.lang.String tag)
iter
- Place to insert texttext
- Text to inserttag
- name of TextTag to apply to that text.
java.lang.IllegalArgumentException
- If text
is nullpublic void insertText(TextIter iter, java.lang.String text, java.lang.String[] tags)
iter
- Place to insert texttext
- Text to inserttags
- Array of TextTag names to apply to that text.public boolean insertRangeInteractive(TextIter iter, TextIter start, TextIter end, boolean defaultEditable)
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.
iter
- A position in bufferstart
- A position in a TextBufferend
- Another position in the same buffer as startdefaultEditable
- default editability of the buffer
public void deleteText(TextIter start, TextIter end)
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.
start
- A position in bufferend
- Another position in buffer.public boolean deleteTextInteractive(TextIter start, TextIter end, boolean defaultEditable)
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.
start
- Start of range to deleteend
- End of rangedefaultEditable
- Ehether the buffer is editable by default
public void setText(java.lang.String text)
text
instead.
text
- The text to use as the content of the buffer.
java.lang.IllegalArgumentException
- If text
is nullpublic java.lang.String getText(TextIter start, TextIter end, boolean includeHiddenChars)
getSlice(TextIter, TextIter, boolean)
.
start
- Start of a rangeend
- End of a rangeincludeHiddenChars
- Whether to include invisible text
public java.lang.String getSlice(TextIter start, TextIter end, boolean includeHiddenChars)
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.
start
- Start of a rangeend
- End of a range.includeHiddenChars
- Whether to include invisible text
public void insertPixbuf(TextIter iter, Pixbuf pixbuf)
iter
- Location to insert the pixbufpixbuf
- A Pixbufpublic void inserChildAnchor(TextIter iter, TextChildAnchor anchor)
iter
- Location to insert the anchoranchor
- A TextChildAnchorpublic TextChildAnchor createChildAnchor(TextIter iter)
iter
- Location in the buffer
public TextMark createMark(java.lang.String markName, TextIter where, boolean leftGravity)
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.
markName
- Name for markwhere
- Location to place markleftGravity
- Whether the mark has left gravity
public void moveMark(TextMark mark, TextIter where)
mark
to the new location where
.
Emits the "mark_set" event as notification of the move.
mark
- A TextMarkwhere
- New location for mark in bufferpublic void moveMark(java.lang.String name, TextIter where)
name
(which must exist) to location
where
name
- Name of a markwhere
- New location for markpublic void deleteMark(TextMark mark)
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.
mark
- A TextMark in bufferpublic void deleteMark(java.lang.String name)
name
; the mark must exist.
name
- The name of the mark to deletedeleteMark(TextMark)
public boolean markExists(java.lang.String name)
public TextMark getMark(java.lang.String name)
name
in the buffer, or
null
if no such mark exists in the buffer
public TextMark getInsert()
public TextMark getSelectionBound()
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.
public void placeCursor(TextIter where)
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.
where
- Where to put the cursorpublic void applyTag(TextTag tag, TextIter start, TextIter end)
tag
- A TextTagstart
- One bound of range to be taggedend
- Other bound of range to be taggedpublic void removeTag(TextTag tag, TextIter start, TextIter end)
tag
- A TextTagstart
- One bound of range to be untaggedend
- Other bound of range to be untaggedpublic void applyTag(java.lang.String name, TextIter start, TextIter end)
name
- Name of a named TextTagstart
- One bound of range to be taggedend
- Other bound of range to be taggedpublic void removeTag(java.lang.String name, TextIter start, TextIter end)
name
- Name of a TextTagstart
- One bound of range to be untaggedend
- Other bound of range to be untaggedpublic void removeAllTags(TextTag start, TextTag end)
THIS METHOD IS INCORRECT AND SHOULD NOT BE USED Use
removeAllTags(TextIter, TextIter)
instead
start
- One bound of range to be untaggedend
- Other bound of range to be untaggedpublic void removeAllTags(TextIter start, TextIter end)
start
- end
- public TextIter getIter(int lineNumber, int charOffset)
lineNumber
- Line number counting from 0charOffset
- Char offset from start of line
public TextIter getIter(int charOffset)
charOffset
- Character offset from the beginning of the text
public TextIter getLineIter(int line)
line
- The line
public TextIter getIter(TextMark mark)
mark
- The position for the iter
public TextIter getIter(TextChildAnchor anchor)
anchor
- An anchor that appears in the buffer.
public TextIter getStartIter()
public TextIter getEndIter()
public boolean getModified()
setModified(boolean)
set the modification flag to FALSE. Used
for example to enable a "save" function in a text editor.
public void setModified(boolean setting)
setting
- Modification flag settingpublic boolean deleteSelection(boolean interactive, boolean defaultEditable)
interactive
- Whether the deletion is caused by user interactiondefaultEditable
- Whether the buffer is editable by default
public void pasteClipboard(Clipboard clipboard, TextIter location, boolean defaultEditable)
clipboard
- The Clipboard to paste fromlocation
- Location to insert pasted textdefaultEditable
- Whether the buffer is editable by defaultpublic void pasteClipboard(Clipboard clipboard, boolean defaultEditable)
clipboard
- The Clipboard to paste fromdefaultEditable
- Whether the buffer is editable by defaultpublic void copyClipboard(Clipboard clip)
clip
- The clipboard to copy the text topublic void cutClipboard(Clipboard clipboard, boolean defaultEditable)
clipboard
- The Clipboard object to cut to.defaultEditable
- Default editability of the bufferpublic boolean getSelected()
public TextIter getSelectionStart()
null
if no text is selected.
public TextIter getSelectionEnd()
null
if no text is selected.
public void beginUserAction()
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.
public void endUserAction()
beginUserAction()
. See that
function for a full explanation.
public void addClipboard(Clipboard clipboard)
clipboard
- A ClipBoardpublic void removeClipboard(Clipboard clipboard)
addClipboard(Clipboard)
clipboard
- The clipboard to removepublic void selectRange(TextIter ins, TextIter bound)
ins
- where to put the "insert" markbound
- where to put the "selection_bound" markpublic boolean backspace(TextIter iter, boolean interactive, boolean default_editable)
iter
- A position in the buffer.interactive
- Whether the deletion is caused by user interaction.default_editable
- Whether the buffer is editable by default.
public java.lang.Class getEventListenerClass(java.lang.String signal)
getEventListenerClass
in class org.gnu.glib.GObject
public org.gnu.glib.EventType getEventType(java.lang.String signal)
getEventType
in class org.gnu.glib.GObject
public void addListener(TextBufferListener listener)
listener
- The object that has implemented the TextBufferListener
interface that is to receive the text view events.public void removeListener(TextBufferListener listener)
listener
- The object that is to no longer receive text view events.public static org.gnu.glib.Type getType()
public TextTag createTag(java.lang.String name)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |