org.gnu.gtk
Class TextMark

java.lang.Object
  extended byorg.gnu.glib.GObject
      extended byorg.gnu.gtk.TextMark

public class TextMark
extends GObject

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.


Field Summary
 
Fields inherited from class org.gnu.glib.GObject
eventsInitialized
 
Constructor Summary
protected TextMark(Handle handle)
           
 
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)
protected static Handle gtk_text_mark_get_buffer(Handle mark)
           
protected static boolean gtk_text_mark_get_deleted(Handle mark)
           
protected static boolean gtk_text_mark_get_left_gravity(Handle mark)
           
protected static java.lang.String gtk_text_mark_get_name(Handle mark)
           
protected static int gtk_text_mark_get_type()
           
protected static boolean gtk_text_mark_get_visible(Handle mark)
           
protected static void gtk_text_mark_set_visible(Handle mark, boolean setting)
           
 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.GObject
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, equals, freezeNotify, getBooleanProperty, getData, getData, getDoubleProperty, getEventListenerClass, getEventType, getFloatProperty, getGObjectFromHandle, getHandle, getIntFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getNullHandle, getPixbufProperty, getProperty, getStringFromHandle, getStringProperty, hashCode, hasProperty, instantiateJGObjectFromGType, notify, removeEventHandler, removeListener, retrieveGObject, setBooleanProperty, setData, setData, setDoubleProperty, setFloatProperty, setHandle, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextMark

protected TextMark(Handle handle)
Method Detail

setVisibility

public void setVisibility(boolean setting)
Sets the visibility of mark; the insertion point is normally visible, ie you can see it as a vertical bar. Also, the text widget uses a visible mark to indicate where a drop will occur when dragging-and-dropping text. Most other marks are not visible. Marks are not visible by default.

Parameters:
setting - Visibility of mark

getVisibility

public boolean getVisibility()
Returns TRUE if the mark is visible (ie a cursor is displayed for it)

Returns:
true if it is visible

getDeleted

public boolean getDeleted()
Returns TRUE if the mark has been removed from its buffer with TextBuffer.deleteMark(TextMark). Marks can't be used once deleted.

Returns:
True if deleted

getName

public java.lang.String getName()
Returns the mark name; returns NULL for anonymous marks.

Returns:
Te name of hte mark

getBuffer

public TextBuffer getBuffer()
Gets the buffer this mark is located inside, or NULL if the mark is deleted.

Returns:
The buffer/

getLeftGravity

public boolean getLeftGravity()
Determines whether the mark has left gravity.

Returns:
TRUE if the mark has left gravity, FALSE otherwise

getType

public static Type getType()
Retrieve the runtime type used by the GLib library.


gtk_text_mark_get_type

protected static final int gtk_text_mark_get_type()

gtk_text_mark_set_visible

protected static final void gtk_text_mark_set_visible(Handle mark,
                                                      boolean setting)

gtk_text_mark_get_visible

protected static final boolean gtk_text_mark_get_visible(Handle mark)

gtk_text_mark_get_name

protected static final java.lang.String gtk_text_mark_get_name(Handle mark)

gtk_text_mark_get_deleted

protected static final boolean gtk_text_mark_get_deleted(Handle mark)

gtk_text_mark_get_buffer

protected static final Handle gtk_text_mark_get_buffer(Handle mark)

gtk_text_mark_get_left_gravity

protected static final boolean gtk_text_mark_get_left_gravity(Handle mark)