|
|||||||||
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.TextMark
public class TextMark
You may wish to begin by reading the TextView
overview which gives an
overview of all the objects and data types related to the text widget and how
they work together.
A TextMark is like a bookmark in a text buffer; it preserves a position in
the text. You can convert the mark to an iterator using TextBuffer.getIter(TextMark)
. Unlike iterators, marks remain valid across
buffer mutations, because their behavior is defined when text is inserted or
deleted. When text containing a mark is deleted, the mark remains in the
position originally occupied by the deleted text. When text is inserted at a
mark, a mark with left gravity will be moved to the beginning of the
newly-inserted text, and a mark with right gravity will be moved to the end.
Marks optionally have names; these can be convenient to avoid passing the TextMark object around.
Method Summary | |
---|---|
TextBuffer |
getBuffer()
Gets the buffer this mark is located inside, or NULL if the mark is deleted. |
boolean |
getDeleted()
Returns TRUE if the mark has been removed from its buffer with TextBuffer.deleteMark(TextMark) . |
boolean |
getLeftGravity()
Determines whether the mark has left gravity. |
java.lang.String |
getName()
Returns the mark name; returns NULL for anonymous marks. |
static Type |
getType()
Retrieve the runtime type used by the GLib library. |
boolean |
getVisibility()
Returns TRUE if the mark is visible (ie a cursor is displayed for it) |
void |
setVisibility(boolean setting)
Sets the visibility of mark; the insertion point is normally visible, ie you can see it as a vertical bar. |
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 |
Method Detail |
---|
public void setVisibility(boolean setting)
setting
- Visibility of markpublic boolean getVisibility()
public boolean getDeleted()
TextBuffer.deleteMark(TextMark)
. Marks can't be used once
deleted.
public java.lang.String getName()
public TextBuffer getBuffer()
public boolean getLeftGravity()
public static Type getType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |