1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
|
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
<!ENTITY tutorial SYSTEM "lang-tutorial.sgml">
<!ENTITY reference SYSTEM "lang-reference.sgml">
]>
<refentry id="GtkSourceMark">
<refmeta>
<refentrytitle role="top_of_page" id="GtkSourceMark.top_of_page">GtkSourceMark</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTKSOURCEVIEW-2.0 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkSourceMark</refname>
<refpurpose>mark object for <link linkend="GtkSourceBuffer"><type>GtkSourceBuffer</type></link></refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>
<refsynopsisdiv id="GtkSourceMark.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>
<synopsis>
#include <gtksourceview/gtksourcemark.h>
<link linkend="GtkSourceMark-struct">GtkSourceMark</link>;
<link linkend="GtkSourceMark">GtkSourceMark</link>* <link linkend="gtk-source-mark-new">gtk_source_mark_new</link> (const <link linkend="gchar">gchar</link> *name,
const <link linkend="gchar">gchar</link> *category);
const <link linkend="gchar">gchar</link>* <link linkend="gtk-source-mark-get-category">gtk_source_mark_get_category</link> (<link linkend="GtkSourceMark">GtkSourceMark</link> *mark);
<link linkend="GtkSourceMark">GtkSourceMark</link>* <link linkend="gtk-source-mark-next">gtk_source_mark_next</link> (<link linkend="GtkSourceMark">GtkSourceMark</link> *mark,
const <link linkend="gchar">gchar</link> *category);
<link linkend="GtkSourceMark">GtkSourceMark</link>* <link linkend="gtk-source-mark-prev">gtk_source_mark_prev</link> (<link linkend="GtkSourceMark">GtkSourceMark</link> *mark,
const <link linkend="gchar">gchar</link> *category);
</synopsis>
</refsynopsisdiv>
<refsect1 id="GtkSourceMark.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
<link linkend="GObject">GObject</link>
+----<link linkend="GtkTextMark">GtkTextMark</link>
+----GtkSourceMark
</synopsis>
</refsect1>
<refsect1 id="GtkSourceMark.properties" role="properties">
<title role="properties.title">Properties</title>
<synopsis>
"<link linkend="GtkSourceMark--category">category</link>" <link linkend="gchar">gchar</link>* : Read / Write / Construct Only
</synopsis>
</refsect1>
<refsect1 id="GtkSourceMark.description" role="desc">
<title role="desc.title">Description</title>
<para>
A GtkSourceMark preserves a position in the text where you want to display
additional info. It is based on <link linkend="GtkTextMark"><type>GtkTextMark</type></link> and thus is still valid after the
text has changed though it may change it's position.
</para>
<para>
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
<link linkend="gtk-source-view-set-mark-category-pixbuf"><type>gtk_source_view_set_mark_category_pixbuf</type></link> and
<link linkend="gtk-source-view-set-mark-category-priority"><type>gtk_source_view_set_mark_category_priority</type></link>. The pixbuf will be displayed
in the margin at the line where the mark residents if the
<link linkend="GtkSourceView-show-line-marks"><type>"show-line-marks"</type></link> 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.
</para>
</refsect1>
<refsect1 id="GtkSourceMark.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GtkSourceMark-struct" role="struct">
<title>GtkSourceMark</title>
<indexterm zone="GtkSourceMark-struct"><primary>GtkSourceMark</primary></indexterm><programlisting>typedef struct _GtkSourceMark GtkSourceMark;</programlisting>
<para>
</para></refsect2>
<refsect2 id="gtk-source-mark-new" role="function" condition="since:2.2">
<title>gtk_source_mark_new ()</title>
<indexterm zone="gtk-source-mark-new" role="2.2"><primary>gtk_source_mark_new</primary></indexterm><programlisting><link linkend="GtkSourceMark">GtkSourceMark</link>* gtk_source_mark_new (const <link linkend="gchar">gchar</link> *name,
const <link linkend="gchar">gchar</link> *category);</programlisting>
<para>
Creates a text mark. Add it to a buffer using <link linkend="gtk-text-buffer-add-mark"><function>gtk_text_buffer_add_mark()</function></link>.
If name is NULL, the mark is anonymous; otherwise, the mark can be retrieved
by name using <link linkend="gtk-text-buffer-get-mark"><function>gtk_text_buffer_get_mark()</function></link>.
Normally marks are created using the utility function
<link linkend="gtk-source-buffer-create-mark"><function>gtk_source_buffer_create_mark()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter> :</term>
<listitem><simpara> Name of the <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link>, can be NULL when not using a name
<parameter>category</parameter> 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).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>category</parameter> :</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a new <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link> that can be added using <link linkend="gtk-text-buffer-add-mark"><function>gtk_text_buffer_add_mark()</function></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2
</para></refsect2>
<refsect2 id="gtk-source-mark-get-category" role="function" condition="since:2.2">
<title>gtk_source_mark_get_category ()</title>
<indexterm zone="gtk-source-mark-get-category" role="2.2"><primary>gtk_source_mark_get_category</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* gtk_source_mark_get_category (<link linkend="GtkSourceMark">GtkSourceMark</link> *mark);</programlisting>
<para>
Returns the mark category</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>mark</parameter> :</term>
<listitem><simpara> a <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the category of the <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2
</para></refsect2>
<refsect2 id="gtk-source-mark-next" role="function" condition="since:2.2">
<title>gtk_source_mark_next ()</title>
<indexterm zone="gtk-source-mark-next" role="2.2"><primary>gtk_source_mark_next</primary></indexterm><programlisting><link linkend="GtkSourceMark">GtkSourceMark</link>* gtk_source_mark_next (<link linkend="GtkSourceMark">GtkSourceMark</link> *mark,
const <link linkend="gchar">gchar</link> *category);</programlisting>
<para>
Returns the next <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link> in the buffer or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if the mark
was not added to a buffer. If there is no next mark, <link linkend="NULL:CAPS"><literal>NULL</literal></link> will be returned.
</para>
<para>
If <parameter>category</parameter> is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, looks for marks of any category</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>mark</parameter> :</term>
<listitem><simpara> a <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>category</parameter> :</term>
<listitem><simpara> a string specifying the mark category or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the next <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2
</para></refsect2>
<refsect2 id="gtk-source-mark-prev" role="function" condition="since:2.2">
<title>gtk_source_mark_prev ()</title>
<indexterm zone="gtk-source-mark-prev" role="2.2"><primary>gtk_source_mark_prev</primary></indexterm><programlisting><link linkend="GtkSourceMark">GtkSourceMark</link>* gtk_source_mark_prev (<link linkend="GtkSourceMark">GtkSourceMark</link> *mark,
const <link linkend="gchar">gchar</link> *category);</programlisting>
<para>
Returns the previous <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link> in the buffer or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if the mark
was not added to a buffer. If there is no previous mark, <link linkend="NULL:CAPS"><literal>NULL</literal></link> is returned.
</para>
<para>
If <parameter>category</parameter> is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, looks for marks of any category</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>mark</parameter> :</term>
<listitem><simpara> a <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>category</parameter> :</term>
<listitem><simpara> a string specifying the mark category or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the previous <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2
</para></refsect2>
</refsect1>
<refsect1 id="GtkSourceMark.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkSourceMark--category"><title>The <literal>"category"</literal> property</title>
<indexterm zone="GtkSourceMark--category"><primary>GtkSourceMark:category</primary></indexterm><programlisting> "category" <link linkend="gchar">gchar</link>* : Read / Write / Construct Only</programlisting>
<para>
The category of the <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link>, classified the mark and control
what pixbuf is used and with which priority it is drawn.</para>
<para>
</para><para>Default value: NULL</para>
</refsect2>
</refsect1>
<refsect1 id="GtkSourceMark.see-also">
<title>See Also</title>
<para>
<link linkend="gtk-source-buffer-create-mark"><type>gtk_source_buffer_create_mark</type></link>, <link linkend="gtk-source-view-set-mark-category-pixbuf"><type>gtk_source_view_set_mark_category_pixbuf</type></link>
</para>
</refsect1>
</refentry>
|