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 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551
|
\section{\class{wxTextAttrEx}}\label{wxtextattrex}
wxTextAttrEx is an extended version of wxTextAttr with more paragraph attributes.
Currently it is only used with \helpref{wxRichTextCtrl}{wxrichtextctrl}.
It is intended that eventually, the members of wxTextAttrEx will
be folded into wxTextAttr, and wxTextAttr will be the official
cross-platform API for text controls that support attributes.
However, for now, wxTextAttrEx is provided as a means of enabling
extra functionality in wxRichTextCtrl, while retaining some compatibility
with the wxTextAttr API.
The most efficient method of accessing wxRichTextCtrl functionality
is a third attribute class, \helpref{wxRichTextAttr}{wxrichtextattr}, which
optimizes its storage to allow it to be used for implementing objects
in a buffer, as well as access to that buffer.
This section only documents the additional members; see \helpref{wxTextAttr}{wxtextattr} for
the remaining functions.
\wxheading{Derived from}
\helpref{wxTextAttr}{wxtextattr}
\wxheading{Include files}
<wx/richtext/richtextbuffer.h>
\wxheading{Constants}
The following values can be passed to SetAlignment to determine
paragraph alignment.
{\small
\begin{verbatim}
enum wxTextAttrAlignment
{
wxTEXT_ALIGNMENT_DEFAULT,
wxTEXT_ALIGNMENT_LEFT,
wxTEXT_ALIGNMENT_CENTRE,
wxTEXT_ALIGNMENT_CENTER = wxTEXT_ALIGNMENT_CENTRE,
wxTEXT_ALIGNMENT_RIGHT,
wxTEXT_ALIGNMENT_JUSTIFIED
};
\end{verbatim}
}
These values are passed in a bitlist to SetFlags to determine
what attributes will be considered when setting the attributes
for a text control.
{\small
\begin{verbatim}
// Standard wxTextAttr constants
#define wxTEXT_ATTR_TEXT_COLOUR 0x0001
#define wxTEXT_ATTR_BACKGROUND_COLOUR 0x0002
#define wxTEXT_ATTR_FONT_FACE 0x0004
#define wxTEXT_ATTR_FONT_SIZE 0x0008
#define wxTEXT_ATTR_FONT_WEIGHT 0x0010
#define wxTEXT_ATTR_FONT_ITALIC 0x0020
#define wxTEXT_ATTR_FONT_UNDERLINE 0x0040
#define wxTEXT_ATTR_FONT \
wxTEXT_ATTR_FONT_FACE | wxTEXT_ATTR_FONT_SIZE | wxTEXT_ATTR_FONT_WEIGHT \
| wxTEXT_ATTR_FONT_ITALIC | wxTEXT_ATTR_FONT_UNDERLINE
#define wxTEXT_ATTR_ALIGNMENT 0x0080
#define wxTEXT_ATTR_LEFT_INDENT 0x0100
#define wxTEXT_ATTR_RIGHT_INDENT 0x0200
#define wxTEXT_ATTR_TABS 0x0400
// Extra formatting flags not in wxTextAttr
#define wxTEXT_ATTR_PARA_SPACING_AFTER 0x00000800
#define wxTEXT_ATTR_PARA_SPACING_BEFORE 0x00001000
#define wxTEXT_ATTR_LINE_SPACING 0x00002000
#define wxTEXT_ATTR_CHARACTER_STYLE_NAME 0x00004000
#define wxTEXT_ATTR_PARAGRAPH_STYLE_NAME 0x00008000
#define wxTEXT_ATTR_LIST_STYLE_NAME 0x00010000
#define wxTEXT_ATTR_BULLET_STYLE 0x00020000
#define wxTEXT_ATTR_BULLET_NUMBER 0x00040000
#define wxTEXT_ATTR_BULLET_TEXT 0x00080000
#define wxTEXT_ATTR_BULLET_NAME 0x00100000
#define wxTEXT_ATTR_URL 0x00200000
#define wxTEXT_ATTR_PAGE_BREAK 0x00400000
#define wxTEXT_ATTR_EFFECTS 0x00800000
#define wxTEXT_ATTR_OUTLINE_LEVEL 0x01000000
\end{verbatim}
}
The following styles can be passed to wxTextAttrEx::SetBulletStyle:
{\small
\begin{verbatim}
#define wxTEXT_ATTR_BULLET_STYLE_NONE 0x00000000
#define wxTEXT_ATTR_BULLET_STYLE_ARABIC 0x00000001
#define wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER 0x00000002
#define wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER 0x00000004
#define wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER 0x00000008
#define wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER 0x00000010
#define wxTEXT_ATTR_BULLET_STYLE_SYMBOL 0x00000020
#define wxTEXT_ATTR_BULLET_STYLE_BITMAP 0x00000040
#define wxTEXT_ATTR_BULLET_STYLE_PARENTHESES 0x00000080
#define wxTEXT_ATTR_BULLET_STYLE_PERIOD 0x00000100
#define wxTEXT_ATTR_BULLET_STYLE_STANDARD 0x00000200
#define wxTEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS 0x00000400
#define wxTEXT_ATTR_BULLET_STYLE_OUTLINE 0x00000800
#define wxTEXT_ATTR_BULLET_STYLE_ALIGN_LEFT 0x00000000
#define wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT 0x00001000
#define wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE 0x00002000
\end{verbatim}
}
Of these, wxTEXT\_ATTR\_BULLET\_STYLE\_BITMAP is unimplemented.
The following constants can be passed to wxTextAttrEx::SetLineSpacing:
{\small
\begin{verbatim}
#define wxTEXT_ATTR_LINE_SPACING_NORMAL 10
#define wxTEXT_ATTR_LINE_SPACING_HALF 15
#define wxTEXT_ATTR_LINE_SPACING_TWICE 20
\end{verbatim}
}
The following styles can be passed to wxTextAttrEx::SetTextEffects:
{\small
\begin{verbatim}
#define wxTEXT_ATTR_EFFECT_NONE 0x00000000
#define wxTEXT_ATTR_EFFECT_CAPITALS 0x00000001
#define wxTEXT_ATTR_EFFECT_SMALL_CAPITALS 0x00000002
#define wxTEXT_ATTR_EFFECT_STRIKETHROUGH 0x00000004
#define wxTEXT_ATTR_EFFECT_DOUBLE_STRIKETHROUGH 0x00000008
#define wxTEXT_ATTR_EFFECT_SHADOW 0x00000010
#define wxTEXT_ATTR_EFFECT_EMBOSS 0x00000020
#define wxTEXT_ATTR_EFFECT_OUTLINE 0x00000040
#define wxTEXT_ATTR_EFFECT_ENGRAVE 0x00000080
#define wxTEXT_ATTR_EFFECT_SUPERSCRIPT 0x00000100
#define wxTEXT_ATTR_EFFECT_SUBSCRIPT 0x00000200
\end{verbatim}
}
Of these, only wxTEXT\_ATTR\_EFFECT\_CAPITALS and wxTEXT\_ATTR\_EFFECT\_STRIKETHROUGH are implemented.
\wxheading{See also}
\helpref{wxTextAttr}{wxtextattr}, \helpref{wxRichTextAttr}{wxrichtextattr}, \helpref{wxRichTextCtrl}{wxrichtextctrl}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxTextAttrEx::wxTextAttrEx}\label{wxtextattrexwxtextattrex}
\func{}{wxTextAttrEx}{\void}
\func{}{wxTextAttrEx}{\param{const wxTextAttrEx\& }{attr}}
Constructors.
\membersection{wxTextAttrEx::GetBulletFont}\label{wxtextattrexgetbulletfont}
\constfunc{const wxString\&}{GetBulletFont}{\void}
Returns a string containing the name of the font associated with the bullet symbol.
Only valid for attributes with wxTEXT\_ATTR\_BULLET\_SYMBOL.
\membersection{wxTextAttrEx::GetBulletName}\label{wxtextattrexgetbulletname}
\constfunc{const wxString\&}{GetBulletName}{\void}
Returns the standard bullet name, applicable if the bullet style is wxTEXT\_ATTR\_BULLET\_STYLE\_STANDARD.
Currently the following standard bullet names are supported:
\begin{itemize}\itemsep=0pt
\item {\tt standard/circle}
\item {\tt standard/square}
\item {\tt standard/diamond}
\item {\tt standard/triangle}
\end{itemize}
If you wish your application to support further bullet graphics, you can derive a
class from wxRichTextRenderer or wxRichTextStdRenderer, override {\tt DrawStandardBullet} and {\tt EnumerateStandardBulletNames}, and
set an instance of the class using \helpref{wxRichTextBuffer::SetRenderer}{wxrichtextbuffersetrenderer}.
\membersection{wxTextAttrEx::GetBulletNumber}\label{wxtextattrexgetbulletnumber}
\constfunc{int}{GetBulletNumber}{\void}
Returns the bullet number.
\membersection{wxTextAttrEx::GetBulletStyle}\label{wxtextattrexgetbulletstyle}
\constfunc{int}{GetBulletStyle}{\void}
Returns the bullet style.
See \helpref{wxTextAttrEx::SetBulletStyle}{wxtextattrexsetbulletstyle} for a list of available styles.
\membersection{wxTextAttrEx::GetBulletText}\label{wxtextattrexgetbullettext}
\constfunc{const wxString\&}{GetBulletText}{\void}
Returns the bullet text, which could be a symbol, or (for example) cached outline text.
\membersection{wxTextAttrEx::GetCharacterStyleName}\label{wxtextattrexgetcharacterstylename}
\constfunc{const wxString\&}{GetCharacterStyleName}{\void}
Returns the name of the character style.
\membersection{wxTextAttrEx::GetLineSpacing}\label{wxtextattrexgetlinespacing}
\constfunc{int}{GetLineSpacing}{\void}
Returns the line spacing value, one of wxTEXT\_ATTR\_LINE\_SPACING\_NORMAL,
wxTEXT\_ATTR\_LINE\_SPACING\_HALF, and wxTEXT\_ATTR\_LINE\_SPACING\_TWICE.
\membersection{wxTextAttrEx::GetListStyleName}\label{wxtextattrexgetliststylename}
\constfunc{const wxString\&}{GetListStyleName}{\void}
Returns the name of the list style.
\membersection{wxTextAttrEx::GetOutlineLevel}\label{wxtextattrexgetoutlinelevel}
\constfunc{int}{GetOutlineLevel}{\void}
Returns the outline level.
\membersection{wxTextAttrEx::GetParagraphSpacingAfter}\label{wxtextattrexgetparagraphspacingafter}
\constfunc{int}{GetParagraphSpacingAfter}{\void}
Returns the space in tenths of a millimeter after the paragraph.
\membersection{wxTextAttrEx::GetParagraphSpacingBefore}\label{wxtextattrexgetparagraphspacingbefore}
\constfunc{int}{GetParagraphSpacingBefore}{\void}
Returns the space in tenths of a millimeter before the paragraph.
\membersection{wxTextAttrEx::GetParagraphStyleName}\label{wxtextattrexgetparagraphstylename}
\constfunc{const wxString\&}{GetParagraphStyleName}{\void}
Returns the name of the paragraph style.
\membersection{wxTextAttrEx::GetTextEffectFlags}\label{wxtextattrexgettexteffectflags}
\constfunc{int}{GetTextEffectFlags}{\void}
Returns the text effect bits of interest. See \helpref{wxTextAttr::SetFlags}{wxtextattrsetflags} for further information.
\membersection{wxTextAttrEx::GetTextEffects}\label{wxtextattrexgettexteffects}
\constfunc{int}{GetTextEffects}{\void}
Returns the text effects, a bit list of styles. See \helpref{wxTextAttrEx::SetTextEffects}{wxtextattrexsettexteffects} for
details.
\membersection{wxTextAttrEx::GetURL}\label{wxtextattrexgeturl}
\constfunc{const wxString\&}{GetURL}{\void}
Returns the URL for the content. Content with wxTEXT\_ATTR\_URL style
causes wxRichTextCtrl to show a hand cursor over it, and wxRichTextCtrl generates
a wxTextUrlEvent when the content is clicked.
\membersection{wxTextAttrEx::HasBulletName}\label{wxtextattrexhasbulletname}
\constfunc{bool}{HasBulletName}{\void}
Returns \true if the attribute object specifies a standard bullet name.
\membersection{wxTextAttrEx::HasBulletNumber}\label{wxtextattrexhasbulletnumber}
\constfunc{bool}{HasBulletNumber}{\void}
Returns \true if the attribute object specifies a bullet number.
\membersection{wxTextAttrEx::HasBulletStyle}\label{wxtextattrexhasbulletstyle}
\constfunc{bool}{HasBulletStyle}{\void}
Returns \true if the attribute object specifies a bullet style.
\membersection{wxTextAttrEx::HasBulletText}\label{wxtextattrexhasbullettext}
\constfunc{bool}{HasBulletText}{\void}
Returns \true if the attribute object specifies bullet text (usually containing a symbol).
\membersection{wxTextAttrEx::HasCharacterStyleName}\label{wxtextattrexhascharacterstylename}
\constfunc{bool}{HasCharacterStyleName}{\void}
Returns \true if the attribute object specifies a character style name.
\membersection{wxTextAttrEx::HasLineSpacing}\label{wxtextattrexhaslinespacing}
\constfunc{bool}{HasLineSpacing}{\void}
Returns \true if the attribute object specifies line spacing.
\membersection{wxTextAttrEx::HasListStyleName}\label{wxtextattrexhasliststylename}
\constfunc{bool}{HasListStyleName}{\void}
Returns \true if the attribute object specifies a list style name.
\membersection{wxTextAttrEx::HasOutlineLevel}\label{wxtextattrexhasoutlinelevel}
\constfunc{bool}{HasOutlineLevel}{\void}
Returns \true if the attribute object specifies an outline level.
\membersection{wxTextAttrEx::HasPageBreak}\label{wxtextattrexhaspagebreak}
\constfunc{bool}{HasPageBreak}{\void}
Returns \true if the attribute object specifies a page break before this paragraph.
\membersection{wxTextAttrEx::HasParagraphSpacingAfter}\label{wxtextattrexhasparagraphspacingafter}
\constfunc{bool}{HasParagraphSpacingAfter}{\void}
Returns \true if the attribute object specifies spacing after a paragraph.
\membersection{wxTextAttrEx::HasParagraphSpacingBefore}\label{wxtextattrexhasparagraphspacingbefore}
\constfunc{bool}{HasParagraphSpacingBefore}{\void}
Returns \true if the attribute object specifies spacing before a paragraph.
\membersection{wxTextAttrEx::HasParagraphStyleName}\label{wxtextattrexhasparagraphstylename}
\constfunc{bool}{HasParagraphStyleName}{\void}
Returns \true if the attribute object specifies a paragraph style name.
\membersection{wxTextAttrEx::HasTextEffects}\label{wxtextattrexhastexteffects}
\constfunc{bool}{HasTextEffects}{\void}
Returns \true if the attribute object specifies text effects.
\membersection{wxTextAttrEx::HasURL}\label{wxtextattrexhasurl}
\constfunc{bool}{HasURL}{\void}
Returns \true if the attribute object specifies a URL.
\membersection{wxTextAttrEx::Init}\label{wxtextattrexinit}
\func{void}{Init}{\void}
Initialises this object.
\membersection{wxTextAttrEx::IsCharacterStyle}\label{wxtextattrexischaracterstyle}
\constfunc{bool}{IsCharacterStyle}{\void}
Returns \true if the object represents a character style, that is,
the flags specify a font or a text background or foreground colour.
\membersection{wxTextAttrEx::IsDefault}\label{wxtextattrexisdefault}
\constfunc{bool}{IsDefault}{\void}
Returns \false if we have any attributes set, \true otherwise.
\membersection{wxTextAttrEx::IsParagraphStyle}\label{wxtextattrexisparagraphstyle}
\constfunc{bool}{IsParagraphStyle}{\void}
Returns \true if the object represents a paragraph style, that is,
the flags specify alignment, indentation, tabs, paragraph spacing, or
bullet style.
\membersection{wxTextAttrEx::SetBulletFont}\label{wxtextattrexsetbulletfont}
\func{void}{SetBulletFont}{\param{const wxString\& }{font}}
Sets the name of the font associated with the bullet symbol.
Only valid for attributes with wxTEXT\_ATTR\_BULLET\_SYMBOL.
\membersection{wxTextAttrEx::SetBulletNumber}\label{wxtextattrexsetbulletnumber}
\func{void}{SetBulletNumber}{\param{int }{n}}
Sets the bullet number.
\membersection{wxTextAttrEx::SetBulletName}\label{wxtextattrexsetbulletname}
\func{void}{SetBulletName}{\param{const wxString\& }{name}}
Sets the standard bullet name, applicable if the bullet style is wxTEXT\_ATTR\_BULLET\_STYLE\_STANDARD.
See \helpref{wxTextAttrEx::GetBulletName}{wxtextattrexgetbulletname} for a list
of supported names, and how to expand the range of supported types.
\membersection{wxTextAttrEx::SetBulletStyle}\label{wxtextattrexsetbulletstyle}
\func{void}{SetBulletStyle}{\param{int }{style}}
Sets the bullet style. The following styles can be passed:
{\small
\begin{verbatim}
#define wxTEXT_ATTR_BULLET_STYLE_NONE 0x00000000
#define wxTEXT_ATTR_BULLET_STYLE_ARABIC 0x00000001
#define wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER 0x00000002
#define wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER 0x00000004
#define wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER 0x00000008
#define wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER 0x00000010
#define wxTEXT_ATTR_BULLET_STYLE_SYMBOL 0x00000020
#define wxTEXT_ATTR_BULLET_STYLE_BITMAP 0x00000040
#define wxTEXT_ATTR_BULLET_STYLE_PARENTHESES 0x00000080
#define wxTEXT_ATTR_BULLET_STYLE_PERIOD 0x00000100
#define wxTEXT_ATTR_BULLET_STYLE_STANDARD 0x00000200
#define wxTEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS 0x00000400
#define wxTEXT_ATTR_BULLET_STYLE_OUTLINE 0x00000800
#define wxTEXT_ATTR_BULLET_STYLE_ALIGN_LEFT 0x00000000
#define wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT 0x00001000
#define wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE 0x00002000
\end{verbatim}
}
Currently wxTEXT\_ATTR\_BULLET\_STYLE\_BITMAP is not supported.
\membersection{wxTextAttrEx::SetBulletText}\label{wxtextattrexsetbullettext}
\func{void}{SetBulletText}{\param{const wxString\& }{text}}
Sets the bullet text, which could be a symbol, or (for example) cached outline text.
\membersection{wxTextAttrEx::SetCharacterStyleName}\label{wxtextattrexsetcharacterstylename}
\func{void}{SetCharacterStyleName}{\param{const wxString\& }{name}}
Sets the character style name.
\membersection{wxTextAttrEx::SetLineSpacing}\label{wxtextattrexsetlinespacing}
\func{void}{SetLineSpacing}{\param{int }{spacing}}
Sets the line spacing. {\it spacing} is a multiple, where 10 means single-spacing,
15 means 1.5 spacing, and 20 means double spacing. The following constants are
defined for convenience:
{\small
\begin{verbatim}
#define wxTEXT_ATTR_LINE_SPACING_NORMAL 10
#define wxTEXT_ATTR_LINE_SPACING_HALF 15
#define wxTEXT_ATTR_LINE_SPACING_TWICE 20
\end{verbatim}
}
\membersection{wxTextAttrEx::SetListStyleName}\label{wxtextattrexsetliststylename}
\func{void}{SetListStyleName}{\param{const wxString\& }{name}}
Sets the list style name.
\membersection{wxTextAttrEx::SetOutlineLevel}\label{wxtextattrexsetoutlinelevel}
\func{void}{SetOutlineLevel}{\param{int}{ level}}
Specifies the outline level. Zero represents normal text. At present, the outline level is
not used, but may be used in future for determining list levels and for applications
that need to store document structure information.
\membersection{wxTextAttrEx::SetPageBreak}\label{wxtextattrexsetpagebreak}
\func{void}{SetPageBreak}{\param{bool}{ pageBreak = true}}
Specifies a page break before this paragraph.
\membersection{wxTextAttrEx::SetParagraphSpacingAfter}\label{wxtextattrexsetparagraphspacingafter}
\func{void}{SetParagraphSpacingAfter}{\param{int }{spacing}}
Sets the spacing after a paragraph, in tenths of a millimetre.
\membersection{wxTextAttrEx::SetParagraphSpacingBefore}\label{wxtextattrexsetparagraphspacingbefore}
\func{void}{SetParagraphSpacingBefore}{\param{int }{spacing}}
Sets the spacing before a paragraph, in tenths of a millimetre.
\membersection{wxTextAttrEx::SetParagraphStyleName}\label{wxtextattrexsetparagraphstylename}
\func{void}{SetParagraphStyleName}{\param{const wxString\& }{name}}
Sets the name of the paragraph style.
\membersection{wxTextAttrEx::SetTextEffectFlags}\label{wxtextattrexsettexteffectflags}
\func{void}{SetTextEffectFlags}{\param{int }{flags}}
Sets the text effect bits of interest. You should also pass wxTEXT\_ATTR\_EFFECTS to \helpref{wxTextAttr::SetFlags}{wxtextattrsetflags}.
\membersection{wxTextAttrEx::SetTextEffects}\label{wxtextattrexsettexteffects}
\func{void}{SetTextEffects}{\param{int }{effects}}
Sets the text effects, a bit list of styles.
The following styles can be passed:
{\small
\begin{verbatim}
#define wxTEXT_ATTR_EFFECT_NONE 0x00000000
#define wxTEXT_ATTR_EFFECT_CAPITALS 0x00000001
#define wxTEXT_ATTR_EFFECT_SMALL_CAPITALS 0x00000002
#define wxTEXT_ATTR_EFFECT_STRIKETHROUGH 0x00000004
#define wxTEXT_ATTR_EFFECT_DOUBLE_STRIKETHROUGH 0x00000008
#define wxTEXT_ATTR_EFFECT_SHADOW 0x00000010
#define wxTEXT_ATTR_EFFECT_EMBOSS 0x00000020
#define wxTEXT_ATTR_EFFECT_OUTLINE 0x00000040
#define wxTEXT_ATTR_EFFECT_ENGRAVE 0x00000080
#define wxTEXT_ATTR_EFFECT_SUPERSCRIPT 0x00000100
#define wxTEXT_ATTR_EFFECT_SUBSCRIPT 0x00000200
\end{verbatim}
}
Of these, only wxTEXT\_ATTR\_EFFECT\_CAPITALS and wxTEXT\_ATTR\_EFFECT\_STRIKETHROUGH are implemented.
wxTEXT\_ATTR\_EFFECT\_CAPITALS capitalises text when displayed (leaving the case of the actual buffer
text unchanged), and wxTEXT\_ATTR\_EFFECT\_STRIKETHROUGH draws a line through text.
To set effects, you should also pass wxTEXT\_ATTR\_EFFECTS to \helpref{wxTextAttr::SetFlags}{wxtextattrsetflags}, and call\rtfsp
\helpref{wxTextAttrEx::SetTextEffectFlags}{wxtextattrexsettexteffectflags} with the styles (taken from the
above set) that you are interested in setting.
\membersection{wxTextAttrEx::SetURL}\label{wxtextattrexseturl}
\func{void}{SetURL}{\param{const wxString\& }{url}}
Sets the URL for the content. Sets the wxTEXT\_ATTR\_URL style; content with this style
causes wxRichTextCtrl to show a hand cursor over it, and wxRichTextCtrl generates
a wxTextUrlEvent when the content is clicked.
\membersection{wxTextAttrEx::operator=}\label{wxtextattrexoperatorassign}
\func{void operator}{operator=}{\param{const wxTextAttr\& }{attr}}
Assignment from a wxTextAttr object.
\func{void operator}{operator=}{\param{const wxTextAttrEx\& }{attr}}
Assignment from a wxTextAttrEx object.
|