Merged wxRichTextAttr and wxTextAttrEx into wxTextAttr, and added a font table

to wxRichTextBuffer to reduce wxFont consumption and increase performance.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2007-10-09 11:20:36 +00:00
parent e97e6073b3
commit 44cc96a80c
46 changed files with 2101 additions and 4010 deletions

View File

@@ -620,7 +620,6 @@ and paragraph formatting.
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxRichTextCtrl}{wxrichtextctrl}}{A rich text control.}
\twocolitem{\helpref{wxRichTextBuffer}{wxrichtextbuffer}}{The content of a rich text control.}
\twocolitem{\helpref{wxRichTextAttr}{wxrichtextattr}}{Attributes specifying rich text styling.}
\twocolitem{\helpref{wxRichTextCharacterStyleDefinition}{wxrichtextcharacterstyledefinition}}{Definition of character styling.}
\twocolitem{\helpref{wxRichTextParagraphStyleDefinition}{wxrichtextparagraphstyledefinition}}{Definition of paragraph styling.}
\twocolitem{\helpref{wxRichTextListStyleDefinition}{wxrichtextliststyledefinition}}{Definition of list styling.}

View File

@@ -328,7 +328,6 @@
\input renderer.tex
\input rendver.tex
\input richtextattr.tex
\input richtextbuffer.tex
\input richtextcharacterstyledefinition.tex
\input richtextctrl.tex
@@ -415,7 +414,6 @@
\input tempfile.tex
\input tempfilestrm.tex
\input textattr.tex
\input textattrex.tex
\input text.tex
\input txtdatob.tex
\input txtdrptg.tex

View File

@@ -1,880 +0,0 @@
\section{\class{wxRichTextAttr}}\label{wxrichtextattr}
wxRichTextAttr represents the character and paragraph attributes, or style,
for a range of text in a \helpref{wxRichTextCtrl}{wxrichtextctrl}. This class
is specific to wxRichTextCtrl, although you can also use the
standard \helpref{wxTextAttr}{wxtextattr} class with wxRichTextCtrl.
When setting up a wxRichTextAttr object, pass a bitlist mask to \helpref{SetFlags}{wxrichtextattrsetflags} to
indicate which style elements should be changed. As a convenience, when you call a setter such
as SetFont, the relevant bit will be set.
wxRichTextAttr stores attributes without a wxFont object, so is a more
efficient way to query styles than using a \helpref{wxTextAttr}{wxtextattr} or \helpref{wxTextAttrEx}{wxtextattrex} object.
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/richtext/richtextbuffer.h>
\wxheading{Library}
\helpref{wxRichtext}{librarieslist}
\wxheading{Constants}
The following values can be passed to wxRichTextAttr::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}
}
Of these, wxTEXT\_ALIGNMENT\_JUSTIFIED is unimplemented. In future justification may be supported
when printing or previewing, only.
The following values are passed in a bitlist to wxRichTextAttr::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 0x00000001
#define wxTEXT_ATTR_BACKGROUND_COLOUR 0x00000002
#define wxTEXT_ATTR_FONT_FACE 0x00000004
#define wxTEXT_ATTR_FONT_SIZE 0x00000008
#define wxTEXT_ATTR_FONT_WEIGHT 0x00000010
#define wxTEXT_ATTR_FONT_ITALIC 0x00000020
#define wxTEXT_ATTR_FONT_UNDERLINE 0x00000040
#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 0x00000080
#define wxTEXT_ATTR_LEFT_INDENT 0x00000100
#define wxTEXT_ATTR_RIGHT_INDENT 0x00000200
#define wxTEXT_ATTR_TABS 0x00000400
// 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 wxRichTextAttr::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 wxRichTextAttr::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{wxTextAttrEx}{wxtextattrex}, \helpref{wxRichTextCtrl}{wxrichtextctrl}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxRichTextAttr::wxRichTextAttr}\label{wxrichtextattrwxrichtextattr}
\func{}{wxRichTextAttr}{\void}
\func{}{wxRichTextAttr}{\param{const wxColour\& }{colText}, \param{const wxColour\& }{colBack = wxNullColour}, \param{wxTextAttrAlignment }{alignment = wxTEXT\_ALIGNMENT\_DEFAULT}}
\func{}{wxRichTextAttr}{\param{const wxTextAttrEx\& }{attr}}
Constructors.
\membersection{wxRichTextAttr::Apply}\label{wxrichtextattrapply}
\func{bool}{Combine}{\param{const wxRichTextAttrEx\& }{style}, \param{const wxRichTextAttrEx* }{compareWith = NULL}}
Applies the attributes in {\it style} to the original object, but not those attributes from {\it style} that are the same as those in {\it compareWith} (if passed).
See also \helpref{wxRichTextAttr::Combine}{wxrichtextattrcombine} for a function that does almost the same but returns a new object instead of modifying the original object.
\membersection{wxRichTextAttr::Combine}\label{wxrichtextattrcombine}
\constfunc{wxRichTextAttr}{Combine}{\param{const wxRichTextAttrEx\& }{style}, \param{const wxRichTextAttrEx* }{compareWith = NULL}}
Combines 'this' with {\it style}, but not applying attributes from {\it style} that are the same as those in {\it compareWith} (if passed).
A wxRichTextAttr object is returned and the original object is not changed.
See also \helpref{wxRichTextAttr::Apply}{wxrichtextattrapply} for a function that does almost the same but modifies the original object instead of returning a new one.
\membersection{wxRichTextAttr::CreateFont}\label{wxrichtextattrcreatefont}
\constfunc{wxFont}{CreateFont}{\void}
Creates a font from the font attributes.
\membersection{wxRichTextAttr::GetAlignment}\label{wxrichtextattrgetalignment}
\constfunc{wxTextAttrAlignment}{GetAlignment}{\void}
Returns the alignment flags.
See \helpref{wxRichTextAttr::SetAlignment}{wxrichtextattrsetalignment} for a list of available styles.
\membersection{wxRichTextAttr::GetBackgroundColour}\label{wxrichtextattrgetbackgroundcolour}
\constfunc{const wxColour\&}{GetBackgroundColour}{\void}
Returns the background colour.
\membersection{wxRichTextAttr::GetBulletFont}\label{wxrichtextattrgetbulletfont}
\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{wxRichTextAttr::GetBulletName}\label{wxrichtextattrgetbulletname}
\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{wxRichTextAttr::GetBulletNumber}\label{wxrichtextattrgetbulletnumber}
\constfunc{int}{GetBulletNumber}{\void}
Returns the bullet number.
\membersection{wxRichTextAttr::GetBulletStyle}\label{wxrichtextattrgetbulletstyle}
\constfunc{int}{GetBulletStyle}{\void}
Returns the bullet style.
See \helpref{wxRichTextAttr::SetBulletStyle}{wxrichtextattrsetbulletstyle} for a list of available styles.
\membersection{wxRichTextAttr::GetBulletText}\label{wxrichtextattrgetbullettext}
\constfunc{const wxString\&}{GetBulletText}{\void}
Returns the bullet text, which could be a symbol, or (for example) cached outline text.
\membersection{wxRichTextAttr::GetCharacterStyleName}\label{wxrichtextattrgetcharacterstylename}
\constfunc{const wxString\&}{GetCharacterStyleName}{\void}
Returns the name of the character style.
\membersection{wxRichTextAttr::GetFlags}\label{wxrichtextattrgetflags}
\constfunc{long}{GetFlags}{\void}
Returns flags indicating which attributes are applicable.
See \helpref{wxRichTextAttr::SetFlags}{wxrichtextattrsetflags} for a list of available flags.
\membersection{wxRichTextAttr::GetFontAttributes}\label{wxrichtextattrgetfontattributes}
\func{bool}{GetFontAttributes}{\param{const wxFont\& }{font}}
Sets the font attributes from the given font.
\membersection{wxRichTextAttr::GetFontFaceName}\label{wxrichtextattrgetfontfacename}
\constfunc{const wxString\&}{GetFontFaceName}{\void}
Returns the font face name.
\membersection{wxRichTextAttr::GetFontSize}\label{wxrichtextattrgetfontsize}
\constfunc{int}{GetFontSize}{\void}
Returns the font size in points.
\membersection{wxRichTextAttr::GetFontStyle}\label{wxrichtextattrgetfontstyle}
\constfunc{int}{GetFontStyle}{\void}
Returns the font style.
\membersection{wxRichTextAttr::GetFontUnderlined}\label{wxrichtextattrgetfontunderlined}
\constfunc{bool}{GetFontUnderlined}{\void}
Returns \true if the font is underlined.
\membersection{wxRichTextAttr::GetFontWeight}\label{wxrichtextattrgetfontweight}
\constfunc{int}{GetFontWeight}{\void}
Returns the font weight.
\membersection{wxRichTextAttr::GetLeftIndent}\label{wxrichtextattrgetleftindent}
\constfunc{long}{GetLeftIndent}{\void}
Returns the left indent in tenths of a millimetre.
\membersection{wxRichTextAttr::GetLeftSubIndent}\label{wxrichtextattrgetleftsubindent}
\constfunc{long}{GetLeftSubIndent}{\void}
Returns the left sub-indent in tenths of a millimetre.
\membersection{wxRichTextAttr::GetLineSpacing}\label{wxrichtextattrgetlinespacing}
\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{wxRichTextAttr::GetListStyleName}\label{wxrichtextattrgetliststylename}
\constfunc{const wxString\&}{GetListStyleName}{\void}
Returns the name of the list style.
\membersection{wxRichTextAttr::GetOutlineLevel}\label{wxrichtextattrgetoutlinelevel}
\constfunc{bool}{GetOutlineLevel}{\void}
Returns the outline level.
\membersection{wxRichTextAttr::GetParagraphSpacingAfter}\label{wxrichtextattrgetparagraphspacingafter}
\constfunc{int}{GetParagraphSpacingAfter}{\void}
Returns the space in tenths of a millimeter after the paragraph.
\membersection{wxRichTextAttr::GetParagraphSpacingBefore}\label{wxrichtextattrgetparagraphspacingbefore}
\constfunc{int}{GetParagraphSpacingBefore}{\void}
Returns the space in tenths of a millimeter before the paragraph.
\membersection{wxRichTextAttr::GetParagraphStyleName}\label{wxrichtextattrgetparagraphstylename}
\constfunc{const wxString\&}{GetParagraphStyleName}{\void}
Returns the name of the paragraph style.
\membersection{wxRichTextAttr::GetRightIndent}\label{wxrichtextattrgetrightindent}
\constfunc{long}{GetRightIndent}{\void}
Returns the right indent in tenths of a millimeter.
\membersection{wxRichTextAttr::GetTabs}\label{wxrichtextattrgettabs}
\constfunc{const wxArrayInt\&}{GetTabs}{\void}
Returns an array of tab stops, each expressed in tenths of a millimeter. Each stop
is measured from the left margin and therefore each value must be larger than the last.
\membersection{wxRichTextAttr::GetTextColour}\label{wxrichtextattrgettextcolour}
\constfunc{const wxColour\&}{GetTextColour}{\void}
Returns the text foreground colour.
\membersection{wxRichTextAttr::GetTextEffectFlags}\label{wxrichtextattrgettexteffectflags}
\constfunc{int}{GetTextEffectFlags}{\void}
Returns the text effect bits of interest. See \helpref{wxRichTextAttr::SetFlags}{wxrichtextattrsetflags} for further information.
\membersection{wxRichTextAttr::GetTextEffects}\label{wxrichtextattrgettexteffects}
\constfunc{int}{GetTextEffects}{\void}
Returns the text effects, a bit list of styles. See \helpref{wxRichTextAttr::SetTextEffects}{wxrichtextattrsettexteffects} for
details.
\membersection{wxRichTextAttr::GetURL}\label{wxrichtextattrgeturl}
\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{wxRichTextAttr::HasAlignment}\label{wxrichtextattrhasalignment}
\constfunc{bool}{HasAlignment}{\void}
Returns \true if the attribute object specifies alignment.
\membersection{wxRichTextAttr::HasBackgroundColour}\label{wxrichtextattrhasbackgroundcolour}
\constfunc{bool}{HasBackgroundColour}{\void}
Returns \true if the attribute object specifies a background colour.
\membersection{wxRichTextAttr::HasBulletName}\label{wxrichtextattrhasbulletname}
\constfunc{bool}{HasBulletName}{\void}
Returns \true if the attribute object specifies a standard bullet name.
\membersection{wxRichTextAttr::HasBulletNumber}\label{wxrichtextattrhasbulletnumber}
\constfunc{bool}{HasBulletNumber}{\void}
Returns \true if the attribute object specifies a bullet number.
\membersection{wxRichTextAttr::HasBulletStyle}\label{wxrichtextattrhasbulletstyle}
\constfunc{bool}{HasBulletStyle}{\void}
Returns \true if the attribute object specifies a bullet style.
\membersection{wxRichTextAttr::HasBulletText}\label{wxrichtextattrhasbullettext}
\constfunc{bool}{HasBulletText}{\void}
Returns \true if the attribute object specifies bullet text (usually specifying a symbol).
\membersection{wxRichTextAttr::HasCharacterStyleName}\label{wxrichtextattrhascharacterstylename}
\constfunc{bool}{HasCharacterStyleName}{\void}
Returns \true if the attribute object specifies a character style name.
\membersection{wxRichTextAttr::HasFontFaceName}\label{wxrichtextattrhasfontfacename}
\constfunc{bool}{HasFontFaceName}{\void}
Returns \true if the attribute object specifies a font face name.
\membersection{wxRichTextAttr::HasFlag}\label{wxrichtextattrhasflag}
\constfunc{bool}{HasFlag}{\param{long }{flag}}
Returns \true if the {\it flag} is present in the attribute object's flag bitlist.
\membersection{wxRichTextAttr::HasFont}\label{wxrichtextattrhasfont}
\constfunc{bool}{HasFont}{\void}
Returns \true if the attribute object specifies any font attributes.
\membersection{wxRichTextAttr::HasFontItalic}\label{wxrichtextattrhasfontitalic}
\constfunc{bool}{HasFontItalic}{\void}
Returns \true if the attribute object specifies italic style.
\membersection{wxRichTextAttr::HasLeftIndent}\label{wxrichtextattrhasleftindent}
\constfunc{bool}{HasLeftIndent}{\void}
Returns \true if the attribute object specifies a left indent.
\membersection{wxRichTextAttr::HasLineSpacing}\label{wxrichtextattrhaslinespacing}
\constfunc{bool}{HasLineSpacing}{\void}
Returns \true if the attribute object specifies line spacing.
\membersection{wxRichTextAttr::HasListStyleName}\label{wxrichtextattrhasliststylename}
\constfunc{bool}{HasListStyleName}{\void}
Returns \true if the attribute object specifies a list style name.
\membersection{wxRichTextAttr::HasOutlineLevel}\label{wxrichtextattrhasoutlinelevel}
\constfunc{bool}{HasOutlineLevel}{\void}
Returns \true if the attribute object specifies an outline level.
\membersection{wxRichTextAttr::HasPageBreak}\label{wxrichtextattrhaspagebreak}
\constfunc{bool}{HasPageBreak}{\void}
Returns \true if the attribute object specifies a page break before this paragraph.
\membersection{wxRichTextAttr::HasParagraphSpacingAfter}\label{wxrichtextattrhasparagraphspacingafter}
\constfunc{bool}{HasParagraphSpacingAfter}{\void}
Returns \true if the attribute object specifies spacing after a paragraph.
\membersection{wxRichTextAttr::HasParagraphSpacingBefore}\label{wxrichtextattrhasparagraphspacingbefore}
\constfunc{bool}{HasParagraphSpacingBefore}{\void}
Returns \true if the attribute object specifies spacing before a paragraph.
\membersection{wxRichTextAttr::HasParagraphStyleName}\label{wxrichtextattrhasparagraphstylename}
\constfunc{bool}{HasParagraphStyleName}{\void}
Returns \true if the attribute object specifies a paragraph style name.
\membersection{wxRichTextAttr::HasRightIndent}\label{wxrichtextattrhasrightindent}
\constfunc{bool}{HasRightIndent}{\void}
Returns \true if the attribute object specifies a right indent.
\membersection{wxRichTextAttr::HasFontSize}\label{wxrichtextattrhasfontsize}
\constfunc{bool}{HasFontSize}{\void}
Returns \true if the attribute object specifies a font point size.
\membersection{wxRichTextAttr::HasTabs}\label{wxrichtextattrhastabs}
\constfunc{bool}{HasTabs}{\void}
Returns \true if the attribute object specifies tab stops.
\membersection{wxRichTextAttr::HasTextColour}\label{wxrichtextattrhastextcolour}
\constfunc{bool}{HasTextColour}{\void}
Returns \true if the attribute object specifies a text foreground colour.
\membersection{wxRichTextAttr::HasTextEffects}\label{wxrichtextattrhastexteffects}
\constfunc{bool}{HasTextEffects}{\void}
Returns \true if the attribute object specifies text effects.
\membersection{wxRichTextAttr::HasFontUnderlined}\label{wxrichtextattrhasfontunderlined}
\constfunc{bool}{HasFontUnderlined}{\void}
Returns \true if the attribute object specifies either underlining or no underlining.
\membersection{wxRichTextAttr::HasURL}\label{wxrichtextattrhasurl}
\constfunc{bool}{HasURL}{\void}
Returns \true if the attribute object specifies a URL.
\membersection{wxRichTextAttr::HasFontWeight}\label{wxrichtextattrhasfontweight}
\constfunc{bool}{HasFontWeight}{\void}
Returns \true if the attribute object specifies font weight (bold, light or normal).
\membersection{wxRichTextAttr::IsCharacterStyle}\label{wxrichtextattrischaracterstyle}
\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{wxRichTextAttr::IsDefault}\label{wxrichtextattrisdefault}
\constfunc{bool}{IsDefault}{\void}
Returns \false if we have any attributes set, \true otherwise.
\membersection{wxRichTextAttr::IsParagraphStyle}\label{wxrichtextattrisparagraphstyle}
\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{wxRichTextAttr::SetAlignment}\label{wxrichtextattrsetalignment}
\func{void}{SetAlignment}{\param{wxTextAttrAlignment }{alignment}}
Sets the paragraph alignment. These are the possible values for {\it 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}
}
Of these, wxTEXT\_ALIGNMENT\_JUSTIFIED is unimplemented. In future justification may be supported
when printing or previewing, only.
\membersection{wxRichTextAttr::SetBackgroundColour}\label{wxrichtextattrsetbackgroundcolour}
\func{void}{SetBackgroundColour}{\param{const wxColour\& }{colBack}}
Sets the background colour.
\membersection{wxRichTextAttr::SetBulletFont}\label{wxrichtextattrsetbulletfont}
\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{wxRichTextAttr::SetBulletName}\label{wxrichtextattrsetbulletname}
\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{wxRichTextAttr::GetBulletName}{wxrichtextattrgetbulletname} for a list
of supported names, and how to expand the range of supported types.
\membersection{wxRichTextAttr::SetBulletNumber}\label{wxrichtextattrsetbulletnumber}
\func{void}{SetBulletNumber}{\param{int }{n}}
Sets the bullet number.
\membersection{wxRichTextAttr::SetBulletStyle}\label{wxrichtextattrsetbulletstyle}
\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{wxRichTextAttr::SetBulletText}\label{wxrichtextattrsetbullettext}
\func{void}{SetBulletText}{\param{const wxString& }{text}}
Sets the bullet text, which could be a symbol, or (for example) cached outline text.
\membersection{wxRichTextAttr::SetCharacterStyleName}\label{wxrichtextattrsetcharacterstylename}
\func{void}{SetCharacterStyleName}{\param{const wxString\& }{name}}
Sets the character style name.
\membersection{wxRichTextAttr::SetFlags}\label{wxrichtextattrsetflags}
\func{void}{SetFlags}{\param{long }{flags}}
Sets the flags determining which styles are being specified. The following
flags can be passed in a bitlist:
{\small
\begin{verbatim}
// Standard wxTextAttr constants
#define wxTEXT_ATTR_TEXT_COLOUR 0x00000001
#define wxTEXT_ATTR_BACKGROUND_COLOUR 0x00000002
#define wxTEXT_ATTR_FONT_FACE 0x00000004
#define wxTEXT_ATTR_FONT_SIZE 0x00000008
#define wxTEXT_ATTR_FONT_WEIGHT 0x00000010
#define wxTEXT_ATTR_FONT_ITALIC 0x00000020
#define wxTEXT_ATTR_FONT_UNDERLINE 0x00000040
#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 0x00000080
#define wxTEXT_ATTR_LEFT_INDENT 0x00000100
#define wxTEXT_ATTR_RIGHT_INDENT 0x00000200
#define wxTEXT_ATTR_TABS 0x00000400
// 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}
}
\membersection{wxRichTextAttr::SetFontFaceName}\label{wxrichtextattrsetfontfacename}
\func{void}{SetFontFaceName}{\param{const wxString\& }{faceName}}
Sets the paragraph alignment.
\membersection{wxRichTextAttr::SetFontSize}\label{wxrichtextattrsetfontsize}
\func{void}{SetFontSize}{\param{int }{pointSize}}
Sets the font size in points.
\membersection{wxRichTextAttr::SetFontStyle}\label{wxrichtextattrsetfontstyle}
\func{void}{SetFontStyle}{\param{int }{fontStyle}}
Sets the font style (normal, italic or slanted).
\membersection{wxRichTextAttr::SetFontUnderlined}\label{wxrichtextattrsetfontunderlined}
\func{void}{SetFontUnderlined}{\param{bool }{underlined}}
Sets the font underlining.
\membersection{wxRichTextAttr::SetFontWeight}\label{wxrichtextattrsetfontweight}
\func{void}{SetFontWeight}{\param{int }{fontWeight}}
Sets the font weight.
\membersection{wxRichTextAttr::SetLeftIndent}\label{wxrichtextattrsetleftindent}
\func{void}{SetLeftIndent}{\param{int }{indent}, \param{int }{subIndent = 0}}
Sets the left indent and left subindent in tenths of a millimetre.
The sub-indent is an offset from the left of the paragraph, and is used for all but the
first line in a paragraph. A positive value will cause the first line to appear to the left
of the subsequent lines, and a negative value will cause the first line to be indented
relative to the subsequent lines.
wxRichTextBuffer uses indentation to render a bulleted item. The left indent is the distance between
the margin and the bullet. The content of the paragraph, including the first line, starts
at leftMargin + leftSubIndent. So the distance between the left edge of the bullet and the
left of the actual paragraph is leftSubIndent.
\membersection{wxRichTextAttr::SetLineSpacing}\label{wxrichtextattrsetlinespacing}
\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{wxRichTextAttr::SetListStyleName}\label{wxrichtextattrsetliststylename}
\func{void}{SetListStyleName}{\param{const wxString\& }{name}}
Sets the list style name.
\membersection{wxRichTextAttr::SetOutlineLevel}\label{wxrichtextattrsetoutlinelevel}
\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{wxRichTextAttr::SetPageBreak}\label{wxrichtextattrsetpagebreak}
\func{void}{SetPageBreak}{\param{bool}{ pageBreak = true}}
Specifies a page break before this paragraph.
\membersection{wxRichTextAttr::SetParagraphSpacingAfter}\label{wxrichtextattrsetparagraphspacingafter}
\func{void}{SetParagraphSpacingAfter}{\param{int }{spacing}}
Sets the spacing after a paragraph, in tenths of a millimetre.
\membersection{wxRichTextAttr::SetParagraphSpacingBefore}\label{wxrichtextattrsetparagraphspacingbefore}
\func{void}{SetParagraphSpacingBefore}{\param{int }{spacing}}
Sets the spacing before a paragraph, in tenths of a millimetre.
\membersection{wxRichTextAttr::SetParagraphStyleName}\label{wxrichtextattrsetparagraphstylename}
\func{void}{SetParagraphStyleName}{\param{const wxString\& }{name}}
Sets the name of the paragraph style.
\membersection{wxRichTextAttr::SetRightIndent}\label{wxrichtextattrsetrightindent}
\func{void}{SetRightIndent}{\param{int }{indent}}
Sets the right indent in tenths of a millimetre.
\membersection{wxRichTextAttr::SetTabs}\label{wxrichtextattrsettabs}
\func{void}{SetTabs}{\param{const wxArrayInt\& }{tabs}}
Sets the tab stops, expressed in tenths of a millimetre.
Each stop is measured from the left margin and therefore each value must be larger than the last.
\membersection{wxRichTextAttr::SetTextColour}\label{wxrichtextattrsettextcolour}
\func{void}{SetTextColour}{\param{const wxColour\& }{colText}}
Sets the text foreground colout.
\membersection{wxRichTextAttr::SetTextEffectFlags}\label{wxrichtextattrsettexteffectflags}
\func{void}{SetTextEffectFlags}{\param{int }{flags}}
Sets the text effect bits of interest. You should also pass wxTEXT\_ATTR\_EFFECTS to \helpref{wxRichTextAttr::SetFlags}{wxrichtextattrsetflags}.
See \helpref{wxRichTextAttr::SetFlags}{wxrichtextattrsetflags} for further information.
\membersection{wxRichTextAttr::SetTextEffects}\label{wxrichtextattrsettexteffects}
\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{wxRichTextAttr::SetFlags}{wxrichtextattrsetflags}, and call\rtfsp
\helpref{wxRichTextAttr::SetTextEffectFlags}{wxrichtextattrsettexteffectflags} with the styles (taken from the
above set) that you are interested in setting.
\membersection{wxRichTextAttr::SetURL}\label{wxrichtextattrseturl}
\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{wxRichTextAttr::operator=}\label{wxrichtextattroperatorassign}
\func{void operator}{operator=}{\param{const wxTextAttrEx\& }{attr}}
Assignment from a \helpref{wxTextAttrEx}{wxtextattr} object.
\func{void operator}{operator=}{\param{const wxRichTextAttr\& }{attr}}
Assignment from a \helpref{wxRichTextAttr}{wxrichtextattr} object.
\membersection{wxRichTextAttr::wxTextAttrEx}\label{wxrichtextattrwxtextattrex}
\constfunc{operator}{wxTextAttrEx}{\void}
Makes a \helpref{wxTextAttrEx}{wxtextattrex} object from this object.

View File

@@ -18,7 +18,7 @@ wxRichTextParagraphLayoutBox
\wxheading{See also}
\helpref{wxTextAttr}{wxtextattr}, \helpref{wxTextAttrEx}{wxtextattrex}, \helpref{wxRichTextAttr}{wxrichtextattr}, \helpref{wxRichTextCtrl}{wxrichtextctrl}
\helpref{wxTextAttr}{wxtextattr}, \helpref{wxRichTextCtrl}{wxrichtextctrl}
\latexignore{\rtfignore{\wxheading{Members}}}
@@ -209,7 +209,7 @@ Begins a right indent, specified in tenths of a millimetre.
\membersection{wxRichTextBuffer::BeginStyle}\label{wxrichtextbufferbeginstyle}
\func{bool}{BeginStyle}{\param{const wxTextAttrEx\& }{style}}
\func{bool}{BeginStyle}{\param{const wxTextAttr\& }{style}}
Begins using a specified style.
@@ -481,7 +481,7 @@ Finds a handler by filename or, if supplied, type.
\membersection{wxRichTextBuffer::GetBasicStyle}\label{wxrichtextbuffergetbasicstyle}
\constfunc{const wxTextAttrEx\&}{GetBasicStyle}{\void}
\constfunc{const wxTextAttr\&}{GetBasicStyle}{\void}
Gets the basic (overall) style. This is the style of the whole
buffer before further styles are applied, unlike the default style, which
@@ -503,7 +503,7 @@ initialized.
\membersection{wxRichTextBuffer::GetDefaultStyle}\label{wxrichtextbuffergetdefaultstyle}
\constfunc{const wxTextAttrEx\&}{GetDefaultStyle}{\void}
\constfunc{const wxTextAttr\&}{GetDefaultStyle}{\void}
Returns the current default style, affecting the style currently being applied (for example, setting the default
style to bold will cause subsequently inserted text to be bold).
@@ -530,9 +530,7 @@ Returns the object to be used to render certain aspects of the content, such as
\membersection{wxRichTextBuffer::GetStyle}\label{wxrichtextbuffergetstyle}
\func{bool}{GetStyle}{\param{long }{position}, \param{wxRichTextAttr\& }{style}}
\func{bool}{GetStyle}{\param{long }{position}, \param{wxTextAttrEx\& }{style}}
\func{bool}{GetStyle}{\param{long }{position}, \param{wxTextAttr\& }{style}}
Gets the attributes at the given position.
@@ -542,7 +540,7 @@ or paragraph style alone, use \helpref{GetUncombinedStyle}{wxrichtextbuffergetun
\membersection{wxRichTextBuffer::GetStyleForRange}\label{wxrichtextbuffergetstyleforrange}
\func{bool}{GetStyleForRange}{\param{const wxRichTextRange\&}{ range}, \param{wxTextAttrEx\& }{style}}
\func{bool}{GetStyleForRange}{\param{const wxRichTextRange\&}{ range}, \param{wxTextAttr\& }{style}}
This function gets a style representing the common, combined attributes in the given range.
Attributes which have different values within the specified range will not be included the style
@@ -577,9 +575,7 @@ Get the size of the style stack, for example to check correct nesting.
\membersection{wxRichTextBuffer::GetUncombinedStyle}\label{wxrichtextbuffergetuncombinedstyle}
\func{bool}{GetUncombinedStyle}{\param{long }{position}, \param{wxRichTextAttr\& }{style}}
\func{bool}{GetUncombinedStyle}{\param{long }{position}, \param{wxTextAttrEx\& }{style}}
\func{bool}{GetUncombinedStyle}{\param{long }{position}, \param{wxTextAttr\& }{style}}
Gets the attributes at the given position.
@@ -749,9 +745,7 @@ Saves content to a file.
\membersection{wxRichTextBuffer::SetBasicStyle}\label{wxrichtextbuffersetbasicstyle}
\func{void}{SetBasicStyle}{\param{const wxRichTextAttr\& }{style}}
\func{void}{SetBasicStyle}{\param{const wxTextAttrEx\& }{style}}
\func{void}{SetBasicStyle}{\param{const wxTextAttr\& }{style}}
Sets the basic (overall) style. This is the style of the whole
buffer before further styles are applied, unlike the default style, which
@@ -760,7 +754,7 @@ style to bold will cause subsequently inserted text to be bold).
\membersection{wxRichTextBuffer::SetDefaultStyle}\label{wxrichtextbuffersetdefaultstyle}
\func{void}{SetDefaultStyle}{\param{const wxTextAttrEx\& }{style}}
\func{void}{SetDefaultStyle}{\param{const wxTextAttr\& }{style}}
Sets the default style, affecting the style currently being applied (for example, setting the default
style to bold will cause subsequently inserted text to be bold).
@@ -796,9 +790,7 @@ overriding one or more virtual functions, and setting an instance of the class u
\membersection{wxRichTextBuffer::SetStyle}\label{wxrichtextbuffersetstyle}
\func{bool}{SetStyle}{\param{const wxRichTextRange\& }{range}, \param{const wxRichTextAttr\& }{style}, \param{int }{flags $=$ wxRICHTEXT\_SETSTYLE\_WITH\_UNDO}}
\func{bool}{SetStyle}{\param{const wxRichTextRange\& }{range}, \param{const wxTextAttrEx\& }{style}, \param{int }{flags $=$ wxRICHTEXT\_SETSTYLE\_WITH\_UNDO}}
\func{bool}{SetStyle}{\param{const wxRichTextRange\& }{range}, \param{const wxTextAttr\& }{style}, \param{int }{flags $=$ wxRICHTEXT\_SETSTYLE\_WITH\_UNDO}}
Sets the attributes for the given range. Pass flags to determine how the attributes are set.

View File

@@ -65,7 +65,7 @@ Sets the insertion point to the end of the buffer and writes the text.
Applies the given alignment to the selection (undoable).
For alignment values, see \helpref{wxTextAttrEx}{wxtextattrex}.
For alignment values, see \helpref{wxTextAttr}{wxtextattr}.
\membersection{wxRichTextCtrl::ApplyBoldToSelection}\label{wxrichtextctrlapplyboldtoselection}
@@ -113,7 +113,7 @@ Returns \true if undo commands are being batched.
Begins using alignment
For alignment values, see \helpref{wxTextAttrEx}{wxtextattrex}.
For alignment values, see \helpref{wxTextAttr}{wxtextattr}.
\membersection{wxRichTextCtrl::BeginBatchUndo}\label{wxrichtextctrlbeginbatchundo}
@@ -249,7 +249,7 @@ Begins a right indent, specified in tenths of a millimetre.
\membersection{wxRichTextCtrl::BeginStyle}\label{wxrichtextctrlbeginstyle}
\func{bool}{BeginStyle}{\param{const wxTextAttrEx\& }{style}}
\func{bool}{BeginStyle}{\param{const wxTextAttr\& }{style}}
Begins applying a style.
@@ -551,7 +551,7 @@ refresh the control.
\membersection{wxRichTextCtrl::GetBasicStyle}\label{wxrichtextctrlgetbasicstyle}
\constfunc{const wxTextAttrEx\&}{GetBasicStyle}{\void}
\constfunc{const wxTextAttr\&}{GetBasicStyle}{\void}
Gets the basic (overall) style. This is the style of the whole
buffer before further styles are applied, unlike the default style, which
@@ -584,13 +584,12 @@ Returns the caret height and position for the given character position
Gets the command processor associated with the control's buffer.
\membersection{wxRichTextCtrl::GetDefaultStyleEx}\label{wxrichtextctrlgetdefaultstyleex}
\membersection{wxRichTextCtrl::GetDefaultStyle}\label{wxrichtextctrlgetdefaultstyle}
\constfunc{const wxTextAttrEx\&}{GetDefaultStyleEx}{\void}
\constfunc{const wxTextAttr\&}{GetDefaultStyle}{\void}
Returns the current default style, which can be used to change how subsequently inserted
text is displayed. When wxTextAttrEx is merged with wxTextAttr, this function
will become GetDefaultStyle.
text is displayed.
\membersection{wxRichTextCtrl::GetDelayedLayoutThreshold}\label{wxrichtextctrlgetdelayedlayoutthreshold}
@@ -692,14 +691,9 @@ Returns the text within the current selection range, if any.
\membersection{wxRichTextCtrl::GetStyle}\label{wxrichtextctrlgetstyle}
\func{bool}{GetStyle}{\param{long }{position}, \param{wxRichTextAttr\& }{style}}
\func{bool}{GetStyle}{\param{long }{position}, \param{wxTextAttrEx\& }{style}}
\func{bool}{GetStyle}{\param{long }{position}, \param{wxTextAttr\& }{style}}
Gets the attributes at the given position. The wxRichTextAttr version is generally more efficient
because it does not use wxFont objects.
Gets the attributes at the given position.
This function gets the combined style - that is, the style you see on the screen as a result
of combining base style, paragraph style and character style attributes. To get the character
@@ -707,9 +701,7 @@ or paragraph style alone, use \helpref{GetUncombinedStyle}{wxrichtextctrlgetunco
\membersection{wxRichTextCtrl::GetStyleForRange}\label{wxrichtextctrlgetstyleforrange}
\func{bool}{GetStyleForRange}{\param{const wxRichTextRange\& }{range}, \param{wxRichTextAttr\& }{style}}
\func{bool}{GetStyleForRange}{\param{const wxRichTextRange\& }{range}, \param{wxTextAttrEx\& }{style}}
\func{bool}{GetStyleForRange}{\param{const wxRichTextRange\& }{range}, \param{wxTextAttr\& }{style}}
Gets the attributes common to the specified range. Attributes that differ in value within the range will
not be included in {\it style}'s flags.
@@ -723,14 +715,9 @@ character and paragraph styles to be applied.
\membersection{wxRichTextCtrl::GetUncombinedStyle}\label{wxrichtextctrlgetuncombinedstyle}
\func{bool}{GetUncombinedStyle}{\param{long }{position}, \param{wxRichTextAttr\& }{style}}
\func{bool}{GetUncombinedStyle}{\param{long }{position}, \param{wxTextAttrEx\& }{style}}
\func{bool}{GetUncombinedStyle}{\param{long }{position}, \param{wxTextAttr\& }{style}}
Gets the attributes at the given position. The wxRichTextAttr version is generally more efficient
because it does not use wxFont objects.
Gets the attributes at the given position.
This function gets the {\it uncombined style} - that is, the attributes associated with the
paragraph or character content, and not necessarily the combined attributes you see on the
@@ -756,9 +743,7 @@ if this is the case.
\membersection{wxRichTextCtrl::HasCharacterAttributes}\label{wxrichtextctrlhascharacterattributes}
\constfunc{bool}{HasCharacterAttributes}{\param{const wxRichTextRange\& }{range}, \param{const wxTextAttrEx\& }{style}}
\constfunc{bool}{HasCharacterAttributes}{\param{const wxRichTextRange\& }{range}, \param{const wxRichTextAttr\& }{style}}
\constfunc{bool}{HasCharacterAttributes}{\param{const wxRichTextRange\& }{range}, \param{const wxTextAttr\& }{style}}
Test if this whole range has character attributes of the specified kind. If any
of the attributes are different within the range, the test fails. You
@@ -767,9 +752,7 @@ flags indicating which attributes are of interest.
\membersection{wxRichTextCtrl::HasParagraphAttributes}\label{wxrichtextctrlhasparagraphattributes}
\constfunc{bool}{HasParagraphAttributes}{\param{const wxRichTextRange\& }{range}, \param{const wxTextAttrEx\& }{style}}
\constfunc{bool}{HasParagraphAttributes}{\param{const wxRichTextRange\& }{range}, \param{const wxRichTextAttr\& }{style}}
\constfunc{bool}{HasParagraphAttributes}{\param{const wxRichTextRange\& }{range}, \param{const wxTextAttr\& }{style}}
Test if this whole range has paragraph attributes of the specified kind. If any
of the attributes are different within the range, the test fails. You
@@ -820,7 +803,7 @@ bool wxRichTextCtrl::IsSelectionBold()
{
if (HasSelection())
{
wxRichTextAttr attr;
wxTextAttr attr;
wxRichTextRange range = GetInternalSelectionRange();
attr.SetFlags(wxTEXT_ATTR_FONT_WEIGHT);
attr.SetFontWeight(wxBOLD);
@@ -831,7 +814,7 @@ bool wxRichTextCtrl::IsSelectionBold()
{
// If no selection, then we need to combine current style with default style
// to see what the effect would be if we started typing.
wxRichTextAttr attr;
wxTextAttr attr;
attr.SetFlags(wxTEXT_ATTR_FONT_WEIGHT);
long pos = GetAdjustedCaretPosition(GetCaretPosition());
@@ -1252,7 +1235,7 @@ Cancels any selection.
\membersection{wxRichTextCtrl::SetAndShowDefaultStyle}\label{wxrichtextctrlsetandshowdefaultstyle}
\func{void}{SetAndShowDefaultStyle}{\param{const wxRichTextAttr\& }{attr}}
\func{void}{SetAndShowDefaultStyle}{\param{const wxTextAttr\& }{attr}}
Sets {\it attr} as the default style and tells the control that the UI should reflect
this attribute until the user moves the caret.
@@ -1261,9 +1244,7 @@ See also \helpref{IsDefaultStyleShowing}{wxrichtextctrlisdefaultstyleshowing}.
\membersection{wxRichTextCtrl::SetBasicStyle}\label{wxrichtextctrlsetbasicstyle}
\func{void}{SetBasicStyle}{\param{const wxRichTextAttr\& }{style}}
\func{void}{SetBasicStyle}{\param{const wxTextAttrEx\& }{style}}
\func{void}{SetBasicStyle}{\param{const wxTextAttr\& }{style}}
Sets the basic (overall) style. This is the style of the whole
buffer before further styles are applied, unlike the default style, which
@@ -1279,7 +1260,7 @@ A value of -1 means the caret is at the start of the buffer.
\membersection{wxRichTextCtrl::SetDefaultStyle}\label{wxrichtextctrlsetdefaultstyle}
\func{bool}{SetDefaultStyle}{\param{const wxTextAttrEx\& }{style}}
\func{bool}{SetDefaultStyle}{\param{const wxTextAttr\& }{style}}
Sets the current default style, which can be used to change how subsequently inserted
text is displayed.
@@ -1373,28 +1354,22 @@ So, for example, to set the selection for a character at position 5, use the ran
\membersection{wxRichTextCtrl::SetStyle}\label{wxrichtextctrlsetstyle}
\func{bool}{SetStyle}{\param{const wxRichTextRange\& }{range}, \param{const wxRichTextAttr\& }{style}}
\func{bool}{SetStyle}{\param{long }{start}, \param{long }{end}, \param{const wxTextAttrEx\& }{style}}
\func{bool}{SetStyle}{\param{const wxRichTextRange\& }{range}, \param{const wxTextAttr\& }{style}}
\func{bool}{SetStyle}{\param{long }{start}, \param{long }{end}, \param{const wxTextAttr\& }{style}}
Sets the attributes for the given range. The wxRichTextAttr version is more efficient
because it does not use wxFont objects.
Sets the attributes for the given range.
The end point of range is specified as the last character position of the span of text, plus one.
So, for example, to set the style for a character at position 5, use the range (5,6).
\membersection{wxRichTextCtrl::SetStyleEx}\label{wxrichtextctrlsetstyleex}
\func{bool}{SetStyleEx}{\param{const wxRichTextRange\& }{range}, \param{const wxRichTextAttr\& }{style}, \param{int }{flags $=$ wxRICHTEXT\_SETSTYLE\_WITH\_UNDO}}
\func{bool}{SetStyleEx}{\param{const wxRichTextRange\& }{range}, \param{const wxTextAttr\& }{style}, \param{int }{flags $=$ wxRICHTEXT\_SETSTYLE\_WITH\_UNDO}}
\func{bool}{SetStyleEx}{\param{const wxRichTextRange\& }{range}, \param{const wxTextAttrEx\& }{style}, \param{int }{flags $=$ wxRICHTEXT\_SETSTYLE\_WITH\_UNDO}}
\func{bool}{SetStyleEx}{\param{long }{start}, \param{long }{end}, \param{const wxTextAttr\& }{style}, \param{int }{flags $=$ wxRICHTEXT\_SETSTYLE\_WITH\_UNDO}}
\func{bool}{SetStyleEx}{\param{long }{start}, \param{long }{end}, \param{const wxTextAttrEx\& }{style}, \param{int }{flags $=$ wxRICHTEXT\_SETSTYLE\_WITH\_UNDO}}
Sets the attributes for the given range, passing flags to determine how the attributes are set. The wxRichTextAttr version is more efficient
because it does not use wxFont objects.
Sets the attributes for the given range, passing flags to determine how the attributes are set.
The end point of range is specified as the last character position of the span of text, plus one.
So, for example, to set the style for a character at position 5, use the range (5,6).

View File

@@ -102,9 +102,9 @@ Creation: see \helpref{the constructor}{wxrichtextformattingdialog} for details
\membersection{wxRichTextFormattingDialog::GetAttributes}\label{wxrichtextformattingdialoggetattributes}
\constfunc{const wxTextAttrEx\&}{GetAttributes}{\void}
\constfunc{const wxTextAttr\&}{GetAttributes}{\void}
\func{wxTextAttrEx\&}{GetAttributes}{\void}
\func{wxTextAttr\&}{GetAttributes}{\void}
Gets the attributes being edited.
@@ -116,7 +116,7 @@ Helper for pages to get the top-level dialog.
\membersection{wxRichTextFormattingDialog::GetDialogAttributes}\label{wxrichtextformattingdialoggetdialogattributes}
\func{wxTextAttrEx*}{GetDialogAttributes}{\param{wxWindow* }{win}}
\func{wxTextAttr*}{GetDialogAttributes}{\param{wxWindow* }{win}}
Helper for pages to get the attributes.
@@ -159,7 +159,7 @@ Gets the associated style sheet, if any.
\membersection{wxRichTextFormattingDialog::SetAttributes}\label{wxrichtextformattingdialogsetattributes}
\func{void}{SetAttributes}{\param{const wxTextAttrEx\& }{attr}}
\func{void}{SetAttributes}{\param{const wxTextAttr\& }{attr}}
Sets the attributes to be edited.
@@ -178,7 +178,7 @@ Sets the image list associated with the dialog's property sheet.
\membersection{wxRichTextFormattingDialog::SetStyle}\label{wxrichtextformattingdialogsetstyle}
\func{bool}{SetStyle}{\param{const wxTextAttrEx\& }{style}, \param{bool }{update = true}}
\func{bool}{SetStyle}{\param{const wxTextAttr\& }{style}, \param{bool }{update = true}}
Sets the attributes and optionally updates the display, if {\it update} is \true.

View File

@@ -43,7 +43,7 @@ Destructor.
\membersection{wxRichTextListStyleDefinition::CombineWithParagraphStyle}\label{wxrichtextliststyledefinitioncombinewithparagraphstyle}
\func{wxRichTextAttr}{CombineWithParagraphStyle}{\param{int }{indent}, \param{const wxRichTextAttr\&}{ paraStyle}, \param{wxRichTextStyleSheet*}{ styleSheet = NULL}}
\func{wxTextAttr}{CombineWithParagraphStyle}{\param{int }{indent}, \param{const wxTextAttr\&}{ paraStyle}, \param{wxRichTextStyleSheet*}{ styleSheet = NULL}}
This function combines the given paragraph style with the list style's base attributes and level style matching the given indent, returning the combined attributes.
If {\it styleSheet} is specified, the base style for this definition will also be included in the result.
@@ -56,21 +56,21 @@ This function finds the level (from 0 to 9) whose indentation attribute mostly c
\membersection{wxRichTextListStyleDefinition::GetCombinedStyle}\label{wxrichtextliststyledefinitiongetcombinedstyle}
\constfunc{wxRichTextAttr}{GetCombinedStyle}{\param{int }{indent}, \param{wxRichTextStyleSheet*}{ styleSheet = NULL}}
\constfunc{wxTextAttr}{GetCombinedStyle}{\param{int }{indent}, \param{wxRichTextStyleSheet*}{ styleSheet = NULL}}
This function combines the list style's base attributes and the level style matching the given indent, returning the combined attributes.
If {\it styleSheet} is specified, the base style for this definition will also be included in the result.
\membersection{wxRichTextListStyleDefinition::GetCombinedStyleForLevel}\label{wxrichtextliststyledefinitioncombinewithparagraphstyleforlevel}
\constfunc{wxRichTextAttr}{GetCombinedStyleLevel}{\param{int }{level}, \param{wxRichTextStyleSheet*}{ styleSheet = NULL}}
\constfunc{wxTextAttr}{GetCombinedStyleLevel}{\param{int }{level}, \param{wxRichTextStyleSheet*}{ styleSheet = NULL}}
This function combines the list style's base attributes and the style for the specified level, returning the combined attributes.
If {\it styleSheet} is specified, the base style for this definition will also be included in the result.
\membersection{wxRichTextListStyleDefinition::GetLevelAttributes}\label{wxrichtextliststyledefinitiongetlevelattributes}
\constfunc{const wxRichTextAttr*}{GetLevelAttributes}{\param{int }{level}}
\constfunc{const wxTextAttr*}{GetLevelAttributes}{\param{int }{level}}
Returns the style for the given level. {\it level} is a number between 0 and 9.
@@ -90,11 +90,11 @@ Returns \true if the given level has numbered list attributes.
\membersection{wxRichTextListStyleDefinition::SetLevelAttributes}\label{wxrichtextliststyledefinitionsetlevelattributes}
\func{void}{SetLevelAttributes}{\param{int }{level}, \param{const wxRichTextAttr\&}{ attr}}
\func{void}{SetLevelAttributes}{\param{int }{level}, \param{const wxTextAttr\&}{ attr}}
\func{void}{SetLevelAttributes}{\param{int }{level}, \param{int}{ leftIndent}, \param{int}{ leftSubIndent}, \param{int}{ bulletStyle}, \param{const wxString\&}{ bulletSymbol = wxEmptyString}}
Sets the style for the given level. {\it level} is a number between 0 and 9.
The first and most flexible form uses a wxRichTextAttr object, while the second form is for convenient setting of the most commonly-used attributes.
The first and most flexible form uses a wxTextAttr object, while the second form is for convenient setting of the most commonly-used attributes.

View File

@@ -2,8 +2,7 @@
{\bf Major classes:} \helpref{wxRichTextCtrl}{wxrichtextctrl}, \helpref{wxRichTextBuffer}{wxrichtextbuffer}, \helpref{wxRichTextEvent}{wxrichtextevent}
{\bf Helper classes:} \helpref{wxRichTextAttr}{wxrichtextattr}, \helpref{wxTextAttrEx}{wxtextattrex},
\helpref{wxRichTextRange}{wxrichtextrange}
{\bf Helper classes:} \helpref{wxTextAttr}{wxtextattr}, \helpref{wxRichTextRange}{wxrichtextrange}
{\bf File handler classes:} \helpref{wxRichTextFileHandler}{wxrichtextfilehandler}, \helpref{wxRichTextHTMLHandler}{wxrichtexthtmlhandler},
\helpref{wxRichTextXMLHandler}{wxrichtextxmlhandler}
@@ -186,7 +185,7 @@ The following code is taken from the sample, and adds text and styles to a rich
tabs.Add(600);
tabs.Add(800);
tabs.Add(1000);
wxTextAttrEx attr;
wxTextAttr attr;
attr.SetFlags(wxTEXT_ATTR_TABS);
attr.SetTabs(tabs);
r.SetDefaultStyle(attr);
@@ -220,14 +219,7 @@ be processed by the control rather than being used for navigation between contro
\subsubsection{wxRichTextCtrl and styles}
Styling attributes are represented by three classes: \helpref{wxTextAttr}{wxtextattr}, \helpref{wxTextAttrEx}{wxtextattrex} and \helpref{wxRichTextAttr}{wxrichtextattr}.
wxTextAttr is shared across all controls that are derived from wxTextCtrlBase and
can store basic character and paragraph attributes. wxTextAttrEx derives
from wxTextAttr and adds some further attributes that are only supported
by wxRichTextCtrl. Finally, wxRichTextAttr is a more efficient version
of wxTextAttrEx that doesn't use a wxFont object and can be used to
query styles more quickly. wxTextAttrEx and wxRichTextAttr are largely
interchangeable and have suitable conversion operators between them.
Styling attributes are represented by \helpref{wxTextAttr}{wxtextattr}.
When setting a style, the flags of the attribute object determine which
attributes are applied. When querying a style, the passed flags are ignored
@@ -348,7 +340,7 @@ always has one such buffer.
The content is represented by a hierarchy of objects, all derived from
wxRichTextObject. An object might be an image, a fragment of text, a paragraph,
or a whole buffer. Objects store a wxTextAttrEx containing style information;
or a whole buffer. Objects store a wxTextAttr containing style information;
a paragraph object can contain both paragraph and character information, but
content objects such as text can only store character information. The final
style displayed in the control or in a printout is a combination of base
@@ -375,7 +367,7 @@ A paragraph of pure text with the same style contains just one further
object, a wxRichTextPlainText object. When styling is applied to part of
this object, the object is decomposed into separate objects, one object
for each different character style. So each object within a paragraph always has
just one wxTextAttrEx object to denote its character style. Of course, this can
just one wxTextAttr object to denote its character style. Of course, this can
lead to fragmentation after a lot of edit operations, potentially leading
to several objects with the same style where just one would do. So
a Defragment function is called when updating the control's display, to ensure that

View File

@@ -50,15 +50,15 @@ Returns the style name.
\membersection{wxRichTextStyleDefinition::GetStyle}\label{wxrichtextstyledefinitiongetstyle}
\func{wxRichTextAttr\&}{GetStyle}{\void}
\func{wxTextAttr\&}{GetStyle}{\void}
\constfunc{const wxRichTextAttr\&}{GetStyle}{\void}
\constfunc{const wxTextAttr\&}{GetStyle}{\void}
Returns the attributes associated with this style.
\membersection{wxRichTextStyleDefinition::GetStyleMergedWithBase}\label{wxrichtextstyledefinitiongetstylemergedwithbase}
\constfunc{wxRichTextAttr}{GetStyleMergedWithBase}{\param{wxRichTextStyleSheet*}{ sheet}}
\constfunc{wxTextAttr}{GetStyleMergedWithBase}{\param{wxRichTextStyleSheet*}{ sheet}}
Returns the style attributes combined with the attributes of the specified base style, if any. This function works recursively.
@@ -82,7 +82,7 @@ Sets the name of the style.
\membersection{wxRichTextStyleDefinition::SetStyle}\label{wxrichtextstyledefinitionsetstyle}
\func{void}{SetStyle}{\param{const wxRichTextAttr\& }{style}}
\func{void}{SetStyle}{\param{const wxTextAttr\& }{style}}
Sets the attributes for this style.

View File

@@ -54,7 +54,7 @@ Returns \true.
\membersection{wxRichTextXMLHandler::CreateStyle}\label{wxrichtextxmlhandlercreatestyle}
\func{wxString}{CreateStyle}{\param{const wxTextAttrEx\& }{attr}, \param{bool }{isPara = false}}
\func{wxString}{CreateStyle}{\param{const wxTextAttr\& }{attr}, \param{bool }{isPara = false}}
Creates XML code for a given character or paragraph style.
@@ -96,7 +96,7 @@ Helper function: gets a named parameter from the XML node.
\membersection{wxRichTextXMLHandler::GetStyle}\label{wxrichtextxmlhandlergetstyle}
\func{bool}{GetStyle}{\param{wxTextAttrEx\& }{attr}, \param{wxXmlNode* }{node}, \param{bool }{isPara = false}}
\func{bool}{GetStyle}{\param{wxTextAttr\& }{attr}, \param{wxXmlNode* }{node}, \param{bool }{isPara = false}}
Helper function: gets style parameters from the given XML node.

View File

@@ -26,7 +26,7 @@ rich text control in either the current font or specified font.
\begin{verbatim}
wxRichTextCtrl* ctrl = (wxRichTextCtrl*) FindWindow(ID_RICHTEXT_CTRL);
wxTextAttrEx attr;
wxTextAttr attr;
attr.SetFlags(wxTEXT_ATTR_FONT);
ctrl->GetStyle(ctrl->GetInsertionPoint(), attr);

View File

@@ -1,13 +1,11 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%% wxTextAttr %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxTextAttr}}\label{wxtextattr}
wxTextAttr represents the character and paragraph attributes, or style, for a range of text in a\rtfsp
\helpref{wxTextCtrl}{wxtextctrl}.
wxTextAttr represents the character and paragraph attributes, or style,
for a range of text in a \helpref{wxTextCtrl}{wxtextctrl} or \helpref{wxRichTextCtrl}{wxrichtextctrl}.
When setting up a wxTextAttr object, pass a bitlist mask to SetFlags to indicate
which style elements should be changed. As a convenience, when you call a
setter such as SetFont, the relevant bit will be set.
When setting up a wxTextAttr object, pass a bitlist mask to \helpref{SetFlags}{wxtextattrsetflags} to
indicate which style elements should be changed. As a convenience, when you call a setter such
as SetFont, the relevant bit will be set.
\wxheading{Derived from}
@@ -21,20 +19,9 @@ No base class
\helpref{wxCore}{librarieslist}
\wxheading{Typedefs}
\texttt{wxTextPos} is the type containing the index of a position in a text
control. \texttt{wxTextCoord} contains the index of a column or a row in the
control.
Note that although both of these types should probably have been unsigned, due
to backwards compatibility reasons, are defined as \texttt{long} currently.
Their use (instead of plain \texttt{long}) is still encouraged as it makes the
code more readable.
\wxheading{Constants}
The following values can be passed to SetAlignment to determine
The following values can be passed to wxTextAttr::SetAlignment to determine
paragraph alignment.
{\small
@@ -51,165 +38,532 @@ enum wxTextAttrAlignment
\end{verbatim}
}
These values are passed in a bitlist to SetFlags to determine
Of these, wxTEXT\_ALIGNMENT\_JUSTIFIED is unimplemented. In future justification may be supported
when printing or previewing, only.
The following values are passed in a bitlist to wxTextAttr::SetFlags to determine
what attributes will be considered when setting the attributes
for a text control.
{\small
\begin{verbatim}
#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
// Standard wxTextAttr constants
#define wxTEXT_ATTR_TEXT_COLOUR 0x00000001
#define wxTEXT_ATTR_BACKGROUND_COLOUR 0x00000002
#define wxTEXT_ATTR_FONT_FACE 0x00000004
#define wxTEXT_ATTR_FONT_SIZE 0x00000008
#define wxTEXT_ATTR_FONT_WEIGHT 0x00000010
#define wxTEXT_ATTR_FONT_ITALIC 0x00000020
#define wxTEXT_ATTR_FONT_UNDERLINE 0x00000040
#define wxTEXT_ATTR_FONT_ENCODING 0x02000000
#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
| wxTEXT_ATTR_FONT_ITALIC | wxTEXT_ATTR_FONT_UNDERLINE | wxTEXT_ATTR_FONT_ENCODING
#define wxTEXT_ATTR_ALIGNMENT 0x00000080
#define wxTEXT_ATTR_LEFT_INDENT 0x00000100
#define wxTEXT_ATTR_RIGHT_INDENT 0x00000200
#define wxTEXT_ATTR_TABS 0x00000400
// 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 wxTextAttr::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 wxTextAttr::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 wxTextAttr::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{wxTextCtrl}{wxtextctrl}, \helpref{wxRichTextCtrl}{wxrichtextctrl}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxTextAttr::wxTextAttr}\label{wxtextattrctor}
\membersection{wxTextAttr::wxTextAttr}\label{wxtextattrwxtextattr}
\func{}{wxTextAttr}{\void}
\func{}{wxTextAttr}{\param{const wxColour\& }{colText}, \param{const wxColour\& }{colBack = wxNullColour},
\param{const wxFont\& }{font = wxNullFont}, \param{wxTextAttrAlignment }{alignment = wxTEXT\_ALIGNMENT\_DEFAULT}}
\func{}{wxTextAttr}{\param{const wxColour\& }{colText}, \param{const wxColour\& }{colBack = wxNullColour}, \param{const wxFont\& }{font = wxNullFont}, \param{wxTextAttrAlignment }{alignment = wxTEXT\_ALIGNMENT\_DEFAULT}}
The constructors initialize one or more of the text foreground colour, background
colour, font, and alignment. The values not initialized in the constructor can be set
later, otherwise \helpref{wxTextCtrl::SetStyle}{wxtextctrlsetstyle} will use
the default values for them.
\func{}{wxTextAttr}{\param{const wxTextAttr\& }{attr}}
Constructors.
\membersection{wxTextAttr::Apply}\label{wxtextattrapply}
\func{bool}{Apply}{\param{const wxTextAttr\& }{style}, \param{const wxTextAttr* }{compareWith = NULL}}
Applies the attributes in {\it style} to the original object, but not those attributes from {\it style} that are the same as those in {\it compareWith} (if passed).
\membersection{wxTextAttr::CreateFont}\label{wxtextattrcreatefont}
\constfunc{wxFont}{CreateFont}{\void}
Creates a font from the font attributes.
\membersection{wxTextAttr::GetAlignment}\label{wxtextattrgetalignment}
\constfunc{wxTextAttrAlignment}{GetAlignment}{\void}
Returns the paragraph alignment.
Returns the alignment flags.
See \helpref{wxTextAttr::SetAlignment}{wxtextattrsetalignment} for a list of available styles.
\membersection{wxTextAttr::GetBackgroundColour}\label{wxtextattrgetbackgroundcolour}
\constfunc{const wxColour\&}{GetBackgroundColour}{\void}
Return the background colour specified by this attribute.
Returns the background colour.
\membersection{wxTextAttr::GetBulletFont}\label{wxtextattrgetbulletfont}
\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{wxTextAttr::GetBulletName}\label{wxtextattrgetbulletname}
\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}
For wxRichTextCtrl users only: if you wish your rich text controls 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{wxTextAttr::GetBulletNumber}\label{wxtextattrgetbulletnumber}
\constfunc{int}{GetBulletNumber}{\void}
Returns the bullet number.
\membersection{wxTextAttr::GetBulletStyle}\label{wxtextattrgetbulletstyle}
\constfunc{int}{GetBulletStyle}{\void}
Returns the bullet style.
See \helpref{wxTextAttr::SetBulletStyle}{wxtextattrsetbulletstyle} for a list of available styles.
\membersection{wxTextAttr::GetBulletText}\label{wxtextattrgetbullettext}
\constfunc{const wxString\&}{GetBulletText}{\void}
Returns the bullet text, which could be a symbol, or (for example) cached outline text.
\membersection{wxTextAttr::GetCharacterStyleName}\label{wxtextattrgetcharacterstylename}
\constfunc{const wxString\&}{GetCharacterStyleName}{\void}
Returns the name of the character style.
\membersection{wxTextAttr::GetFlags}\label{wxtextattrgetflags}
\constfunc{long}{GetFlags}{\void}
Returns flags indicating which attributes are applicable.
See \helpref{wxTextAttr::SetFlags}{wxtextattrsetflags} for a list of available flags.
\membersection{wxTextAttr::GetFont}\label{wxtextattrgetfont}
\constfunc{const wxFont\&}{GetFont}{\void}
\constfunc{wxFont}{GetFont}{\void}
Return the text font specified by this attribute.
Creates and returns a font specified by the font attributes in the wxTextAttr object. Note that
wxTextAttr does not store a wxFont object, so this is only a temporary font. For greater
efficiency, access the font attributes directly.
\membersection{wxTextAttr::GetFontAttributes}\label{wxtextattrgetfontattributes}
\func{bool}{GetFontAttributes}{\param{const wxFont\& }{font}, \param{int}{ flags = wxTEXT\_ATTR\_FONT}}
Gets the font attributes from the given font, using only the attributes specified by {\it flags}.
\membersection{wxTextAttr::GetFontEncoding}\label{wxtextattrgetfontencoding}
\constfunc{wxFontEncoding}{GetFontEncoding}{\void}
Returns the font encoding.
\membersection{wxTextAttr::GetFontFaceName}\label{wxtextattrgetfontfacename}
\constfunc{const wxString\&}{GetFontFaceName}{\void}
Returns the font face name.
\membersection{wxTextAttr::GetFontSize}\label{wxtextattrgetfontsize}
\constfunc{int}{GetFontSize}{\void}
Returns the font size in points.
\membersection{wxTextAttr::GetFontStyle}\label{wxtextattrgetfontstyle}
\constfunc{int}{GetFontStyle}{\void}
Returns the font style.
\membersection{wxTextAttr::GetFontUnderlined}\label{wxtextattrgetfontunderlined}
\constfunc{bool}{GetFontUnderlined}{\void}
Returns \true if the font is underlined.
\membersection{wxTextAttr::GetFontWeight}\label{wxtextattrgetfontweight}
\constfunc{int}{GetFontWeight}{\void}
Returns the font weight.
\membersection{wxTextAttr::GetLeftIndent}\label{wxtextattrgetleftindent}
\constfunc{int}{GetLeftIndent}{\void}
\constfunc{long}{GetLeftIndent}{\void}
Returns the left indent in tenths of a millimetre.
\membersection{wxTextAttr::GetLeftSubIndent}\label{wxtextattrgetleftsubindent}
\constfunc{int}{GetLeftSubIndent}{\void}
\constfunc{long}{GetLeftSubIndent}{\void}
Returns the left sub indent for all lines but the first line in a paragraph in
tenths of a millimetre.
Returns the left sub-indent in tenths of a millimetre.
\membersection{wxTextAttr::GetLineSpacing}\label{wxtextattrgetlinespacing}
\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{wxTextAttr::GetListStyleName}\label{wxtextattrgetliststylename}
\constfunc{const wxString\&}{GetListStyleName}{\void}
Returns the name of the list style.
\membersection{wxTextAttr::GetOutlineLevel}\label{wxtextattrgetoutlinelevel}
\constfunc{bool}{GetOutlineLevel}{\void}
Returns the outline level.
\membersection{wxTextAttr::GetParagraphSpacingAfter}\label{wxtextattrgetparagraphspacingafter}
\constfunc{int}{GetParagraphSpacingAfter}{\void}
Returns the space in tenths of a millimeter after the paragraph.
\membersection{wxTextAttr::GetParagraphSpacingBefore}\label{wxtextattrgetparagraphspacingbefore}
\constfunc{int}{GetParagraphSpacingBefore}{\void}
Returns the space in tenths of a millimeter before the paragraph.
\membersection{wxTextAttr::GetParagraphStyleName}\label{wxtextattrgetparagraphstylename}
\constfunc{const wxString\&}{GetParagraphStyleName}{\void}
Returns the name of the paragraph style.
\membersection{wxTextAttr::GetRightIndent}\label{wxtextattrgetrightindent}
\constfunc{int}{GetRightIndent}{\void}
Returns the right indent in tenths of a millimetre.
\constfunc{long}{GetRightIndent}{\void}
Returns the right indent in tenths of a millimeter.
\membersection{wxTextAttr::GetTabs}\label{wxtextattrgettabs}
\constfunc{const wxArrayInt\&}{GetTabs}{\void}
Returns the array of integers representing the tab stops. Each
array element specifies the tab stop in tenths of a millimetre.
Returns an array of tab stops, each expressed in tenths of a millimeter. Each stop
is measured from the left margin and therefore each value must be larger than the last.
\membersection{wxTextAttr::GetTextColour}\label{wxtextattrgettextcolour}
\constfunc{const wxColour\&}{GetTextColour}{\void}
Return the text colour specified by this attribute.
Returns the text foreground colour.
\membersection{wxTextAttr::GetTextEffectFlags}\label{wxtextattrgettexteffectflags}
\constfunc{int}{GetTextEffectFlags}{\void}
Returns the text effect bits of interest. See \helpref{wxTextAttr::SetFlags}{wxtextattrsetflags} for further information.
\membersection{wxTextAttr::GetTextEffects}\label{wxtextattrgettexteffects}
\constfunc{int}{GetTextEffects}{\void}
Returns the text effects, a bit list of styles. See \helpref{wxTextAttr::SetTextEffects}{wxtextattrsettexteffects} for
details.
\membersection{wxTextAttr::GetURL}\label{wxtextattrgeturl}
\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{wxTextAttr::HasAlignment}\label{wxtextattrhasalignment}
\constfunc{bool}{HasAlignment}{\void}
Returns {\tt true} if this style specifies the text alignment.
Returns \true if the attribute object specifies alignment.
\membersection{wxTextAttr::HasBackgroundColour}\label{wxtextattrhasbackgroundcolour}
\constfunc{bool}{HasBackgroundColour}{\void}
Returns {\tt true} if this style specifies the background colour to use.
Returns \true if the attribute object specifies a background colour.
\membersection{wxTextAttr::HasBulletName}\label{wxtextattrhasbulletname}
\constfunc{bool}{HasBulletName}{\void}
Returns \true if the attribute object specifies a standard bullet name.
\membersection{wxTextAttr::HasBulletNumber}\label{wxtextattrhasbulletnumber}
\constfunc{bool}{HasBulletNumber}{\void}
Returns \true if the attribute object specifies a bullet number.
\membersection{wxTextAttr::HasBulletStyle}\label{wxtextattrhasbulletstyle}
\constfunc{bool}{HasBulletStyle}{\void}
Returns \true if the attribute object specifies a bullet style.
\membersection{wxTextAttr::HasBulletText}\label{wxtextattrhasbullettext}
\constfunc{bool}{HasBulletText}{\void}
Returns \true if the attribute object specifies bullet text (usually specifying a symbol).
\membersection{wxTextAttr::HasCharacterStyleName}\label{wxtextattrhascharacterstylename}
\constfunc{bool}{HasCharacterStyleName}{\void}
Returns \true if the attribute object specifies a character style name.
\membersection{wxTextAttr::HasFontEncoding}\label{wxtextattrhasfontencoding}
\constfunc{bool}{HasFontEncoding}{\void}
Returns \true if the attribute object specifies an encoding.
\membersection{wxTextAttr::HasFontFaceName}\label{wxtextattrhasfontfacename}
\constfunc{bool}{HasFontFaceName}{\void}
Returns \true if the attribute object specifies a font face name.
\membersection{wxTextAttr::HasFlag}\label{wxtextattrhasflag}
\constfunc{bool}{HasFlag}{\param{long }{flag}}
Returns \true if the {\it flag} is present in the attribute object's flag bitlist.
\membersection{wxTextAttr::HasFont}\label{wxtextattrhasfont}
\constfunc{bool}{HasFont}{\void}
Returns {\tt true} if this style specifies the font to use.
Returns \true if the attribute object specifies any font attributes.
\membersection{wxTextAttr::HasFontItalic}\label{wxtextattrhasfontitalic}
\constfunc{bool}{HasFontItalic}{\void}
Returns \true if the attribute object specifies italic style.
\membersection{wxTextAttr::HasFontUnderlined}\label{wxtextattrhasfontunderlined}
\constfunc{bool}{HasFontUnderlined}{\void}
Returns \true if the attribute object specifies either underlining or no underlining.
\membersection{wxTextAttr::HasURL}\label{wxtextattrhasurl}
\constfunc{bool}{HasURL}{\void}
Returns \true if the attribute object specifies a URL.
\membersection{wxTextAttr::HasFontWeight}\label{wxtextattrhasfontweight}
\constfunc{bool}{HasFontWeight}{\void}
Returns \true if the attribute object specifies font weight (bold, light or normal).
\membersection{wxTextAttr::HasLeftIndent}\label{wxtextattrhasleftindent}
\constfunc{bool}{HasLeftIndent}{\void}
Returns {\tt true} if this style specifies the left indent.
Returns \true if the attribute object specifies a left indent.
\membersection{wxTextAttr::HasLineSpacing}\label{wxtextattrhaslinespacing}
\constfunc{bool}{HasLineSpacing}{\void}
Returns \true if the attribute object specifies line spacing.
\membersection{wxTextAttr::HasListStyleName}\label{wxtextattrhasliststylename}
\constfunc{bool}{HasListStyleName}{\void}
Returns \true if the attribute object specifies a list style name.
\membersection{wxTextAttr::HasOutlineLevel}\label{wxtextattrhasoutlinelevel}
\constfunc{bool}{HasOutlineLevel}{\void}
Returns \true if the attribute object specifies an outline level.
\membersection{wxTextAttr::HasPageBreak}\label{wxtextattrhaspagebreak}
\constfunc{bool}{HasPageBreak}{\void}
Returns \true if the attribute object specifies a page break before this paragraph.
\membersection{wxTextAttr::HasParagraphSpacingAfter}\label{wxtextattrhasparagraphspacingafter}
\constfunc{bool}{HasParagraphSpacingAfter}{\void}
Returns \true if the attribute object specifies spacing after a paragraph.
\membersection{wxTextAttr::HasParagraphSpacingBefore}\label{wxtextattrhasparagraphspacingbefore}
\constfunc{bool}{HasParagraphSpacingBefore}{\void}
Returns \true if the attribute object specifies spacing before a paragraph.
\membersection{wxTextAttr::HasParagraphStyleName}\label{wxtextattrhasparagraphstylename}
\constfunc{bool}{HasParagraphStyleName}{\void}
Returns \true if the attribute object specifies a paragraph style name.
\membersection{wxTextAttr::HasRightIndent}\label{wxtextattrhasrightindent}
\constfunc{bool}{HasRightIndent}{\void}
Returns {\tt true} if this style specifies the right indent.
Returns \true if the attribute object specifies a right indent.
\membersection{wxTextAttr::HasFontSize}\label{wxtextattrhasfontsize}
\constfunc{bool}{HasFontSize}{\void}
Returns \true if the attribute object specifies a font point size.
\membersection{wxTextAttr::HasTabs}\label{wxtextattrhastabs}
\constfunc{bool}{HasTabs}{\void}
Returns {\tt true} if this style specifies any tabstobs.
Returns \true if the attribute object specifies tab stops.
\membersection{wxTextAttr::HasTextColour}\label{wxtextattrhastextcolour}
\constfunc{bool}{HasTextColour}{\void}
Returns {\tt true} if this style specifies the foreground colour to use.
Returns \true if the attribute object specifies a text foreground colour.
\membersection{wxTextAttr::HasTextEffects}\label{wxtextattrhastexteffects}
\membersection{wxTextAttr::GetFlags}\label{wxtextattrgetflags}
\constfunc{bool}{HasTextEffects}{\void}
\func{long}{GetFlags}{\void}
Returns \true if the attribute object specifies text effects.
Returns a bitlist indicating which attributes will be set.
\membersection{wxTextAttr::IsCharacterStyle}\label{wxtextattrischaracterstyle}
\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{wxTextAttr::IsDefault}\label{wxtextattrisdefault}
\constfunc{bool}{IsDefault}{\void}
Returns {\tt true} if this style specifies any non-default attributes.
Returns \false if we have any attributes set, \true otherwise.
\membersection{wxTextAttr::IsParagraphStyle}\label{wxtextattrisparagraphstyle}
\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{wxTextAttr::Merge}\label{wxtextattrmerge}
@@ -227,40 +581,251 @@ result.
\membersection{wxTextAttr::SetAlignment}\label{wxtextattrsetalignment}
\func{void}{SetAlignment}{\param{wxTextAttrAlignment}{ alignment}}
\func{void}{SetAlignment}{\param{wxTextAttrAlignment }{alignment}}
Sets the paragraph alignment.
Sets the paragraph alignment. These are the possible values for {\it 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}
}
Of these, wxTEXT\_ALIGNMENT\_JUSTIFIED is unimplemented. In future justification may be supported
when printing or previewing, only.
\membersection{wxTextAttr::SetBackgroundColour}\label{wxtextattrsetbackgroundcolour}
\func{void}{SetBackgroundColour}{\param{const wxColour\& }{colour}}
\func{void}{SetBackgroundColour}{\param{const wxColour\& }{colBack}}
Sets the background colour.
\membersection{wxTextAttr::SetBulletFont}\label{wxtextattrsetbulletfont}
\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{wxTextAttr::SetBulletName}\label{wxtextattrsetbulletname}
\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{wxTextAttr::GetBulletName}{wxtextattrgetbulletname} for a list
of supported names, and how to expand the range of supported types.
\membersection{wxTextAttr::SetBulletNumber}\label{wxtextattrsetbulletnumber}
\func{void}{SetBulletNumber}{\param{int }{n}}
Sets the bullet number.
\membersection{wxTextAttr::SetBulletStyle}\label{wxtextattrsetbulletstyle}
\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{wxTextAttr::SetBulletText}\label{wxtextattrsetbullettext}
\func{void}{SetBulletText}{\param{const wxString& }{text}}
Sets the bullet text, which could be a symbol, or (for example) cached outline text.
\membersection{wxTextAttr::SetCharacterStyleName}\label{wxtextattrsetcharacterstylename}
\func{void}{SetCharacterStyleName}{\param{const wxString\& }{name}}
Sets the character style name.
\membersection{wxTextAttr::SetFlags}\label{wxtextattrsetflags}
\func{void}{SetFlags}{\param{long}{ flags}}
\func{void}{SetFlags}{\param{long }{flags}}
Pass a bitlist indicating which attributes will be set.
Sets the flags determining which styles are being specified. The following
flags can be passed in a bitlist:
{\small
\begin{verbatim}
// Standard wxTextAttr constants
#define wxTEXT_ATTR_TEXT_COLOUR 0x00000001
#define wxTEXT_ATTR_BACKGROUND_COLOUR 0x00000002
#define wxTEXT_ATTR_FONT_FACE 0x00000004
#define wxTEXT_ATTR_FONT_SIZE 0x00000008
#define wxTEXT_ATTR_FONT_WEIGHT 0x00000010
#define wxTEXT_ATTR_FONT_ITALIC 0x00000020
#define wxTEXT_ATTR_FONT_UNDERLINE 0x00000040
#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 0x00000080
#define wxTEXT_ATTR_LEFT_INDENT 0x00000100
#define wxTEXT_ATTR_RIGHT_INDENT 0x00000200
#define wxTEXT_ATTR_TABS 0x00000400
// 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}
}
\membersection{wxTextAttr::SetFont}\label{wxtextattrsetfont}
\func{void}{SetFont}{\param{const wxFont\&}{ font}}
Sets the text font.
Sets the attributes for the given font. Note that wxTextAttr does not store an actual wxFont object.
\membersection{wxTextAttr::SetFontEncoding}\label{wxtextattrsetfontencoding}
\func{void}{SetFontEncoding}{\param{wxFontEncoding }{encoding}}
Sets the font encoding.
\membersection{wxTextAttr::SetFontFaceName}\label{wxtextattrsetfontfacename}
\func{void}{SetFontFaceName}{\param{const wxString\& }{faceName}}
Sets the paragraph alignment.
\membersection{wxTextAttr::SetFontSize}\label{wxtextattrsetfontsize}
\func{void}{SetFontSize}{\param{int }{pointSize}}
Sets the font size in points.
\membersection{wxTextAttr::SetFontStyle}\label{wxtextattrsetfontstyle}
\func{void}{SetFontStyle}{\param{int }{fontStyle}}
Sets the font style (normal, italic or slanted).
\membersection{wxTextAttr::SetFontUnderlined}\label{wxtextattrsetfontunderlined}
\func{void}{SetFontUnderlined}{\param{bool }{underlined}}
Sets the font underlining.
\membersection{wxTextAttr::SetFontWeight}\label{wxtextattrsetfontweight}
\func{void}{SetFontWeight}{\param{int }{fontWeight}}
Sets the font weight.
\membersection{wxTextAttr::SetLeftIndent}\label{wxtextattrsetleftindent}
\func{void}{SetLeftIndent}{\param{int }{indent}, \param{int }{subIndent = 0}}
Sets the left indent in tenths of a millimetre.
subIndent sets the indent for all lines but the first line in a paragraph
relative to the first line.
Sets the left indent and left subindent in tenths of a millimetre.
The sub-indent is an offset from the left of the paragraph, and is used for all but the
first line in a paragraph. A positive value will cause the first line to appear to the left
of the subsequent lines, and a negative value will cause the first line to be indented
relative to the subsequent lines.
wxRichTextBuffer uses indentation to render a bulleted item. The left indent is the distance between
the margin and the bullet. The content of the paragraph, including the first line, starts
at leftMargin + leftSubIndent. So the distance between the left edge of the bullet and the
left of the actual paragraph is leftSubIndent.
\membersection{wxTextAttr::SetLineSpacing}\label{wxtextattrsetlinespacing}
\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{wxTextAttr::SetListStyleName}\label{wxtextattrsetliststylename}
\func{void}{SetListStyleName}{\param{const wxString\& }{name}}
Sets the list style name.
\membersection{wxTextAttr::SetOutlineLevel}\label{wxtextattrsetoutlinelevel}
\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{wxTextAttr::SetPageBreak}\label{wxtextattrsetpagebreak}
\func{void}{SetPageBreak}{\param{bool}{ pageBreak = true}}
Specifies a page break before this paragraph.
\membersection{wxTextAttr::SetParagraphSpacingAfter}\label{wxtextattrsetparagraphspacingafter}
\func{void}{SetParagraphSpacingAfter}{\param{int }{spacing}}
Sets the spacing after a paragraph, in tenths of a millimetre.
\membersection{wxTextAttr::SetParagraphSpacingBefore}\label{wxtextattrsetparagraphspacingbefore}
\func{void}{SetParagraphSpacingBefore}{\param{int }{spacing}}
Sets the spacing before a paragraph, in tenths of a millimetre.
\membersection{wxTextAttr::SetParagraphStyleName}\label{wxtextattrsetparagraphstylename}
\func{void}{SetParagraphStyleName}{\param{const wxString\& }{name}}
Sets the name of the paragraph style.
\membersection{wxTextAttr::SetRightIndent}\label{wxtextattrsetrightindent}
@@ -268,18 +833,69 @@ relative to the first line.
Sets the right indent in tenths of a millimetre.
\membersection{wxTextAttr::SetTabs}\label{wxtextattrsettabs}
\func{void}{SetTabs}{\param{const wxArrayInt\&}{ tabs}}
Sets the array of integers representing the tab stops. Each
array element specifies the tab stop in tenths of a millimetre.
\func{void}{SetTabs}{\param{const wxArrayInt\& }{tabs}}
Sets the tab stops, expressed in tenths of a millimetre.
Each stop is measured from the left margin and therefore each value must be larger than the last.
\membersection{wxTextAttr::SetTextColour}\label{wxtextattrsettextcolour}
\func{void}{SetTextColour}{\param{const wxColour\& }{colour}}
\func{void}{SetTextColour}{\param{const wxColour\& }{colText}}
Sets the text colour.
Sets the text foreground colout.
\membersection{wxTextAttr::SetTextEffectFlags}\label{wxtextattrsettexteffectflags}
\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}.
See \helpref{wxTextAttr::SetFlags}{wxtextattrsetflags} for further information.
\membersection{wxTextAttr::SetTextEffects}\label{wxtextattrsettexteffects}
\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{wxTextAttr::SetTextEffectFlags}{wxtextattrsettexteffectflags} with the styles (taken from the
above set) that you are interested in setting.
\membersection{wxTextAttr::SetURL}\label{wxtextattrseturl}
\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{wxTextAttr::operator=}\label{wxtextattroperatorassign}
\func{void operator}{operator=}{\param{const wxTextAttr\& }{attr}}
Assignment from a \helpref{wxTextAttr}{wxtextattr} object.

View File

@@ -1,555 +0,0 @@
\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{Library}
\helpref{wxRichtext}{librarieslist}
\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{bool}{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.