⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pango-text-attributes.html

📁 GTK+-2.0源码之pango-1.15.6.tar.gz
💻 HTML
📖 第 1 页 / 共 5 页
字号:
  PANGO_ATTR_STRETCH,		/* PangoAttrInt */  PANGO_ATTR_SIZE,		/* PangoAttrSize */  PANGO_ATTR_FONT_DESC,		/* PangoAttrFontDesc */  PANGO_ATTR_FOREGROUND,	/* PangoAttrColor */  PANGO_ATTR_BACKGROUND,	/* PangoAttrColor */  PANGO_ATTR_UNDERLINE,		/* PangoAttrInt */  PANGO_ATTR_STRIKETHROUGH,	/* PangoAttrInt */  PANGO_ATTR_RISE,		/* PangoAttrInt */  PANGO_ATTR_SHAPE,		/* PangoAttrShape */  PANGO_ATTR_SCALE,             /* PangoAttrFloat */  PANGO_ATTR_FALLBACK,          /* PangoAttrInt */  PANGO_ATTR_LETTER_SPACING,    /* PangoAttrInt */  PANGO_ATTR_UNDERLINE_COLOR,	/* PangoAttrColor */  PANGO_ATTR_STRIKETHROUGH_COLOR,/* PangoAttrColor */  PANGO_ATTR_ABSOLUTE_SIZE,	/* PangoAttrSize */  PANGO_ATTR_GRAVITY,		/* PangoAttrInt */  PANGO_ATTR_GRAVITY_HINT	/* PangoAttrInt */} PangoAttrType;</pre><p>The <a href="pango-Text-Attributes.html#PangoAttrType"><span class="type">PangoAttrType</span></a>distinguishes between different types of attributes. Along with thepredefined values, it is possible to allocate additional valuesfor custom attributes using <a href="pango-Text-Attributes.html#pango-attr-type-register"><code class="function">pango_attr_type_register()</code></a>. The predefinedvalues are given below. The type of structure used to store theattribute is listed in parentheses after the description.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><a name="PANGO-ATTR-INVALID:CAPS"></a><code class="literal">PANGO_ATTR_INVALID</code></span></td><td>does not happen</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-LANGUAGE:CAPS"></a><code class="literal">PANGO_ATTR_LANGUAGE</code></span></td><td>language (<a href="pango-Text-Attributes.html#PangoAttrLanguage"><span class="type">PangoAttrLanguage</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-FAMILY:CAPS"></a><code class="literal">PANGO_ATTR_FAMILY</code></span></td><td>font family name list (<a href="pango-Text-Attributes.html#PangoAttrString"><span class="type">PangoAttrString</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-STYLE:CAPS"></a><code class="literal">PANGO_ATTR_STYLE</code></span></td><td>font slant style (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-WEIGHT:CAPS"></a><code class="literal">PANGO_ATTR_WEIGHT</code></span></td><td>font weight (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-VARIANT:CAPS"></a><code class="literal">PANGO_ATTR_VARIANT</code></span></td><td>font variant (normal or small caps) (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-STRETCH:CAPS"></a><code class="literal">PANGO_ATTR_STRETCH</code></span></td><td>font stretch (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-SIZE:CAPS"></a><code class="literal">PANGO_ATTR_SIZE</code></span></td><td>font size in points scaled by <a href="pango-Glyph-Storage.html#PANGO-SCALE:CAPS"><code class="literal">PANGO_SCALE</code></a> (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-FONT-DESC:CAPS"></a><code class="literal">PANGO_ATTR_FONT_DESC</code></span></td><td>font description (<a href="pango-Text-Attributes.html#PangoAttrFontDesc"><span class="type">PangoAttrFontDesc</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-FOREGROUND:CAPS"></a><code class="literal">PANGO_ATTR_FOREGROUND</code></span></td><td>foreground color (<a href="pango-Text-Attributes.html#PangoAttrColor"><span class="type">PangoAttrColor</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-BACKGROUND:CAPS"></a><code class="literal">PANGO_ATTR_BACKGROUND</code></span></td><td>background color (<a href="pango-Text-Attributes.html#PangoAttrColor"><span class="type">PangoAttrColor</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-UNDERLINE:CAPS"></a><code class="literal">PANGO_ATTR_UNDERLINE</code></span></td><td>whether the text has an underline (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-STRIKETHROUGH:CAPS"></a><code class="literal">PANGO_ATTR_STRIKETHROUGH</code></span></td><td>whether the text is struck-through (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-RISE:CAPS"></a><code class="literal">PANGO_ATTR_RISE</code></span></td><td>baseline displacement (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-SHAPE:CAPS"></a><code class="literal">PANGO_ATTR_SHAPE</code></span></td><td>shape (<a href="pango-Text-Attributes.html#PangoAttrShape"><span class="type">PangoAttrShape</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-SCALE:CAPS"></a><code class="literal">PANGO_ATTR_SCALE</code></span></td><td>font size scale factor (<a href="pango-Text-Attributes.html#PangoAttrFloat"><span class="type">PangoAttrFloat</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-FALLBACK:CAPS"></a><code class="literal">PANGO_ATTR_FALLBACK</code></span></td><td>whether fallback is enabled (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-LETTER-SPACING:CAPS"></a><code class="literal">PANGO_ATTR_LETTER_SPACING</code></span></td><td>letter spacing (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-UNDERLINE-COLOR:CAPS"></a><code class="literal">PANGO_ATTR_UNDERLINE_COLOR</code></span></td><td>underline color (<a href="pango-Text-Attributes.html#PangoAttrColor"><span class="type">PangoAttrColor</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-STRIKETHROUGH-COLOR:CAPS"></a><code class="literal">PANGO_ATTR_STRIKETHROUGH_COLOR</code></span></td><td>strikethrough color (<a href="pango-Text-Attributes.html#PangoAttrColor"><span class="type">PangoAttrColor</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-ABSOLUTE-SIZE:CAPS"></a><code class="literal">PANGO_ATTR_ABSOLUTE_SIZE</code></span></td><td>font size in pixels scaled by <a href="pango-Glyph-Storage.html#PANGO-SCALE:CAPS"><code class="literal">PANGO_SCALE</code></a> (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-GRAVITY:CAPS"></a><code class="literal">PANGO_ATTR_GRAVITY</code></span></td><td>base text gravity (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)</td></tr><tr><td><span class="term"><a name="PANGO-ATTR-GRAVITY-HINT:CAPS"></a><code class="literal">PANGO_ATTR_GRAVITY_HINT</code></span></td><td>gravity hint (<a href="pango-Text-Attributes.html#PangoAttrInt"><span class="type">PangoAttrInt</span></a>)</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2812642"></a><h3><a name="PANGO-TYPE-ATTR-TYPE:CAPS"></a>PANGO_TYPE_ATTR_TYPE</h3><a class="indexterm" name="id2812656"></a><pre class="programlisting">#define PANGO_TYPE_ATTR_TYPE (pango_attr_type_get_type())</pre><p>The <ahref="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> type for <a href="pango-Text-Attributes.html#PangoAttrType"><span class="type">PangoAttrType</span></a>.</p></div><hr><div class="refsect2" lang="en"><a name="id2812688"></a><h3><a name="PangoAttrClass"></a>PangoAttrClass</h3><a class="indexterm" name="id2812700"></a><pre class="programlisting">typedef struct {  PangoAttrType type;  PangoAttribute * (*copy) (const PangoAttribute *attr);  void             (*destroy) (PangoAttribute *attr);  gboolean         (*equal) (const PangoAttribute *attr1, const PangoAttribute *attr2);} PangoAttrClass;</pre><p>The <a href="pango-Text-Attributes.html#PangoAttrClass"><span class="type">PangoAttrClass</span></a> structure stores the type and operations fora particular type of attribute. The functions in this structure shouldnot be called directly. Instead, one should use the wrapper functionsprovided for <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><a href="pango-Text-Attributes.html#PangoAttrType">PangoAttrType</a>&#160;<em class="structfield"><code>type</code></em>;</span></td><td>the type ID for this attribute</td></tr><tr><td><span class="term"><em class="structfield"><code>copy</code></em>&#160;()</span></td><td>function to duplicate an attribute of this type (see <a href="pango-Text-Attributes.html#pango-attribute-copy"><code class="function">pango_attribute_copy()</code></a>)</td></tr><tr><td><span class="term"><em class="structfield"><code>destroy</code></em>&#160;()</span></td><td>function to free an attribute of this type (see <a href="pango-Text-Attributes.html#pango-attribute-destroy"><code class="function">pango_attribute_destroy()</code></a>)</td></tr><tr><td><span class="term"><em class="structfield"><code>equal</code></em>&#160;()</span></td><td>function to check two attributes of this type for equality (see <a href="pango-Text-Attributes.html#pango-attribute-equal"><code class="function">pango_attribute_equal()</code></a>)</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2812840"></a><h3><a name="PangoAttribute"></a>PangoAttribute</h3><a class="indexterm" name="id2812852"></a><pre class="programlisting">typedef struct {  const PangoAttrClass *klass;  guint start_index;	/* in bytes */  guint end_index;	/* in bytes. The character at this index is not included */} PangoAttribute;</pre><p>The <a href="pango-Text-Attributes.html#PangoAttribute"><span class="type">PangoAttribute</span></a> structure represents the common portions of allattributes. Particular types of attributes include this structureas their initial portion. The common portion of the attribute holdsthe range to which the value in the type-specific part of the attributeapplies. </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term">const&#160;<a href="pango-Text-Attributes.html#PangoAttrClass">PangoAttrClass</a>&#160;*<em class="structfield"><code>klass</code></em>;</span></td><td>the class structure holding information about the type of the attribute</td></tr><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#guint">guint</a>&#160;<em class="structfield"><code>start_index</code></em>;</span></td><td>the start index of the range (in bytes).</td></tr><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#guint">guint</a>&#160;<em class="structfield"><code>end_index</code></em>;</span></td><td>end index of the range (in bytes). The character at this index	is not included in the range.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2812953"></a><h3><a name="PangoAttrString"></a>PangoAttrString</h3>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -