SourceMark

A GtkSourceMark marks a position in the text where you want to display additional info. It is based on GtkTextMark and thus is still valid after the text has changed though its position may change.

GtkSourceMarks are organised in categories which you have to set when you create the mark. Each category can have a priority, a pixbuf and other associated attributes. See gtk_source_view_set_mark_attributes(). The pixbuf will be displayed in the margin at the line where the mark residents if the "show-line-marks" property is set to TRUE. If there are multiple marks in the same line, the pixbufs will be drawn on top of each other. The mark with the highest priority will be drawn on top.

Constructors

this
this(GtkSourceMark* gtkSourceMark)

Sets our main struct and passes it to the parent class

this
this(string name, string category)

Creates a text mark. Add it to a buffer using gtk_text_buffer_add_mark(). If name is NULL, the mark is anonymous; otherwise, the mark can be retrieved by name using gtk_text_buffer_get_mark(). Normally marks are created using the utility function gtk_source_buffer_create_source_mark(). Since 2.2

Members

Functions

getCategory
string getCategory()

Returns the mark category. Since 2.2

getSourceMarkStruct
GtkSourceMark* getSourceMarkStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

next
SourceMark next(string category)

Returns the next GtkSourceMark in the buffer or NULL if the mark was not added to a buffer. If there is no next mark, NULL will be returned. If category is NULL, looks for marks of any category. Since 2.2

prev
SourceMark prev(string category)

Returns the previous GtkSourceMark in the buffer or NULL if the mark was not added to a buffer. If there is no previous mark, NULL is returned. If category is NULL, looks for marks of any category Since 2.2

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

gtkSourceMark
GtkSourceMark* gtkSourceMark;

the main Gtk struct

Inherited Members

From TextMark

gtkTextMark
GtkTextMark* gtkTextMark;

the main Gtk struct

getTextMarkStruct
GtkTextMark* getTextMarkStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
setVisible
void setVisible(int setting)

Sets the visibility of mark; the insertion point is normally visible, i.e. 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.

getVisible
int getVisible()

Returns TRUE if the mark is visible (i.e. a cursor is displayed for it).

getDeleted
int getDeleted()

Returns TRUE if the mark has been removed from its buffer with gtk_text_buffer_delete_mark(). See gtk_text_buffer_add_mark() for a way to add it to a buffer again.

getName
string getName()

Returns the mark name; returns NULL for anonymous marks.

getBuffer
TextBuffer getBuffer()

Gets the buffer this mark is located inside, or NULL if the mark is deleted.

getLeftGravity
int getLeftGravity()

Determines whether the mark has left gravity.

Meta