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

📄 atktext.html

📁 linux下图形库开发包atk-1.4.0.tar.gz
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<a href="AtkEditableText.html" title="AtkEditableText">AtkEditableText</a> (a subtype of the <a href="AtkText.html" title="AtkText">AtkText</a> interface) should beimplemented instead.</p><p><a href="AtkText.html" title="AtkText">AtkText</a> provides not only traversal facilities and change notificationfor text content, but also caret tracking and glyph bounding boxcalculations.  Note that the text strings are exposed as UTF-8, and aretherefore potentially multi-byte, and caret-to-byte offset mapping makesno assumptions about the character length; also bounding boxglyph-to-offset mapping may be complex for languages which use ligatures.</p></div><div class="refsect1"><h2>Details</h2><div class="refsect2"><h3><a name="AtkText-struct"></a>struct AtkText</h3><a class="indexterm" name="id303646"></a><pre class="programlisting">struct AtkText;</pre><p>The AtkText structure does not contain any fields.</p></div><hr><div class="refsect2"><h3><a name="AtkTextBoundary"></a>enum AtkTextBoundary</h3><a class="indexterm" name="id303673"></a><pre class="programlisting">typedef enum {  ATK_TEXT_BOUNDARY_CHAR,  ATK_TEXT_BOUNDARY_WORD_START,  ATK_TEXT_BOUNDARY_WORD_END,  ATK_TEXT_BOUNDARY_SENTENCE_START,  ATK_TEXT_BOUNDARY_SENTENCE_END,  ATK_TEXT_BOUNDARY_LINE_START,  ATK_TEXT_BOUNDARY_LINE_END} AtkTextBoundary;</pre><p>Text boundary types used for specifying boundaries for regions of text</p><p></p></div><hr><div class="refsect2"><h3><a name="AtkTextClipType"></a>enum AtkTextClipType</h3><a class="indexterm" name="id303709"></a><pre class="programlisting">typedef enum {    ATK_TEXT_CLIP_NONE,    ATK_TEXT_CLIP_MIN,    ATK_TEXT_CLIP_MAX,    ATK_TEXT_CLIP_BOTH} AtkTextClipType;</pre><p>Describes the type of clipping required.</p><p></p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term"><tt>ATK_TEXT_CLIP_NONE</tt></span></td><td> No clipping to be done</td></tr><tr><td><span class="term"><tt>ATK_TEXT_CLIP_MIN</tt></span></td><td> Text clipped by min coordinate is omitted</td></tr><tr><td><span class="term"><tt>ATK_TEXT_CLIP_MAX</tt></span></td><td> Text clipped by max coordinate is omitted</td></tr><tr><td><span class="term"><tt>ATK_TEXT_CLIP_BOTH</tt></span></td><td> Only text fully within mix/max bound is retained</td></tr></tbody></table></div></div><hr><div class="refsect2"><h3><a name="AtkTextRange"></a>struct AtkTextRange</h3><a class="indexterm" name="id303863"></a><pre class="programlisting">struct AtkTextRange {  AtkTextRectangle bounds;  gint start_offset;  gint end_offset;  gchar* content;};</pre><p>A structure used to describe a text range.</p><p></p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term"><a href="AtkText.html#AtkTextRectangle">AtkTextRectangle</a> <i><tt>bounds</tt></i></span></td><td> A rectangle giving the bounds of the text range</td></tr><tr><td><span class="term">gint <i><tt>start_offset</tt></i></span></td><td> The start offset of a AtkTextRange</td></tr><tr><td><span class="term">gint <i><tt>end_offset</tt></i></span></td><td> The end offset of a AtkTextRange</td></tr><tr><td><span class="term">gchar *<i><tt>content</tt></i></span></td><td> The text in the text range</td></tr></tbody></table></div></div><hr><div class="refsect2"><h3><a name="AtkTextRectangle"></a>struct AtkTextRectangle</h3><a class="indexterm" name="id304000"></a><pre class="programlisting">struct AtkTextRectangle {  gint x;  gint y;  gint width;  gint height;};</pre><p>A structure used to store a rectangle used by AtkText.</p><p></p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term">gint <i><tt>x</tt></i></span></td><td> The horizontal coordinate of a rectangle</td></tr><tr><td><span class="term">gint <i><tt>y</tt></i></span></td><td> The vertical coordinate of a rectangle</td></tr><tr><td><span class="term">gint <i><tt>width</tt></i></span></td><td> The width of a rectangle</td></tr><tr><td><span class="term">gint <i><tt>height</tt></i></span></td><td> The height of a rectangle</td></tr></tbody></table></div></div><hr><div class="refsect2"><h3><a name="AtkAttribute"></a>struct AtkAttribute</h3><a class="indexterm" name="id304167"></a><pre class="programlisting">struct AtkAttribute {  gchar* name;  gchar* value;};</pre><p>A string name/value pair representing a text attribute.</p><p></p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term">gchar *<i><tt>name</tt></i></span></td><td> The attribute name. Call <tt>atk_text_attr_get_name()</tt></td></tr><tr><td><span class="term">gchar *<i><tt>value</tt></i></span></td><td> the value of the attribute, represented as a string. Call <tt>atk_text_attr_get_value()</tt> for those which are strings.For values which are numbers, the string representation of the number is in value.</td></tr></tbody></table></div></div><hr><div class="refsect2"><h3><a name="AtkAttributeSet"></a>AtkAttributeSet</h3><a class="indexterm" name="id304286"></a><pre class="programlisting">typedef GSList AtkAttributeSet;</pre><p>This is a singly-linked list (a GSList) of <a href="AtkText.html#AtkAttribute">AtkAttribute</a>. It isused by <a href="AtkText.html#atk-text-get-run-attributes"><tt>atk_text_get_run_attributes()</tt></a>, <a href="AtkText.html#atk-text-get-default-attributes"><tt>atk_text_get_default_attributes()</tt></a>and <a href="AtkEditableText.html#atk-editable-text-set-run-attributes"><tt>atk_editable_text_set_run_attributes()</tt></a></p><p></p></div><hr><div class="refsect2"><h3><a name="AtkTextAttribute"></a>enum AtkTextAttribute</h3><a class="indexterm" name="id304412"></a><pre class="programlisting">typedef enum{  ATK_TEXT_ATTR_INVALID = 0,  ATK_TEXT_ATTR_LEFT_MARGIN,  ATK_TEXT_ATTR_RIGHT_MARGIN,  ATK_TEXT_ATTR_INDENT,  ATK_TEXT_ATTR_INVISIBLE,  ATK_TEXT_ATTR_EDITABLE,  ATK_TEXT_ATTR_PIXELS_ABOVE_LINES,  ATK_TEXT_ATTR_PIXELS_BELOW_LINES,  ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP,  ATK_TEXT_ATTR_BG_FULL_HEIGHT,  ATK_TEXT_ATTR_RISE,  ATK_TEXT_ATTR_UNDERLINE,  ATK_TEXT_ATTR_STRIKETHROUGH,  ATK_TEXT_ATTR_SIZE,  ATK_TEXT_ATTR_SCALE,  ATK_TEXT_ATTR_WEIGHT,  ATK_TEXT_ATTR_LANGUAGE,  ATK_TEXT_ATTR_FAMILY_NAME,  ATK_TEXT_ATTR_BG_COLOR,  ATK_TEXT_ATTR_FG_COLOR,  ATK_TEXT_ATTR_BG_STIPPLE,  ATK_TEXT_ATTR_FG_STIPPLE,  ATK_TEXT_ATTR_WRAP_MODE,  ATK_TEXT_ATTR_DIRECTION,  ATK_TEXT_ATTR_JUSTIFICATION,  ATK_TEXT_ATTR_STRETCH,  ATK_TEXT_ATTR_VARIANT,  ATK_TEXT_ATTR_STYLE,  ATK_TEXT_ATTR_LAST_DEFINED} AtkTextAttribute;</pre><p>Describes the text attributes supported</p><p></p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term"><tt>ATK_TEXT_ATTR_INVALID</tt></span></td><td> Invalid attribute</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_LEFT_MARGIN</tt></span></td><td> The pixel width of the left margin</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_RIGHT_MARGIN</tt></span></td><td> The pixel width of the right margin</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_INDENT</tt></span></td><td> The number of pixels that the text is indented</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_INVISIBLE</tt></span></td><td> Either &quot;true&quot; or &quot;false&quot; indicating whether text is visible or not</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_EDITABLE</tt></span></td><td> Either &quot;true&quot; or &quot;false&quot; indicating whether text is editable or not</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_PIXELS_ABOVE_LINES</tt></span></td><td> Pixels of blank space to leave above each newline-terminated line. </td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_PIXELS_BELOW_LINES</tt></span></td><td> Pixels of blank space to leave below each newline-terminated line.</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP</tt></span></td><td> Pixels of blank space to leave between wrapped lines inside the same newline-terminated line (paragraph).</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_BG_FULL_HEIGHT</tt></span></td><td> &quot;true&quot; or &quot;false&quot; whether to make the background color for each character the height of the highest font used on the current line, or the height of the font used for the current character.</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_RISE</tt></span></td><td> Number of pixels that the characters are risen above the baseline</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_UNDERLINE</tt></span></td><td> &quot;none&quot;, &quot;single&quot;, &quot;double&quot; or &quot;low&quot;</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_STRIKETHROUGH</tt></span></td><td> &quot;true&quot; or &quot;false&quot; whether the text is strikethrough </td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_SIZE</tt></span></td><td> The size of the characters. </td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_SCALE</tt></span></td><td> The scale of the characters. The value is a string representation of a double </td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_WEIGHT</tt></span></td><td> The weight of the characters.</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_LANGUAGE</tt></span></td><td> The language used</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_FAMILY_NAME</tt></span></td><td> The font family name</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_BG_COLOR</tt></span></td><td> The background color. The value is an RGB value of the format &quot;<tt>u</tt>,<tt>u</tt>,<tt>u</tt>&quot;</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_FG_COLOR</tt></span></td><td>The foreground color. The value is an RGB value of the format &quot;<tt>u</tt>,<tt>u</tt>,<tt>u</tt>&quot;</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_BG_STIPPLE</tt></span></td><td> &quot;true&quot; if a GdkBitmap is set for stippling the background color.</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_FG_STIPPLE</tt></span></td><td> &quot;true&quot; if a GdkBitmap is set for stippling the foreground color.</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_WRAP_MODE</tt></span></td><td> The wrap mode of the text, if any. Values are &quot;none&quot;, &quot;char&quot; or &quot;word&quot; </td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_DIRECTION</tt></span></td><td> The direction of the text, if set. Values are &quot;none&quot;, &quot;ltr&quot; or &quot;rtl&quot; </td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_JUSTIFICATION</tt></span></td><td> The justification of the text, if set. Values are &quot;left&quot;, &quot;right&quot;, &quot;center&quot; or &quot;fill&quot; </td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_STRETCH</tt></span></td><td> The stretch of the text, if set. Values are &quot;ultra_condensed&quot;, &quot;extra_condensed&quot;, &quot;condensed&quot;, &quot;semi_condensed&quot;, &quot;normal&quot;, &quot;semi_expanded&quot;, &quot;expanded&quot;, &quot;extra_expanded&quot; or &quot;ultra_expanded&quot;</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_VARIANT</tt></span></td><td> The capitalization variant of the text, if set. Values are &quot;normal&quot; or &quot;small_caps&quot;</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_STYLE</tt></span></td><td> The slant style of the text, if set. Values are &quot;normal&quot;, &quot;oblique&quot; or &quot;italic&quot;</td></tr><tr><td><span class="term"><tt>ATK_TEXT_ATTR_LAST_DEFINED</tt></span></td><td> not a valid text attribute, used for finding end of enumeration</td></tr></tbody></table></div></div><hr><div class="refsect2"><h3><a name="atk-text-get-text"></a>atk_text_get_text ()</h3><a class="indexterm" name="id305213"></a><pre class="programlisting">gchar*      atk_text_get_text               (<a href="AtkText.html" title="AtkText">AtkText</a> *text,                                             gint start_offset,                                             gint end_offset);</pre><p>Gets the specified text.</p><p></p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term"><i><tt>text</tt></i>

⌨️ 快捷键说明

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