]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/textattrex.tex
fix assert because of passing more than one border bit in style to the base class...
[wxWidgets.git] / docs / latex / wx / textattrex.tex
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
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
84 #define wxTEXT_ATTR_PAGE_BREAK 0x00400000
85 #define wxTEXT_ATTR_EFFECTS 0x00800000
86 #define wxTEXT_ATTR_OUTLINE_LEVEL 0x01000000
87 \end{verbatim}
88 }
89
90 The following styles can be passed to wxTextAttrEx::SetBulletStyle:
91
92 {\small
93 \begin{verbatim}
94 #define wxTEXT_ATTR_BULLET_STYLE_NONE 0x00000000
95 #define wxTEXT_ATTR_BULLET_STYLE_ARABIC 0x00000001
96 #define wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER 0x00000002
97 #define wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER 0x00000004
98 #define wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER 0x00000008
99 #define wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER 0x00000010
100 #define wxTEXT_ATTR_BULLET_STYLE_SYMBOL 0x00000020
101 #define wxTEXT_ATTR_BULLET_STYLE_BITMAP 0x00000040
102 #define wxTEXT_ATTR_BULLET_STYLE_PARENTHESES 0x00000080
103 #define wxTEXT_ATTR_BULLET_STYLE_PERIOD 0x00000100
104 #define wxTEXT_ATTR_BULLET_STYLE_STANDARD 0x00000200
105 #define wxTEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS 0x00000400
106 #define wxTEXT_ATTR_BULLET_STYLE_OUTLINE 0x00000800
107 #define wxTEXT_ATTR_BULLET_STYLE_ALIGN_LEFT 0x00000000
108 #define wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT 0x00001000
109 #define wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE 0x00002000
110 \end{verbatim}
111 }
112
113 Of these, wxTEXT\_ATTR\_BULLET\_STYLE\_BITMAP is unimplemented.
114
115 The following constants can be passed to wxTextAttrEx::SetLineSpacing:
116
117 {\small
118 \begin{verbatim}
119 #define wxTEXT_ATTR_LINE_SPACING_NORMAL 10
120 #define wxTEXT_ATTR_LINE_SPACING_HALF 15
121 #define wxTEXT_ATTR_LINE_SPACING_TWICE 20
122 \end{verbatim}
123 }
124
125 The following styles can be passed to wxTextAttrEx::SetTextEffects:
126
127 {\small
128 \begin{verbatim}
129 #define wxTEXT_ATTR_EFFECT_NONE 0x00000000
130 #define wxTEXT_ATTR_EFFECT_CAPITALS 0x00000001
131 #define wxTEXT_ATTR_EFFECT_SMALL_CAPITALS 0x00000002
132 #define wxTEXT_ATTR_EFFECT_STRIKETHROUGH 0x00000004
133 #define wxTEXT_ATTR_EFFECT_DOUBLE_STRIKETHROUGH 0x00000008
134 #define wxTEXT_ATTR_EFFECT_SHADOW 0x00000010
135 #define wxTEXT_ATTR_EFFECT_EMBOSS 0x00000020
136 #define wxTEXT_ATTR_EFFECT_OUTLINE 0x00000040
137 #define wxTEXT_ATTR_EFFECT_ENGRAVE 0x00000080
138 #define wxTEXT_ATTR_EFFECT_SUPERSCRIPT 0x00000100
139 #define wxTEXT_ATTR_EFFECT_SUBSCRIPT 0x00000200
140 \end{verbatim}
141 }
142
143 Of these, only wxTEXT\_ATTR\_EFFECT\_CAPITALS and wxTEXT\_ATTR\_EFFECT\_STRIKETHROUGH are implemented.
144
145 \wxheading{See also}
146
147 \helpref{wxTextAttr}{wxtextattr}, \helpref{wxRichTextAttr}{wxrichtextattr}, \helpref{wxRichTextCtrl}{wxrichtextctrl}
148
149 \latexignore{\rtfignore{\wxheading{Members}}}
150
151
152 \membersection{wxTextAttrEx::wxTextAttrEx}\label{wxtextattrexwxtextattrex}
153
154 \func{}{wxTextAttrEx}{\void}
155
156
157 \func{}{wxTextAttrEx}{\param{const wxTextAttrEx\& }{attr}}
158
159 Constructors.
160
161 \membersection{wxTextAttrEx::GetBulletFont}\label{wxtextattrexgetbulletfont}
162
163 \constfunc{const wxString\&}{GetBulletFont}{\void}
164
165 Returns a string containing the name of the font associated with the bullet symbol.
166 Only valid for attributes with wxTEXT\_ATTR\_BULLET\_SYMBOL.
167
168 \membersection{wxTextAttrEx::GetBulletName}\label{wxtextattrexgetbulletname}
169
170 \constfunc{const wxString\&}{GetBulletName}{\void}
171
172 Returns the standard bullet name, applicable if the bullet style is wxTEXT\_ATTR\_BULLET\_STYLE\_STANDARD.
173 Currently the following standard bullet names are supported:
174
175 \begin{itemize}\itemsep=0pt
176 \item {\tt standard/circle}
177 \item {\tt standard/square}
178 \item {\tt standard/diamond}
179 \item {\tt standard/triangle}
180 \end{itemize}
181
182 If you wish your application to support further bullet graphics, you can derive a
183 class from wxRichTextRenderer or wxRichTextStdRenderer, override {\tt DrawStandardBullet} and {\tt EnumerateStandardBulletNames}, and
184 set an instance of the class using \helpref{wxRichTextBuffer::SetRenderer}{wxrichtextbuffersetrenderer}.
185
186 \membersection{wxTextAttrEx::GetBulletNumber}\label{wxtextattrexgetbulletnumber}
187
188 \constfunc{int}{GetBulletNumber}{\void}
189
190 Returns the bullet number.
191
192 \membersection{wxTextAttrEx::GetBulletStyle}\label{wxtextattrexgetbulletstyle}
193
194 \constfunc{int}{GetBulletStyle}{\void}
195
196 Returns the bullet style.
197 See \helpref{wxTextAttrEx::SetBulletStyle}{wxtextattrexsetbulletstyle} for a list of available styles.
198
199 \membersection{wxTextAttrEx::GetBulletText}\label{wxtextattrexgetbullettext}
200
201 \constfunc{const wxString\&}{GetBulletText}{\void}
202
203 Returns the bullet text, which could be a symbol, or (for example) cached outline text.
204
205 \membersection{wxTextAttrEx::GetCharacterStyleName}\label{wxtextattrexgetcharacterstylename}
206
207 \constfunc{const wxString\&}{GetCharacterStyleName}{\void}
208
209 Returns the name of the character style.
210
211 \membersection{wxTextAttrEx::GetLineSpacing}\label{wxtextattrexgetlinespacing}
212
213 \constfunc{int}{GetLineSpacing}{\void}
214
215 Returns the line spacing value, one of wxTEXT\_ATTR\_LINE\_SPACING\_NORMAL,
216 wxTEXT\_ATTR\_LINE\_SPACING\_HALF, and wxTEXT\_ATTR\_LINE\_SPACING\_TWICE.
217
218 \membersection{wxTextAttrEx::GetListStyleName}\label{wxtextattrexgetliststylename}
219
220 \constfunc{const wxString\&}{GetListStyleName}{\void}
221
222 Returns the name of the list style.
223
224 \membersection{wxTextAttrEx::GetOutlineLevel}\label{wxtextattrexgetoutlinelevel}
225
226 \constfunc{bool}{GetOutlineLevel}{\void}
227
228 Returns the outline level.
229
230 \membersection{wxTextAttrEx::GetParagraphSpacingAfter}\label{wxtextattrexgetparagraphspacingafter}
231
232 \constfunc{int}{GetParagraphSpacingAfter}{\void}
233
234 Returns the space in tenths of a millimeter after the paragraph.
235
236 \membersection{wxTextAttrEx::GetParagraphSpacingBefore}\label{wxtextattrexgetparagraphspacingbefore}
237
238 \constfunc{int}{GetParagraphSpacingBefore}{\void}
239
240 Returns the space in tenths of a millimeter before the paragraph.
241
242 \membersection{wxTextAttrEx::GetParagraphStyleName}\label{wxtextattrexgetparagraphstylename}
243
244 \constfunc{const wxString\&}{GetParagraphStyleName}{\void}
245
246 Returns the name of the paragraph style.
247
248 \membersection{wxTextAttrEx::GetTextEffectFlags}\label{wxtextattrexgettexteffectflags}
249
250 \constfunc{int}{GetTextEffectFlags}{\void}
251
252 Returns the text effect bits of interest. See \helpref{wxTextAttr::SetFlags}{wxtextattrsetflags} for further information.
253
254 \membersection{wxTextAttrEx::GetTextEffects}\label{wxtextattrexgettexteffects}
255
256 \constfunc{int}{GetTextEffects}{\void}
257
258 Returns the text effects, a bit list of styles. See \helpref{wxTextAttrEx::SetTextEffects}{wxtextattrexsettexteffects} for
259 details.
260
261 \membersection{wxTextAttrEx::GetURL}\label{wxtextattrexgeturl}
262
263 \constfunc{const wxString\&}{GetURL}{\void}
264
265 Returns the URL for the content. Content with wxTEXT\_ATTR\_URL style
266 causes wxRichTextCtrl to show a hand cursor over it, and wxRichTextCtrl generates
267 a wxTextUrlEvent when the content is clicked.
268
269 \membersection{wxTextAttrEx::HasBulletName}\label{wxtextattrexhasbulletname}
270
271 \constfunc{bool}{HasBulletName}{\void}
272
273 Returns \true if the attribute object specifies a standard bullet name.
274
275 \membersection{wxTextAttrEx::HasBulletNumber}\label{wxtextattrexhasbulletnumber}
276
277 \constfunc{bool}{HasBulletNumber}{\void}
278
279 Returns \true if the attribute object specifies a bullet number.
280
281 \membersection{wxTextAttrEx::HasBulletStyle}\label{wxtextattrexhasbulletstyle}
282
283 \constfunc{bool}{HasBulletStyle}{\void}
284
285 Returns \true if the attribute object specifies a bullet style.
286
287 \membersection{wxTextAttrEx::HasBulletText}\label{wxtextattrexhasbullettext}
288
289 \constfunc{bool}{HasBulletText}{\void}
290
291 Returns \true if the attribute object specifies bullet text (usually containing a symbol).
292
293 \membersection{wxTextAttrEx::HasCharacterStyleName}\label{wxtextattrexhascharacterstylename}
294
295 \constfunc{bool}{HasCharacterStyleName}{\void}
296
297 Returns \true if the attribute object specifies a character style name.
298
299 \membersection{wxTextAttrEx::HasLineSpacing}\label{wxtextattrexhaslinespacing}
300
301 \constfunc{bool}{HasLineSpacing}{\void}
302
303 Returns \true if the attribute object specifies line spacing.
304
305 \membersection{wxTextAttrEx::HasListStyleName}\label{wxtextattrexhasliststylename}
306
307 \constfunc{bool}{HasListStyleName}{\void}
308
309 Returns \true if the attribute object specifies a list style name.
310
311 \membersection{wxTextAttrEx::HasOutlineLevel}\label{wxtextattrexhasoutlinelevel}
312
313 \constfunc{bool}{HasOutlineLevel}{\void}
314
315 Returns \true if the attribute object specifies an outline level.
316
317 \membersection{wxTextAttrEx::HasPageBreak}\label{wxtextattrexhaspagebreak}
318
319 \constfunc{bool}{HasPageBreak}{\void}
320
321 Returns \true if the attribute object specifies a page break before this paragraph.
322
323 \membersection{wxTextAttrEx::HasParagraphSpacingAfter}\label{wxtextattrexhasparagraphspacingafter}
324
325 \constfunc{bool}{HasParagraphSpacingAfter}{\void}
326
327 Returns \true if the attribute object specifies spacing after a paragraph.
328
329 \membersection{wxTextAttrEx::HasParagraphSpacingBefore}\label{wxtextattrexhasparagraphspacingbefore}
330
331 \constfunc{bool}{HasParagraphSpacingBefore}{\void}
332
333 Returns \true if the attribute object specifies spacing before a paragraph.
334
335 \membersection{wxTextAttrEx::HasParagraphStyleName}\label{wxtextattrexhasparagraphstylename}
336
337 \constfunc{bool}{HasParagraphStyleName}{\void}
338
339 Returns \true if the attribute object specifies a paragraph style name.
340
341 \membersection{wxTextAttrEx::HasTextEffects}\label{wxtextattrexhastexteffects}
342
343 \constfunc{bool}{HasTextEffects}{\void}
344
345 Returns \true if the attribute object specifies text effects.
346
347 \membersection{wxTextAttrEx::HasURL}\label{wxtextattrexhasurl}
348
349 \constfunc{bool}{HasURL}{\void}
350
351 Returns \true if the attribute object specifies a URL.
352
353 \membersection{wxTextAttrEx::Init}\label{wxtextattrexinit}
354
355 \func{void}{Init}{\void}
356
357 Initialises this object.
358
359 \membersection{wxTextAttrEx::IsCharacterStyle}\label{wxtextattrexischaracterstyle}
360
361 \constfunc{bool}{IsCharacterStyle}{\void}
362
363 Returns \true if the object represents a character style, that is,
364 the flags specify a font or a text background or foreground colour.
365
366 \membersection{wxTextAttrEx::IsDefault}\label{wxtextattrexisdefault}
367
368 \constfunc{bool}{IsDefault}{\void}
369
370 Returns \false if we have any attributes set, \true otherwise.
371
372 \membersection{wxTextAttrEx::IsParagraphStyle}\label{wxtextattrexisparagraphstyle}
373
374 \constfunc{bool}{IsParagraphStyle}{\void}
375
376 Returns \true if the object represents a paragraph style, that is,
377 the flags specify alignment, indentation, tabs, paragraph spacing, or
378 bullet style.
379
380 \membersection{wxTextAttrEx::SetBulletFont}\label{wxtextattrexsetbulletfont}
381
382 \func{void}{SetBulletFont}{\param{const wxString\& }{font}}
383
384 Sets the name of the font associated with the bullet symbol.
385 Only valid for attributes with wxTEXT\_ATTR\_BULLET\_SYMBOL.
386
387 \membersection{wxTextAttrEx::SetBulletNumber}\label{wxtextattrexsetbulletnumber}
388
389 \func{void}{SetBulletNumber}{\param{int }{n}}
390
391 Sets the bullet number.
392
393 \membersection{wxTextAttrEx::SetBulletName}\label{wxtextattrexsetbulletname}
394
395 \func{void}{SetBulletName}{\param{const wxString\& }{name}}
396
397 Sets the standard bullet name, applicable if the bullet style is wxTEXT\_ATTR\_BULLET\_STYLE\_STANDARD.
398 See \helpref{wxTextAttrEx::GetBulletName}{wxtextattrexgetbulletname} for a list
399 of supported names, and how to expand the range of supported types.
400
401 \membersection{wxTextAttrEx::SetBulletStyle}\label{wxtextattrexsetbulletstyle}
402
403 \func{void}{SetBulletStyle}{\param{int }{style}}
404
405 Sets the bullet style. The following styles can be passed:
406
407 {\small
408 \begin{verbatim}
409 #define wxTEXT_ATTR_BULLET_STYLE_NONE 0x00000000
410 #define wxTEXT_ATTR_BULLET_STYLE_ARABIC 0x00000001
411 #define wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER 0x00000002
412 #define wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER 0x00000004
413 #define wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER 0x00000008
414 #define wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER 0x00000010
415 #define wxTEXT_ATTR_BULLET_STYLE_SYMBOL 0x00000020
416 #define wxTEXT_ATTR_BULLET_STYLE_BITMAP 0x00000040
417 #define wxTEXT_ATTR_BULLET_STYLE_PARENTHESES 0x00000080
418 #define wxTEXT_ATTR_BULLET_STYLE_PERIOD 0x00000100
419 #define wxTEXT_ATTR_BULLET_STYLE_STANDARD 0x00000200
420 #define wxTEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS 0x00000400
421 #define wxTEXT_ATTR_BULLET_STYLE_OUTLINE 0x00000800
422 #define wxTEXT_ATTR_BULLET_STYLE_ALIGN_LEFT 0x00000000
423 #define wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT 0x00001000
424 #define wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE 0x00002000
425 \end{verbatim}
426 }
427
428 Currently wxTEXT\_ATTR\_BULLET\_STYLE\_BITMAP is not supported.
429
430 \membersection{wxTextAttrEx::SetBulletText}\label{wxtextattrexsetbullettext}
431
432 \func{void}{SetBulletText}{\param{const wxString\& }{text}}
433
434 Sets the bullet text, which could be a symbol, or (for example) cached outline text.
435
436 \membersection{wxTextAttrEx::SetCharacterStyleName}\label{wxtextattrexsetcharacterstylename}
437
438 \func{void}{SetCharacterStyleName}{\param{const wxString\& }{name}}
439
440 Sets the character style name.
441
442 \membersection{wxTextAttrEx::SetLineSpacing}\label{wxtextattrexsetlinespacing}
443
444 \func{void}{SetLineSpacing}{\param{int }{spacing}}
445
446 Sets the line spacing. {\it spacing} is a multiple, where 10 means single-spacing,
447 15 means 1.5 spacing, and 20 means double spacing. The following constants are
448 defined for convenience:
449
450 {\small
451 \begin{verbatim}
452 #define wxTEXT_ATTR_LINE_SPACING_NORMAL 10
453 #define wxTEXT_ATTR_LINE_SPACING_HALF 15
454 #define wxTEXT_ATTR_LINE_SPACING_TWICE 20
455 \end{verbatim}
456 }
457
458 \membersection{wxTextAttrEx::SetListStyleName}\label{wxtextattrexsetliststylename}
459
460 \func{void}{SetListStyleName}{\param{const wxString\& }{name}}
461
462 Sets the list style name.
463
464 \membersection{wxTextAttrEx::SetOutlineLevel}\label{wxtextattrexsetoutlinelevel}
465
466 \func{void}{SetOutlineLevel}{\param{int}{ level}}
467
468 Specifies the outline level. Zero represents normal text. At present, the outline level is
469 not used, but may be used in future for determining list levels and for applications
470 that need to store document structure information.
471
472 \membersection{wxTextAttrEx::SetPageBreak}\label{wxtextattrexsetpagebreak}
473
474 \func{void}{SetPageBreak}{\param{bool}{ pageBreak = true}}
475
476 Specifies a page break before this paragraph.
477
478 \membersection{wxTextAttrEx::SetParagraphSpacingAfter}\label{wxtextattrexsetparagraphspacingafter}
479
480 \func{void}{SetParagraphSpacingAfter}{\param{int }{spacing}}
481
482 Sets the spacing after a paragraph, in tenths of a millimetre.
483
484 \membersection{wxTextAttrEx::SetParagraphSpacingBefore}\label{wxtextattrexsetparagraphspacingbefore}
485
486 \func{void}{SetParagraphSpacingBefore}{\param{int }{spacing}}
487
488 Sets the spacing before a paragraph, in tenths of a millimetre.
489
490 \membersection{wxTextAttrEx::SetParagraphStyleName}\label{wxtextattrexsetparagraphstylename}
491
492 \func{void}{SetParagraphStyleName}{\param{const wxString\& }{name}}
493
494 Sets the name of the paragraph style.
495
496 \membersection{wxTextAttrEx::SetTextEffectFlags}\label{wxtextattrexsettexteffectflags}
497
498 \func{void}{SetTextEffectFlags}{\param{int }{flags}}
499
500 Sets the text effect bits of interest. You should also pass wxTEXT\_ATTR\_EFFECTS to \helpref{wxTextAttr::SetFlags}{wxtextattrsetflags}.
501
502 \membersection{wxTextAttrEx::SetTextEffects}\label{wxtextattrexsettexteffects}
503
504 \func{void}{SetTextEffects}{\param{int }{effects}}
505
506 Sets the text effects, a bit list of styles.
507
508 The following styles can be passed:
509
510 {\small
511 \begin{verbatim}
512 #define wxTEXT_ATTR_EFFECT_NONE 0x00000000
513 #define wxTEXT_ATTR_EFFECT_CAPITALS 0x00000001
514 #define wxTEXT_ATTR_EFFECT_SMALL_CAPITALS 0x00000002
515 #define wxTEXT_ATTR_EFFECT_STRIKETHROUGH 0x00000004
516 #define wxTEXT_ATTR_EFFECT_DOUBLE_STRIKETHROUGH 0x00000008
517 #define wxTEXT_ATTR_EFFECT_SHADOW 0x00000010
518 #define wxTEXT_ATTR_EFFECT_EMBOSS 0x00000020
519 #define wxTEXT_ATTR_EFFECT_OUTLINE 0x00000040
520 #define wxTEXT_ATTR_EFFECT_ENGRAVE 0x00000080
521 #define wxTEXT_ATTR_EFFECT_SUPERSCRIPT 0x00000100
522 #define wxTEXT_ATTR_EFFECT_SUBSCRIPT 0x00000200
523 \end{verbatim}
524 }
525
526 Of these, only wxTEXT\_ATTR\_EFFECT\_CAPITALS and wxTEXT\_ATTR\_EFFECT\_STRIKETHROUGH are implemented.
527 wxTEXT\_ATTR\_EFFECT\_CAPITALS capitalises text when displayed (leaving the case of the actual buffer
528 text unchanged), and wxTEXT\_ATTR\_EFFECT\_STRIKETHROUGH draws a line through text.
529
530 To set effects, you should also pass wxTEXT\_ATTR\_EFFECTS to \helpref{wxTextAttr::SetFlags}{wxtextattrsetflags}, and call\rtfsp
531 \helpref{wxTextAttrEx::SetTextEffectFlags}{wxtextattrexsettexteffectflags} with the styles (taken from the
532 above set) that you are interested in setting.
533
534 \membersection{wxTextAttrEx::SetURL}\label{wxtextattrexseturl}
535
536 \func{void}{SetURL}{\param{const wxString\& }{url}}
537
538 Sets the URL for the content. Sets the wxTEXT\_ATTR\_URL style; content with this style
539 causes wxRichTextCtrl to show a hand cursor over it, and wxRichTextCtrl generates
540 a wxTextUrlEvent when the content is clicked.
541
542 \membersection{wxTextAttrEx::operator=}\label{wxtextattrexoperatorassign}
543
544 \func{void operator}{operator=}{\param{const wxTextAttr\& }{attr}}
545
546 Assignment from a wxTextAttr object.
547
548 \func{void operator}{operator=}{\param{const wxTextAttrEx\& }{attr}}
549
550 Assignment from a wxTextAttrEx object.
551