| GtkSourceView 2 Reference Manual | ||||
|---|---|---|---|---|
GtkSourceMarkGtkSourceMark — mark object for GtkSourceBuffer |
#include <gtksourceview/gtksourcemark.h>
GtkSourceMark;
GtkSourceMark * gtk_source_mark_new (const gchar *name,
const gchar *category);
const gchar * gtk_source_mark_get_category (GtkSourceMark *mark);
GtkSourceMark * gtk_source_mark_next (GtkSourceMark *mark,
const gchar *category);
GtkSourceMark * gtk_source_mark_prev (GtkSourceMark *mark,
const gchar *category);
A GtkSourceMark preserves a position in the text where you want to display
additional info. It is based on
GtkSourceMarks are organised in categories which you have to set when you create
the mark. Each category can have a pixbuf and a priority associated using
gtk_source_view_set_mark_category_pixbuf and
gtk_source_view_set_mark_category_priority. The pixbuf will be displayed
in the margin at the line where the mark residents if the
GtkSourceMark * gtk_source_mark_new (constgchar *name, constgchar *category);
Creates a text mark. Add it to a buffer using gtk_text_buffer_add_mark()gtk_text_buffer_get_mark()gtk_source_buffer_create_mark()
|
Name of the GtkSourceMark, can be NULL when not using a name |
|
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). |
Returns : |
a new GtkSourceMark that can be added using gtk_text_buffer_add_mark() |
Since 2.2
constgchar * gtk_source_mark_get_category (GtkSourceMark *mark);
Returns the mark category
|
a GtkSourceMark |
Returns : |
the category of the GtkSourceMark |
Since 2.2
GtkSourceMark * gtk_source_mark_next (GtkSourceMark *mark, constgchar *category);
Returns the next GtkSourceMark in the buffer or NULLNULL
If category is NULL
|
a GtkSourceMark |
|
a string specifying the mark category or NULL |
Returns : |
the next GtkSourceMark or NULL |
Since 2.2
GtkSourceMark * gtk_source_mark_prev (GtkSourceMark *mark, constgchar *category);
Returns the previous GtkSourceMark in the buffer or NULLNULL
If category is NULL
|
a GtkSourceMark |
|
a string specifying the mark category or NULL |
Returns : |
the previous GtkSourceMark or NULL |
Since 2.2
"category" property"category"gchar * : Read / Write / Construct Only
The category of the GtkSourceMark, classified the mark and control what pixbuf is used and with which priority it is drawn.
Default value: NULL