]>
Commit | Line | Data |
---|---|---|
5f35b46a JS |
1 | \section{\class{wxTextAttrEx}}\label{wxtextattrex} |
2 | ||
3 | wxTextAttrEx is an extended version of wxTextAttr with more paragraph attributes. | |
4 | Currently it is only used with \helpref{wxRichTextCtrl}{wxrichtextctrl}. | |
5 | ||
6 | It is intended that eventually, the members of wxTextAttrEx will | |
7 | be folded into wxTextAttr, and wxTextAttr will be the official | |
8 | cross-platform API for text controls that support attributes. | |
9 | However, for now, wxTextAttrEx is provided as a means of enabling | |
10 | extra functionality in wxRichTextCtrl, while retaining some compatibility | |
11 | with the wxTextAttr API. | |
12 | ||
13 | The most efficient method of accessing wxRichTextCtrl functionality | |
14 | is a third attribute class, \helpref{wxRichTextAttr}{wxrichtextattr}, which | |
15 | optimizes its storage to allow it to be used for implementing objects | |
16 | in a buffer, as well as access to that buffer. | |
17 | ||
18 | This section only documents the additional members; see \helpref{wxTextAttr}{wxtextattr} for | |
19 | the remaining functions. | |
20 | ||
21 | \wxheading{Derived from} | |
22 | ||
23 | \helpref{wxTextAttr}{wxtextattr} | |
24 | ||
25 | \wxheading{Include files} | |
26 | ||
27 | <wx/richtext/richtextbuffer.h> | |
28 | ||
29 | \wxheading{Constants} | |
30 | ||
31 | The following values can be passed to SetAlignment to determine | |
32 | paragraph alignment. | |
33 | ||
34 | {\small | |
35 | \begin{verbatim} | |
36 | enum wxTextAttrAlignment | |
37 | { | |
38 | wxTEXT_ALIGNMENT_DEFAULT, | |
39 | wxTEXT_ALIGNMENT_LEFT, | |
40 | wxTEXT_ALIGNMENT_CENTRE, | |
41 | wxTEXT_ALIGNMENT_CENTER = wxTEXT_ALIGNMENT_CENTRE, | |
42 | wxTEXT_ALIGNMENT_RIGHT, | |
43 | wxTEXT_ALIGNMENT_JUSTIFIED | |
44 | }; | |
45 | \end{verbatim} | |
46 | } | |
47 | ||
48 | These values are passed in a bitlist to SetFlags to determine | |
49 | what attributes will be considered when setting the attributes | |
50 | for a text control. | |
51 | ||
52 | {\small | |
53 | \begin{verbatim} | |
54 | // Standard wxTextAttr constants | |
55 | ||
56 | #define wxTEXT_ATTR_TEXT_COLOUR 0x0001 | |
57 | #define wxTEXT_ATTR_BACKGROUND_COLOUR 0x0002 | |
58 | #define wxTEXT_ATTR_FONT_FACE 0x0004 | |
59 | #define wxTEXT_ATTR_FONT_SIZE 0x0008 | |
60 | #define wxTEXT_ATTR_FONT_WEIGHT 0x0010 | |
61 | #define wxTEXT_ATTR_FONT_ITALIC 0x0020 | |
62 | #define wxTEXT_ATTR_FONT_UNDERLINE 0x0040 | |
63 | #define wxTEXT_ATTR_FONT \ | |
64 | wxTEXT_ATTR_FONT_FACE | wxTEXT_ATTR_FONT_SIZE | wxTEXT_ATTR_FONT_WEIGHT \ | |
65 | | wxTEXT_ATTR_FONT_ITALIC | wxTEXT_ATTR_FONT_UNDERLINE | |
66 | #define wxTEXT_ATTR_ALIGNMENT 0x0080 | |
67 | #define wxTEXT_ATTR_LEFT_INDENT 0x0100 | |
68 | #define wxTEXT_ATTR_RIGHT_INDENT 0x0200 | |
69 | #define wxTEXT_ATTR_TABS 0x0400 | |
70 | ||
71 | // Extra formatting flags not in wxTextAttr | |
72 | ||
73 | #define wxTEXT_ATTR_PARA_SPACING_AFTER 0x00000800 | |
74 | #define wxTEXT_ATTR_PARA_SPACING_BEFORE 0x00001000 | |
75 | #define wxTEXT_ATTR_LINE_SPACING 0x00002000 | |
76 | #define wxTEXT_ATTR_CHARACTER_STYLE_NAME 0x00004000 | |
77 | #define wxTEXT_ATTR_PARAGRAPH_STYLE_NAME 0x00008000 | |
d2d0adc7 JS |
78 | #define wxTEXT_ATTR_LIST_STYLE_NAME 0x00010000 |
79 | #define wxTEXT_ATTR_BULLET_STYLE 0x00020000 | |
80 | #define wxTEXT_ATTR_BULLET_NUMBER 0x00040000 | |
81 | #define wxTEXT_ATTR_BULLET_TEXT 0x00080000 | |
82 | #define wxTEXT_ATTR_BULLET_NAME 0x00100000 | |
83 | #define wxTEXT_ATTR_URL 0x00200000 | |
36f01cc7 | 84 | #define wxTEXT_ATTR_PAGE_BREAK 0x00400000 |
1f65137f | 85 | #define wxTEXT_ATTR_EFFECTS 0x00800000 |
5f35b46a JS |
86 | \end{verbatim} |
87 | } | |
88 | ||
1f65137f | 89 | The following styles can be passed to wxTextAttrEx::SetBulletStyle: |
5f35b46a JS |
90 | |
91 | {\small | |
92 | \begin{verbatim} | |
d2d0adc7 JS |
93 | #define wxTEXT_ATTR_BULLET_STYLE_NONE 0x00000000 |
94 | #define wxTEXT_ATTR_BULLET_STYLE_ARABIC 0x00000001 | |
95 | #define wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER 0x00000002 | |
96 | #define wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER 0x00000004 | |
97 | #define wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER 0x00000008 | |
98 | #define wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER 0x00000010 | |
99 | #define wxTEXT_ATTR_BULLET_STYLE_SYMBOL 0x00000020 | |
100 | #define wxTEXT_ATTR_BULLET_STYLE_BITMAP 0x00000040 | |
101 | #define wxTEXT_ATTR_BULLET_STYLE_PARENTHESES 0x00000080 | |
102 | #define wxTEXT_ATTR_BULLET_STYLE_PERIOD 0x00000100 | |
103 | #define wxTEXT_ATTR_BULLET_STYLE_STANDARD 0x00000200 | |
104 | #define wxTEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS 0x00000400 | |
105 | #define wxTEXT_ATTR_BULLET_STYLE_OUTLINE 0x00000800 | |
106 | #define wxTEXT_ATTR_BULLET_STYLE_ALIGN_LEFT 0x00000000 | |
107 | #define wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT 0x00001000 | |
108 | #define wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE 0x00002000 | |
5f35b46a JS |
109 | \end{verbatim} |
110 | } | |
111 | ||
1f65137f JS |
112 | Of these, wxTEXT\_ATTR\_BULLET\_STYLE\_BITMAP is unimplemented. |
113 | ||
114 | The following constants can be passed to wxTextAttrEx::SetLineSpacing: | |
5f35b46a JS |
115 | |
116 | {\small | |
117 | \begin{verbatim} | |
118 | #define wxTEXT_ATTR_LINE_SPACING_NORMAL 10 | |
119 | #define wxTEXT_ATTR_LINE_SPACING_HALF 15 | |
120 | #define wxTEXT_ATTR_LINE_SPACING_TWICE 20 | |
121 | \end{verbatim} | |
122 | } | |
123 | ||
1f65137f JS |
124 | The following styles can be passed to wxTextAttrEx::SetTextEffects: |
125 | ||
126 | {\small | |
127 | \begin{verbatim} | |
128 | #define wxTEXT_ATTR_EFFECT_NONE 0x00000000 | |
129 | #define wxTEXT_ATTR_EFFECT_CAPITALS 0x00000001 | |
130 | #define wxTEXT_ATTR_EFFECT_SMALL_CAPITALS 0x00000002 | |
131 | #define wxTEXT_ATTR_EFFECT_STRIKETHROUGH 0x00000004 | |
132 | #define wxTEXT_ATTR_EFFECT_DOUBLE_STRIKETHROUGH 0x00000008 | |
133 | #define wxTEXT_ATTR_EFFECT_SHADOW 0x00000010 | |
134 | #define wxTEXT_ATTR_EFFECT_EMBOSS 0x00000020 | |
135 | #define wxTEXT_ATTR_EFFECT_OUTLINE 0x00000040 | |
136 | #define wxTEXT_ATTR_EFFECT_ENGRAVE 0x00000080 | |
137 | #define wxTEXT_ATTR_EFFECT_SUPERSCRIPT 0x00000100 | |
138 | #define wxTEXT_ATTR_EFFECT_SUBSCRIPT 0x00000200 | |
139 | \end{verbatim} | |
140 | } | |
141 | ||
142 | Of these, only wxTEXT\_ATTR\_EFFECT\_CAPITALS and wxTEXT\_ATTR\_EFFECT\_STRIKETHROUGH are implemented. | |
143 | ||
5f35b46a JS |
144 | \wxheading{See also} |
145 | ||
146 | \helpref{wxTextAttr}{wxtextattr}, \helpref{wxRichTextAttr}{wxrichtextattr}, \helpref{wxRichTextCtrl}{wxrichtextctrl} | |
147 | ||
148 | \latexignore{\rtfignore{\wxheading{Members}}} | |
149 | ||
150 | ||
151 | \membersection{wxTextAttrEx::wxTextAttrEx}\label{wxtextattrexwxtextattrex} | |
152 | ||
153 | \func{}{wxTextAttrEx}{\void} | |
154 | ||
155 | ||
156 | \func{}{wxTextAttrEx}{\param{const wxTextAttrEx\& }{attr}} | |
157 | ||
158 | Constructors. | |
159 | ||
62a268cc JS |
160 | \membersection{wxTextAttrEx::GetBulletFont}\label{wxtextattrexgetbulletfont} |
161 | ||
162 | \constfunc{const wxString\&}{GetBulletFont}{\void} | |
163 | ||
164 | Returns a string containing the name of the font associated with the bullet symbol. | |
165 | Only valid for attributes with wxTEXT\_ATTR\_BULLET\_SYMBOL. | |
166 | ||
d2d0adc7 JS |
167 | \membersection{wxTextAttrEx::GetBulletName}\label{wxtextattrexgetbulletname} |
168 | ||
169 | \constfunc{const wxString\&}{GetBulletName}{\void} | |
170 | ||
171 | Returns the standard bullet name, applicable if the bullet style is wxTEXT\_ATTR\_BULLET\_STYLE\_STANDARD. | |
172 | Currently the following standard bullet names are supported: | |
173 | ||
174 | \begin{itemize}\itemsep=0pt | |
175 | \item {\tt standard/circle} | |
176 | \item {\tt standard/square} | |
177 | \item {\tt standard/diamond} | |
178 | \item {\tt standard/triangle} | |
179 | \end{itemize} | |
180 | ||
181 | If you wish your application to support further bullet graphics, you can derive a | |
182 | class from wxRichTextRenderer or wxRichTextStdRenderer, override {\tt DrawStandardBullet} and {\tt EnumerateStandardBulletNames}, and | |
183 | set an instance of the class using \helpref{wxRichTextBuffer::SetRenderer}{wxrichtextbuffersetrenderer}. | |
184 | ||
5f35b46a JS |
185 | \membersection{wxTextAttrEx::GetBulletNumber}\label{wxtextattrexgetbulletnumber} |
186 | ||
187 | \constfunc{int}{GetBulletNumber}{\void} | |
188 | ||
189 | Returns the bullet number. | |
190 | ||
191 | \membersection{wxTextAttrEx::GetBulletStyle}\label{wxtextattrexgetbulletstyle} | |
192 | ||
193 | \constfunc{int}{GetBulletStyle}{\void} | |
194 | ||
195 | Returns the bullet style. | |
196 | See \helpref{wxTextAttrEx::SetBulletStyle}{wxtextattrexsetbulletstyle} for a list of available styles. | |
197 | ||
1f65137f | 198 | \membersection{wxTextAttrEx::GetBulletText}\label{wxtextattrexgetbullettext} |
5f35b46a | 199 | |
d2d0adc7 | 200 | \constfunc{const wxString\&}{GetBulletText}{\void} |
5f35b46a | 201 | |
d2d0adc7 | 202 | Returns the bullet text, which could be a symbol, or (for example) cached outline text. |
5f35b46a JS |
203 | |
204 | \membersection{wxTextAttrEx::GetCharacterStyleName}\label{wxtextattrexgetcharacterstylename} | |
205 | ||
206 | \constfunc{const wxString\&}{GetCharacterStyleName}{\void} | |
207 | ||
208 | Returns the name of the character style. | |
209 | ||
210 | \membersection{wxTextAttrEx::GetLineSpacing}\label{wxtextattrexgetlinespacing} | |
211 | ||
212 | \constfunc{int}{GetLineSpacing}{\void} | |
213 | ||
214 | Returns the line spacing value, one of wxTEXT\_ATTR\_LINE\_SPACING\_NORMAL, | |
215 | wxTEXT\_ATTR\_LINE\_SPACING\_HALF, and wxTEXT\_ATTR\_LINE\_SPACING\_TWICE. | |
216 | ||
d2d0adc7 JS |
217 | \membersection{wxTextAttrEx::GetListStyleName}\label{wxtextattrexgetliststylename} |
218 | ||
219 | \constfunc{const wxString\&}{GetListStyleName}{\void} | |
220 | ||
221 | Returns the name of the list style. | |
222 | ||
5f35b46a JS |
223 | \membersection{wxTextAttrEx::GetParagraphSpacingAfter}\label{wxtextattrexgetparagraphspacingafter} |
224 | ||
225 | \constfunc{int}{GetParagraphSpacingAfter}{\void} | |
226 | ||
227 | Returns the space in tenths of a millimeter after the paragraph. | |
228 | ||
229 | \membersection{wxTextAttrEx::GetParagraphSpacingBefore}\label{wxtextattrexgetparagraphspacingbefore} | |
230 | ||
231 | \constfunc{int}{GetParagraphSpacingBefore}{\void} | |
232 | ||
233 | Returns the space in tenths of a millimeter before the paragraph. | |
234 | ||
235 | \membersection{wxTextAttrEx::GetParagraphStyleName}\label{wxtextattrexgetparagraphstylename} | |
236 | ||
237 | \constfunc{const wxString\&}{GetParagraphStyleName}{\void} | |
238 | ||
239 | Returns the name of the paragraph style. | |
240 | ||
1f65137f JS |
241 | \membersection{wxTextAttrEx::GetTextEffectFlags}\label{wxtextattrexgettexteffectflags} |
242 | ||
243 | \constfunc{int}{GetTextEffectFlags}{\void} | |
244 | ||
245 | Returns the text effect bits of interest. See \helpref{wxTextAttr::SetFlags}{wxtextattrsetflags} for further information. | |
246 | ||
247 | \membersection{wxTextAttrEx::GetTextEffects}\label{wxtextattrexgettexteffects} | |
248 | ||
249 | \constfunc{int}{GetTextEffects}{\void} | |
250 | ||
251 | Returns the text effects, a bit list of styles. See \helpref{wxTextAttrEx::SetTextEffects}{wxtextattrexsettexteffects} for | |
252 | details. | |
253 | ||
d2d0adc7 JS |
254 | \membersection{wxTextAttrEx::GetURL}\label{wxtextattrexgeturl} |
255 | ||
256 | \constfunc{const wxString\&}{GetURL}{\void} | |
257 | ||
258 | Returns the URL for the content. Content with wxTEXT\_ATTR\_URL style | |
259 | causes wxRichTextCtrl to show a hand cursor over it, and wxRichTextCtrl generates | |
260 | a wxTextUrlEvent when the content is clicked. | |
261 | ||
262 | \membersection{wxTextAttrEx::HasBulletName}\label{wxtextattrexhasbulletname} | |
263 | ||
264 | \constfunc{bool}{HasBulletName}{\void} | |
265 | ||
266 | Returns \true if the attribute object specifies a standard bullet name. | |
267 | ||
5f35b46a JS |
268 | \membersection{wxTextAttrEx::HasBulletNumber}\label{wxtextattrexhasbulletnumber} |
269 | ||
270 | \constfunc{bool}{HasBulletNumber}{\void} | |
271 | ||
272 | Returns \true if the attribute object specifies a bullet number. | |
273 | ||
274 | \membersection{wxTextAttrEx::HasBulletStyle}\label{wxtextattrexhasbulletstyle} | |
275 | ||
276 | \constfunc{bool}{HasBulletStyle}{\void} | |
277 | ||
278 | Returns \true if the attribute object specifies a bullet style. | |
279 | ||
d2d0adc7 | 280 | \membersection{wxTextAttrEx::HasBulletText}\label{wxtextattrexhasbullettext} |
5f35b46a | 281 | |
d2d0adc7 | 282 | \constfunc{bool}{HasBulletText}{\void} |
5f35b46a | 283 | |
d2d0adc7 | 284 | Returns \true if the attribute object specifies bullet text (usually containing a symbol). |
5f35b46a JS |
285 | |
286 | \membersection{wxTextAttrEx::HasCharacterStyleName}\label{wxtextattrexhascharacterstylename} | |
287 | ||
288 | \constfunc{bool}{HasCharacterStyleName}{\void} | |
289 | ||
290 | Returns \true if the attribute object specifies a character style name. | |
291 | ||
292 | \membersection{wxTextAttrEx::HasLineSpacing}\label{wxtextattrexhaslinespacing} | |
293 | ||
294 | \constfunc{bool}{HasLineSpacing}{\void} | |
295 | ||
296 | Returns \true if the attribute object specifies line spacing. | |
297 | ||
d2d0adc7 JS |
298 | \membersection{wxTextAttrEx::HasListStyleName}\label{wxtextattrexhasliststylename} |
299 | ||
300 | \constfunc{bool}{HasListStyleName}{\void} | |
301 | ||
302 | Returns \true if the attribute object specifies a list style name. | |
303 | ||
36f01cc7 JS |
304 | \membersection{wxTextAttrEx::HasPageBreak}\label{wxtextattrexhaspagebreak} |
305 | ||
306 | \constfunc{bool}{HasPageBreak}{\void} | |
307 | ||
308 | Returns \true if the attribute object specifies a page break before this paragraph. | |
309 | ||
5f35b46a JS |
310 | \membersection{wxTextAttrEx::HasParagraphSpacingAfter}\label{wxtextattrexhasparagraphspacingafter} |
311 | ||
312 | \constfunc{bool}{HasParagraphSpacingAfter}{\void} | |
313 | ||
314 | Returns \true if the attribute object specifies spacing after a paragraph. | |
315 | ||
316 | \membersection{wxTextAttrEx::HasParagraphSpacingBefore}\label{wxtextattrexhasparagraphspacingbefore} | |
317 | ||
318 | \constfunc{bool}{HasParagraphSpacingBefore}{\void} | |
319 | ||
320 | Returns \true if the attribute object specifies spacing before a paragraph. | |
321 | ||
322 | \membersection{wxTextAttrEx::HasParagraphStyleName}\label{wxtextattrexhasparagraphstylename} | |
323 | ||
324 | \constfunc{bool}{HasParagraphStyleName}{\void} | |
325 | ||
326 | Returns \true if the attribute object specifies a paragraph style name. | |
327 | ||
328 | \membersection{wxTextAttrEx::Init}\label{wxtextattrexinit} | |
329 | ||
330 | \func{void}{Init}{\void} | |
331 | ||
332 | Initialises this object. | |
333 | ||
334 | \membersection{wxTextAttrEx::IsCharacterStyle}\label{wxtextattrexischaracterstyle} | |
335 | ||
336 | \constfunc{bool}{IsCharacterStyle}{\void} | |
337 | ||
338 | Returns \true if the object represents a character style, that is, | |
339 | the flags specify a font or a text background or foreground colour. | |
340 | ||
341 | \membersection{wxTextAttrEx::IsDefault}\label{wxtextattrexisdefault} | |
342 | ||
343 | \constfunc{bool}{IsDefault}{\void} | |
344 | ||
345 | Returns \false if we have any attributes set, \true otherwise. | |
346 | ||
347 | \membersection{wxTextAttrEx::IsParagraphStyle}\label{wxtextattrexisparagraphstyle} | |
348 | ||
349 | \constfunc{bool}{IsParagraphStyle}{\void} | |
350 | ||
351 | Returns \true if the object represents a paragraph style, that is, | |
352 | the flags specify alignment, indentation, tabs, paragraph spacing, or | |
353 | bullet style. | |
354 | ||
62a268cc JS |
355 | \membersection{wxTextAttrEx::SetBulletFont}\label{wxtextattrexsetbulletfont} |
356 | ||
357 | \func{void}{SetBulletFont}{\param{const wxString\& }{font}} | |
358 | ||
359 | Sets the name of the font associated with the bullet symbol. | |
360 | Only valid for attributes with wxTEXT\_ATTR\_BULLET\_SYMBOL. | |
361 | ||
5f35b46a JS |
362 | \membersection{wxTextAttrEx::SetBulletNumber}\label{wxtextattrexsetbulletnumber} |
363 | ||
364 | \func{void}{SetBulletNumber}{\param{int }{n}} | |
365 | ||
366 | Sets the bullet number. | |
367 | ||
d2d0adc7 JS |
368 | \membersection{wxTextAttrEx::SetBulletName}\label{wxtextattrexsetbulletname} |
369 | ||
370 | \func{void}{SetBulletName}{\param{const wxString\& }{name}} | |
371 | ||
372 | Sets the standard bullet name, applicable if the bullet style is wxTEXT\_ATTR\_BULLET\_STYLE\_STANDARD. | |
373 | See \helpref{wxTextAttrEx::GetBulletName}{wxtextattrexgetbulletname} for a list | |
374 | of supported names, and how to expand the range of supported types. | |
375 | ||
5f35b46a JS |
376 | \membersection{wxTextAttrEx::SetBulletStyle}\label{wxtextattrexsetbulletstyle} |
377 | ||
378 | \func{void}{SetBulletStyle}{\param{int }{style}} | |
379 | ||
380 | Sets the bullet style. The following styles can be passed: | |
381 | ||
382 | {\small | |
383 | \begin{verbatim} | |
d2d0adc7 JS |
384 | #define wxTEXT_ATTR_BULLET_STYLE_NONE 0x00000000 |
385 | #define wxTEXT_ATTR_BULLET_STYLE_ARABIC 0x00000001 | |
386 | #define wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER 0x00000002 | |
387 | #define wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER 0x00000004 | |
388 | #define wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER 0x00000008 | |
389 | #define wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER 0x00000010 | |
390 | #define wxTEXT_ATTR_BULLET_STYLE_SYMBOL 0x00000020 | |
391 | #define wxTEXT_ATTR_BULLET_STYLE_BITMAP 0x00000040 | |
392 | #define wxTEXT_ATTR_BULLET_STYLE_PARENTHESES 0x00000080 | |
393 | #define wxTEXT_ATTR_BULLET_STYLE_PERIOD 0x00000100 | |
394 | #define wxTEXT_ATTR_BULLET_STYLE_STANDARD 0x00000200 | |
395 | #define wxTEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS 0x00000400 | |
396 | #define wxTEXT_ATTR_BULLET_STYLE_OUTLINE 0x00000800 | |
397 | #define wxTEXT_ATTR_BULLET_STYLE_ALIGN_LEFT 0x00000000 | |
398 | #define wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT 0x00001000 | |
399 | #define wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE 0x00002000 | |
5f35b46a JS |
400 | \end{verbatim} |
401 | } | |
402 | ||
1f65137f JS |
403 | Currently wxTEXT\_ATTR\_BULLET\_STYLE\_BITMAP is not supported. |
404 | ||
d2d0adc7 | 405 | \membersection{wxTextAttrEx::SetBulletText}\label{wxtextattrexsetbullettext} |
5f35b46a | 406 | |
d2d0adc7 | 407 | \func{void}{SetBulletText}{\param{const wxString\& }{text}} |
5f35b46a | 408 | |
d2d0adc7 | 409 | Sets the bullet text, which could be a symbol, or (for example) cached outline text. |
5f35b46a JS |
410 | |
411 | \membersection{wxTextAttrEx::SetCharacterStyleName}\label{wxtextattrexsetcharacterstylename} | |
412 | ||
413 | \func{void}{SetCharacterStyleName}{\param{const wxString\& }{name}} | |
414 | ||
415 | Sets the character style name. | |
416 | ||
417 | \membersection{wxTextAttrEx::SetLineSpacing}\label{wxtextattrexsetlinespacing} | |
418 | ||
419 | \func{void}{SetLineSpacing}{\param{int }{spacing}} | |
420 | ||
421 | Sets the line spacing. {\it spacing} is a multiple, where 10 means single-spacing, | |
422 | 15 means 1.5 spacing, and 20 means double spacing. The following constants are | |
423 | defined for convenience: | |
424 | ||
425 | {\small | |
426 | \begin{verbatim} | |
427 | #define wxTEXT_ATTR_LINE_SPACING_NORMAL 10 | |
428 | #define wxTEXT_ATTR_LINE_SPACING_HALF 15 | |
429 | #define wxTEXT_ATTR_LINE_SPACING_TWICE 20 | |
430 | \end{verbatim} | |
431 | } | |
432 | ||
d2d0adc7 JS |
433 | \membersection{wxTextAttrEx::SetListStyleName}\label{wxtextattrexsetliststylename} |
434 | ||
435 | \func{void}{SetListStyleName}{\param{const wxString\& }{name}} | |
436 | ||
437 | Sets the list style name. | |
438 | ||
36f01cc7 JS |
439 | \membersection{wxTextAttrEx::SetPageBreak}\label{wxtextattrexsetpagebreak} |
440 | ||
441 | \func{void}{SetPageBreak}{\param{bool}{ pageBreak = true}} | |
442 | ||
443 | Specifies a page break before this paragraph. | |
444 | ||
5f35b46a JS |
445 | \membersection{wxTextAttrEx::SetParagraphSpacingAfter}\label{wxtextattrexsetparagraphspacingafter} |
446 | ||
447 | \func{void}{SetParagraphSpacingAfter}{\param{int }{spacing}} | |
448 | ||
449 | Sets the spacing after a paragraph, in tenths of a millimetre. | |
450 | ||
451 | \membersection{wxTextAttrEx::SetParagraphSpacingBefore}\label{wxtextattrexsetparagraphspacingbefore} | |
452 | ||
453 | \func{void}{SetParagraphSpacingBefore}{\param{int }{spacing}} | |
454 | ||
455 | Sets the spacing before a paragraph, in tenths of a millimetre. | |
456 | ||
457 | \membersection{wxTextAttrEx::SetParagraphStyleName}\label{wxtextattrexsetparagraphstylename} | |
458 | ||
459 | \func{void}{SetParagraphStyleName}{\param{const wxString\& }{name}} | |
460 | ||
461 | Sets the name of the paragraph style. | |
462 | ||
1f65137f JS |
463 | \membersection{wxTextAttrEx::SetTextEffectFlags}\label{wxtextattrexsettexteffectflags} |
464 | ||
465 | \func{void}{SetTextEffectFlags}{\param{int }{flags}} | |
466 | ||
467 | Sets the text effect bits of interest. You should also pass wxTEXT\_ATTR\_EFFECTS to \helpref{wxTextAttr::SetFlags}{wxtextattrsetflags}. | |
468 | ||
469 | \membersection{wxTextAttrEx::SetTextEffects}\label{wxtextattrexsettexteffects} | |
470 | ||
471 | \func{void}{SetTextEffects}{\param{int }{effects}} | |
472 | ||
473 | Sets the text effects, a bit list of styles. | |
474 | ||
475 | The following styles can be passed: | |
476 | ||
477 | {\small | |
478 | \begin{verbatim} | |
479 | #define wxTEXT_ATTR_EFFECT_NONE 0x00000000 | |
480 | #define wxTEXT_ATTR_EFFECT_CAPITALS 0x00000001 | |
481 | #define wxTEXT_ATTR_EFFECT_SMALL_CAPITALS 0x00000002 | |
482 | #define wxTEXT_ATTR_EFFECT_STRIKETHROUGH 0x00000004 | |
483 | #define wxTEXT_ATTR_EFFECT_DOUBLE_STRIKETHROUGH 0x00000008 | |
484 | #define wxTEXT_ATTR_EFFECT_SHADOW 0x00000010 | |
485 | #define wxTEXT_ATTR_EFFECT_EMBOSS 0x00000020 | |
486 | #define wxTEXT_ATTR_EFFECT_OUTLINE 0x00000040 | |
487 | #define wxTEXT_ATTR_EFFECT_ENGRAVE 0x00000080 | |
488 | #define wxTEXT_ATTR_EFFECT_SUPERSCRIPT 0x00000100 | |
489 | #define wxTEXT_ATTR_EFFECT_SUBSCRIPT 0x00000200 | |
490 | \end{verbatim} | |
491 | } | |
492 | ||
493 | Of these, only wxTEXT\_ATTR\_EFFECT\_CAPITALS and wxTEXT\_ATTR\_EFFECT\_STRIKETHROUGH are implemented. | |
494 | wxTEXT\_ATTR\_EFFECT\_CAPITALS capitalises text when displayed (leaving the case of the actual buffer | |
495 | text unchanged), and wxTEXT\_ATTR\_EFFECT\_STRIKETHROUGH draws a line through text. | |
496 | ||
497 | To set effects, you should also pass wxTEXT\_ATTR\_EFFECTS to \helpref{wxTextAttr::SetFlags}{wxtextattrsetflags}, and call\rtfsp | |
498 | \helpref{wxTextAttrEx::SetTextEffectFlags}{wxtextattrexsettexteffectflags} with the styles (taken from the | |
499 | above set) that you are interested in setting. | |
500 | ||
d2d0adc7 JS |
501 | \membersection{wxTextAttrEx::SetURL}\label{wxtextattrexseturl} |
502 | ||
503 | \func{void}{SetURL}{\param{const wxString\& }{url}} | |
504 | ||
505 | Sets the URL for the content. Sets the wxTEXT\_ATTR\_URL style; content with this style | |
506 | causes wxRichTextCtrl to show a hand cursor over it, and wxRichTextCtrl generates | |
507 | a wxTextUrlEvent when the content is clicked. | |
508 | ||
5f35b46a JS |
509 | \membersection{wxTextAttrEx::operator=}\label{wxtextattrexoperatorassign} |
510 | ||
511 | \func{void operator}{operator=}{\param{const wxTextAttr\& }{attr}} | |
512 | ||
513 | Assignment from a wxTextAttr object. | |
514 | ||
515 | \func{void operator}{operator=}{\param{const wxTextAttrEx\& }{attr}} | |
516 | ||
517 | Assignment from a wxTextAttrEx object. | |
62a268cc | 518 |