Top |
GtkSourceMark * | gtk_source_mark_new () |
const gchar * | gtk_source_mark_get_category () |
GtkSourceMark * | gtk_source_mark_next () |
GtkSourceMark * | gtk_source_mark_prev () |
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.
GtkSourceMark * gtk_source_mark_new (const gchar *name
,const gchar *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()
.
name |
Name of the GtkSourceMark or |
[nullable] |
category |
is used to classify marks according to common characteristics (e.g. all the marks representing a bookmark could belong to the "bookmark" category, or all the marks representing a compilation error could belong to "error" category). |
Since: 2.2
const gchar *
gtk_source_mark_get_category (GtkSourceMark *mark
);
Returns the mark category.
Since: 2.2
GtkSourceMark * gtk_source_mark_next (GtkSourceMark *mark
,const gchar *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
GtkSourceMark * gtk_source_mark_prev (GtkSourceMark *mark
,const gchar *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
“category”
property “category” char *
The category of the GtkSourceMark, classifies the mark and controls which pixbuf is used and with which priority it is drawn.
Owner: GtkSourceMark
Flags: Read / Write / Construct Only
Default value: NULL