Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Inti::Gtk::TextMark Class Reference

A GtkTextMark C++ wrapper class. More...

#include <inti/gtk/textbuffer.h>

Inheritance diagram for Inti::Gtk::TextMark:

Inti::G::Object Inti::G::TypeInstance Inti::MemoryHandler Inti::ReferencedBase List of all members.

Public Member Functions

Constructors
Accessors
Methods

Protected Member Functions

Constructors

Detailed Description

A GtkTextMark C++ wrapper class.

A TextMark is like a bookmark in a text buffer; it preserves a position in the text across text buffer modifications. You can convert the mark to an iterator using Gtk::TextBuffer::get_iter_at_mark(). 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 are reference counted, but the reference count only controls the validity of the memory; marks can be deleted from the buffer at any time with Gtk::TextBuffer::delete_mark(). Once deleted from the buffer, a mark is essentially useless. Marks optionally have names. There are two marks built-in to TextBuffer; these are named "insert" and "selection_bound" and refer to the insertion point and the boundary of the selection which is not the insertion point, respectively. If no text is selected, these two marks will be in the same position. You can manipulate what is selected and where the cursor appears by moving these marks around.

TextMarks can optionally have names. These names can be convenient to avoid passing the TextMark object around. Marks are typically created using the Gtk::TextBuffer::create_mark() method.


Constructor & Destructor Documentation

Inti::Gtk::TextMark::TextMark GtkTextMark *  mark,
bool  reference = false
[explicit, protected]
 

Construct a new TextMark from an existing GtkTextMark.

Parameters:
mark A pointer to a GtkTextMark.
reference Set false if the initial reference count is floating, set true if it's not.

The mark can be a newly created GtkTextMark or an existing GtkTextMark (see G::Object::Object).


Member Function Documentation

bool Inti::Gtk::TextMark::get_deleted  )  const
 

Returns true if the mark has been removed from its buffer with delete_mark().

Marks can't be used once deleted.

void Inti::Gtk::TextMark::set_visible bool  setting  ) 
 

Sets the visibility of mark; the insertion point is normally visible, that is, you can see it as a vertical bar.

Parameters:
setting The visibility of mark.

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.


The documentation for this class was generated from the following file: Main Page - Footer


Generated on Sun Sep 14 20:08:20 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002