File: break_8hh.html

package info (click to toggle)
gfcui 2.3.1-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 43,420 kB
  • ctags: 18,023
  • sloc: cpp: 53,967; sh: 31,555; makefile: 1,322; perl: 108
file content (244 lines) | stat: -rw-r--r-- 11,299 bytes parent folder | download | duplicates (3)
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
  <title>GTK+ Foundation Classes</title>
  <link href="gfc.css" rel="stylesheet" type="text/css">
  <meta content="The GFC Development Team" name="author">
  <meta content="Core Library Reference Manual" name="description">
</head>
<body style="color: rgb(0, 0, 0); background-color: rgb(243, 244, 248);"
 alink="#000099" link="#000099" vlink="#990099">
<table style="text-align: left; width: 1227px; height: 117px;"
 border="0" cellpadding="0" cellspacing="0">
  <tbody>
    <tr>
      <td
 style="text-align: center; background-color: rgb(255, 255, 255); width: 220px; vertical-align: top;"><img
 alt="GFC Logo" src="../images/gfc.png"
 style="width: 207px; height: 92px;"></td>
      <td
 style="text-align: center; background-color: rgb(87, 107, 152); vertical-align: middle;"><img
 alt="GFC Title Logo" src="../images/gfc-title.png"
 style="width: 418px; height: 76px;"><br>
      </td>
    </tr>
    <tr>
      <td
 style="text-align: center; background-color: rgb(65, 77, 104); vertical-align: middle;"><big><span
 style="color: rgb(255, 255, 153); font-weight: bold;">Reference Manual</span></big><br>
      </td>
      <td
 style="text-align: center; background-color: rgb(148, 164, 200); vertical-align: middle;"><small
 style="font-family: helvetica,arial,sans-serif;"><a
 href="../html/index.html">Main Page</a>&nbsp; |&nbsp; <a
 href="../html/namespaces.html">Namespace List</a>&nbsp; |&nbsp; <a
 href="classes.html">Alphabetical List</a>&nbsp; |&nbsp; <a
 href="../html/annotated.html">Class List</a>&nbsp; |&nbsp; <a
 href="../html/files.html">File List</a></small><br>
      </td>
    </tr>
  </tbody>
</table>
<small> </small>
</body>
</html>
<!-- Generated by Doxygen 1.3.8 -->
<h1>break.hh File Reference</h1>A PangoLogAttr C++ wrapper interface. <a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="elRef" doxygen="gfccore.tag:" href="utfstring_8hh.html">gfc/utfstring.hh</a>&gt;</code><br>
<code>#include &lt;pango/pango-break.h&gt;</code><br>
<code>#include &lt;vector&gt;</code><br>
<code>#include &lt;gfc/pango/inline/break.inl&gt;</code><br>

<p>
<a href="break_8hh-source.html">Go to the source code of this file.</a><h2>Namespaces</h2>
<ul>
<li>namespace <a class="elRef" doxygen="gfccore.tag:" href="namespaceGFC.html">GFC</a>
<li>namespace <a class="el" href="namespaceGFC_1_1Pango.html">GFC::Pango</a>
</ul>
<h2>Classes</h2>
<ul>
<li>class <a class="el" href="classGFC_1_1Pango_1_1LogAttr.html">GFC::Pango::LogAttr</a>
<dl class="el"><dd class="mdescRight">A PangoLogAttr C++ wrapper class.  <a href="classGFC_1_1Pango_1_1LogAttr.html#_details">More...</a><br></dl></ul>
<h2>Rendering Methods</h2>
<ul>
<li>void <a class="el" href="namespaceGFC_1_1Pango.html#a124">break_text</a> (const String &amp;text, const Analysis &amp;analysis, std::vector&lt; LogAttr &gt; &amp;attrs)
<dl class="el"><dd class="mdescRight">Determines possible line, word, and character breaks for a string of Unicode text.  <a href="#a124"></a><br></dl><li>void <a class="el" href="namespaceGFC_1_1Pango.html#a125">find_paragraph_boundary</a> (const String &amp;text, int *paragraph_delimiter_index, int *next_paragraph_start)
<dl class="el"><dd class="mdescRight">Locates a paragraph boundary in text.  <a href="#a125"></a><br></dl><li>void <a class="el" href="namespaceGFC_1_1Pango.html#a126">get_log_attrs</a> (const String &amp;text, PangoLanguage *language, std::vector&lt; LogAttr &gt; &amp;attrs, int level=-1)
<dl class="el"><dd class="mdescRight">Computes a <a class="el" href="classGFC_1_1Pango_1_1LogAttr.html">LogAttr</a> for each character in <em>text</em>.  <a href="#a126"></a><br></dl></ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A PangoLogAttr C++ wrapper interface. 
<p>
Provides LogAttr, an object that stores information about the attributes of a single character.<hr><h2>Function Documentation</h2>
<a class="anchor" name="a124" doxytag="break.hh::break_text" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void break_text           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const String &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>text</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const Analysis &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>analysis</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>std::vector&lt; LogAttr &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>attrs</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Determines possible line, word, and character breaks for a string of Unicode text. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>text</em>&nbsp;</td><td>The text to process. </td></tr>
    <tr><td></td><td valign=top><em>analysis</em>&nbsp;</td><td>An <a class="el" href="classGFC_1_1Pango_1_1Analysis.html">Analysis</a> structure from <a class="el" href="classGFC_1_1Pango_1_1Context.html#z1149_6">Pango::Context::itemize()</a>. </td></tr>
    <tr><td></td><td valign=top><em>attrs</em>&nbsp;</td><td>A vector of <a class="el" href="classGFC_1_1Pango_1_1LogAttr.html">LogAttr</a> to store the character information in. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a125" doxytag="break.hh::find_paragraph_boundary" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void find_paragraph_boundary           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const String &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>text</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>int *&nbsp;</td>
          <td class="mdname" nowrap> <em>paragraph_delimiter_index</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>int *&nbsp;</td>
          <td class="mdname" nowrap> <em>next_paragraph_start</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Locates a paragraph boundary in text. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>text</em>&nbsp;</td><td>The UTF-8 text. </td></tr>
    <tr><td></td><td valign=top><em>paragraph_delimiter_index</em>&nbsp;</td><td>The return location for index of delimiter. </td></tr>
    <tr><td></td><td valign=top><em>next_paragraph_start</em>&nbsp;</td><td>The return location for start of next paragraph.</td></tr>
  </table>
</dl>
<br>
A boundary is caused by delimiter characters, such as a newline, carriage return, carriage return-newline pair, or Unicode paragraph separator character. The index of the run of delimiters is returned in paragraph_delimiter_index. The index of the start of the paragraph (index after all delimiters) is stored in next_paragraph_start. If no delimiters are found, both paragraph_delimiter_index and next_paragraph_start are filled with the length of text (an index one off the end).     </td>
  </tr>
</table>
<a class="anchor" name="a126" doxytag="break.hh::get_log_attrs" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void get_log_attrs           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const String &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>text</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>PangoLanguage *&nbsp;</td>
          <td class="mdname" nowrap> <em>language</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>std::vector&lt; LogAttr &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>attrs</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>level</em> = <code>-1</code></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Computes a <a class="el" href="classGFC_1_1Pango_1_1LogAttr.html">LogAttr</a> for each character in <em>text</em>. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>text</em>&nbsp;</td><td>The text to process. </td></tr>
    <tr><td></td><td valign=top><em>language</em>&nbsp;</td><td>The language tag. </td></tr>
    <tr><td></td><td valign=top><em>attrs</em>&nbsp;</td><td>A vector of <a class="el" href="classGFC_1_1Pango_1_1LogAttr.html">LogAttr</a> with one <a class="el" href="classGFC_1_1Pango_1_1LogAttr.html">LogAttr</a> per character in text, plus one extra, to be filled in. </td></tr>
    <tr><td></td><td valign=top><em>level</em>&nbsp;</td><td>The embedding level, or -1 if unknown.</td></tr>
  </table>
</dl>
<br>
The <em>log_attrs</em> vector must have one <a class="el" href="classGFC_1_1Pango_1_1LogAttr.html">LogAttr</a> for each position in <em>text</em>; if text contains N characters, it has N+1 positions, including the last position at the end of the text. text should be an entire paragraph; logical attributes can't be computed without context (for example you need to see spaces on either side of a word to know the word is a word).     </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Tue Aug 24 00:34:33 2004 for GFC-UI by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>
</body>
</html>