richtextattr.tex

来自「Wxpython Implemented on Windows CE, Sou」· TEX 代码 · 共 641 行 · 第 1/2 页

TEX
641
字号
Returns \true if the attribute object specifies any font attributes.

\membersection{wxRichTextAttr::HasItalic}\label{wxrichtextattrhasitalic}

\constfunc{bool}{HasItalic}{\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::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::HasSize}\label{wxrichtextattrhassize}

\constfunc{bool}{HasSize}{\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::HasUnderlined}\label{wxrichtextattrhasunderlined}

\constfunc{bool}{HasUnderlined}{\void}

Returns \true if the attribute object specifies either underlining or no underlining.

\membersection{wxRichTextAttr::HasWeight}\label{wxrichtextattrhasweight}

\constfunc{bool}{HasWeight}{\void}

Returns \true if the attribute object specifies font weight (bold, light or normal).

\membersection{wxRichTextAttr::Init}\label{wxrichtextattrinit}

\func{void}{Init}{\void}

Initialise the object.

\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}
}

\membersection{wxRichTextAttr::SetBackgroundColour}\label{wxrichtextattrsetbackgroundcolour}

\func{void}{SetBackgroundColour}{\param{const wxColour\& }{colBack}}

Sets the background colour.

\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           0x0000
#define wxTEXT_ATTR_BULLET_STYLE_ARABIC         0x0001
#define wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER  0x0002
#define wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER  0x0004
#define wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER    0x0008
#define wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER    0x0010
#define wxTEXT_ATTR_BULLET_STYLE_SYMBOL         0x0020
#define wxTEXT_ATTR_BULLET_STYLE_BITMAP         0x0040
#define wxTEXT_ATTR_BULLET_STYLE_PARENTHESES    0x0080
#define wxTEXT_ATTR_BULLET_STYLE_PERIOD         0x0100
\end{verbatim}
}

\membersection{wxRichTextAttr::SetBulletSymbol}\label{wxrichtextattrsetbulletsymbol}

\func{void}{SetBulletSymbol}{\param{wxChar }{symbol}}

Sets the paragraph symbol.

\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             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_BULLET_STYLE            0x00010000
#define wxTEXT_ATTR_BULLET_NUMBER           0x00020000
#define wxTEXT_ATTR_BULLET_SYMBOL           0x00040000
\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::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::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.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?