⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 richtextbuffer.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
📖 第 1 页 / 共 3 页
字号:
\section{\class{wxRichTextBuffer}}\label{wxrichtextbuffer}This class represents the whole buffer associated with a \helpref{wxRichTextCtrl}{wxrichtextctrl}.\wxheading{Derived from}wxRichTextParagraphLayoutBox\wxheading{Include files}<wx/richtext/richtextbuffer.h>\wxheading{Data structures}\wxheading{See also}\helpref{wxTextAttr}{wxtextattr}, \helpref{wxTextAttrEx}{wxtextattrex}, \helpref{wxRichTextAttr}{wxrichtextattr}, \helpref{wxRichTextCtrl}{wxrichtextctrl}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxRichTextBuffer::wxRichTextBuffer}\label{wxrichtextbufferwxrichtextbuffer}\func{}{wxRichTextBuffer}{\param{const wxRichTextBuffer\& }{obj}}Copy constructor.\func{}{wxRichTextBuffer}{\void}Default constructors.\membersection{wxRichTextBuffer::\destruct{wxRichTextBuffer}}\label{wxrichtextbufferdtor}\func{}{\destruct{wxRichTextBuffer}}{\void}Destructor.\membersection{wxRichTextBuffer::AddEventHandler}\label{wxrichtextbufferaddeventhandler}\func{bool}{AddEventHandler}{\param{wxEvtHandler* }{handler}}Adds an event handler to the buffer's list of handlers. A buffer associated witha contol has the control as the only event handler, but the application is freeto add more if further notification is required. All handlers are notifiedof an event originating from the buffer, such as the replacement of a style sheetduring loading. The buffer never deletes any of the event handlers, unless \helpref{wxRichTextBuffer::RemoveEventHandler}{wxrichtextbufferremoveeventhandler} iscalled with \true as the second argument.\membersection{wxRichTextBuffer::AddHandler}\label{wxrichtextbufferaddhandler}\func{void}{AddHandler}{\param{wxRichTextFileHandler* }{handler}}Adds a file handler.\membersection{wxRichTextBuffer::AddParagraph}\label{wxrichtextbufferaddparagraph}\func{wxRichTextRange}{AddParagraph}{\param{const wxString\& }{text}}Adds a paragraph of text.\membersection{wxRichTextBuffer::BatchingUndo}\label{wxrichtextbufferbatchingundo}\constfunc{bool}{BatchingUndo}{\void}Returns \true if the buffer is currently collapsing commands into a single notional command.\membersection{wxRichTextBuffer::BeginAlignment}\label{wxrichtextbufferbeginalignment}\func{bool}{BeginAlignment}{\param{wxTextAttrAlignment }{alignment}}Begins using alignment.\membersection{wxRichTextBuffer::BeginBatchUndo}\label{wxrichtextbufferbeginbatchundo}\func{bool}{BeginBatchUndo}{\param{const wxString\& }{cmdName}}Begins collapsing undo/redo commands. Note that this may not work properlyif combining commands that delete or insert content, changing ranges forsubsequent actions.{\it cmdName} should be the name of the combined command that will appearnext to Undo and Redo in the edit menu.\membersection{wxRichTextBuffer::BeginBold}\label{wxrichtextbufferbeginbold}\func{bool}{BeginBold}{\void}Begin applying bold.\membersection{wxRichTextBuffer::BeginCharacterStyle}\label{wxrichtextbufferbegincharacterstyle}\func{bool}{BeginCharacterStyle}{\param{const wxString\& }{characterStyle}}Begins applying the named character style.\membersection{wxRichTextBuffer::BeginFont}\label{wxrichtextbufferbeginfont}\func{bool}{BeginFont}{\param{const wxFont\& }{font}}Begins using this font.\membersection{wxRichTextBuffer::BeginFontSize}\label{wxrichtextbufferbeginfontsize}\func{bool}{BeginFontSize}{\param{int }{pointSize}}Begins using the given point size.\membersection{wxRichTextBuffer::BeginItalic}\label{wxrichtextbufferbeginitalic}\func{bool}{BeginItalic}{\void}Begins using italic.\membersection{wxRichTextBuffer::BeginLeftIndent}\label{wxrichtextbufferbeginleftindent}\func{bool}{BeginLeftIndent}{\param{int }{leftIndent}, \param{int }{leftSubIndent = 0}}Begin using {\it leftIndent} for the left indent, and optionally {\it leftSubIndent} forthe sub-indent. Both are expressed in tenths of a millimetre.The sub-indent is an offset from the left of the paragraph, and is used for all but thefirst line in a paragraph. A positive value will cause the first line to appear to the leftof the subsequent lines, and a negative value will cause the first line to be indentedrelative to the subsequent lines.\membersection{wxRichTextBuffer::BeginLineSpacing}\label{wxrichtextbufferbeginlinespacing}\func{bool}{BeginLineSpacing}{\param{int }{lineSpacing}}Begins line spacing using the specified value. {\it spacing} is a multiple, where 10 means single-spacing,15 means 1.5 spacing, and 20 means double spacing. The following constants aredefined 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{wxRichTextBuffer::BeginListStyle}\label{wxrichtextbufferbeginliststyle}\func{bool}{BeginListStyle}{\param{const wxString\&}{ listStyle}, \param{int}{ level=1}, \param{int}{ number=1}}Begins using a specified list style. Optionally, you can also pass a level and a number.\membersection{wxRichTextBuffer::BeginNumberedBullet}\label{wxrichtextbufferbeginnumberedbullet}\func{bool}{BeginNumberedBullet}{\param{int }{bulletNumber}, \param{int }{leftIndent}, \param{int }{leftSubIndent}, \param{int }{bulletStyle = wxTEXT\_ATTR\_BULLET\_STYLE\_ARABIC|wxTEXT\_ATTR\_BULLET\_STYLE\_PERIOD}}Begins a numbered bullet. This call will be needed for each item in the list, and theapplication should take care of incrementing the numbering.{\it bulletNumber} is a number, usually starting with 1.{\it leftIndent} and {\it leftSubIndent} are values in tenths of a millimetre.{\it bulletStyle} is a bitlist of the following values:{\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}}wxRichTextBuffer uses indentation to render a bulleted item. The left indent is the distance betweenthe margin and the bullet. The content of the paragraph, including the first line, startsat leftMargin + leftSubIndent. So the distance between the left edge of the bullet and theleft of the actual paragraph is leftSubIndent.\membersection{wxRichTextBuffer::BeginParagraphSpacing}\label{wxrichtextbufferbeginparagraphspacing}\func{bool}{BeginParagraphSpacing}{\param{int }{before}, \param{int }{after}}Begins paragraph spacing; pass the before-paragraph and after-paragraph spacing in tenths ofa millimetre.\membersection{wxRichTextBuffer::BeginParagraphStyle}\label{wxrichtextbufferbeginparagraphstyle}\func{bool}{BeginParagraphStyle}{\param{const wxString\& }{paragraphStyle}}Begins applying the named paragraph style.\membersection{wxRichTextBuffer::BeginRightIndent}\label{wxrichtextbufferbeginrightindent}\func{bool}{BeginRightIndent}{\param{int }{rightIndent}}Begins a right indent, specified in tenths of a millimetre.\membersection{wxRichTextBuffer::BeginStyle}\label{wxrichtextbufferbeginstyle}\func{bool}{BeginStyle}{\param{const wxTextAttrEx\& }{style}}Begins using a specified style.\membersection{wxRichTextBuffer::BeginSuppressUndo}\label{wxrichtextbufferbeginsuppressundo}\func{bool}{BeginSuppressUndo}{\void}Begins suppressing undo/redo commands. The way undo is suppressed may be implementeddifferently by each command. If not dealt with by a command implementation, thenit will be implemented automatically by not storing the command in the undo historywhen the action is submitted to the command processor.\membersection{wxRichTextBuffer::BeginStandardBullet}\label{wxrichtextbufferbeginstandardbullet}\func{bool}{BeginStandardBullet}{\param{const wxString\&}{ bulletName}, \param{int }{leftIndent}, \param{int }{leftSubIndent}, \param{int }{bulletStyle = wxTEXT\_ATTR\_BULLET\_STYLE\_STANDARD}}Begins applying a standard bullet, using one of the standard bullet names (currently {\tt standard/circle} or {\tt standard/square}.See \helpref{BeginNumberedBullet}{wxrichtextbufferbeginnumberedbullet} for an explanation of how indentation is used to render the bulleted paragraph.\membersection{wxRichTextBuffer::BeginSymbolBullet}\label{wxrichtextbufferbeginsymbolbullet}\func{bool}{BeginSymbolBullet}{\param{wxChar }{symbol}, \param{int }{leftIndent}, \param{int }{leftSubIndent}, \param{int }{bulletStyle = wxTEXT\_ATTR\_BULLET\_STYLE\_SYMBOL}}Begins applying a symbol bullet, using a character from the current font. See \helpref{BeginNumberedBullet}{wxrichtextbufferbeginnumberedbullet} foran explanation of how indentation is used to render the bulleted paragraph.\membersection{wxRichTextBuffer::BeginTextColour}\label{wxrichtextbufferbegintextcolour}\func{bool}{BeginTextColour}{\param{const wxColour\& }{colour}}Begins using the specified text foreground colour.\membersection{wxRichTextBuffer::BeginUnderline}\label{wxrichtextbufferbeginunderline}\func{bool}{BeginUnderline}{\void}Begins using underline.\membersection{wxRichTextBuffer::BeginURL}\label{wxrichtextbufferbeginurl}\func{bool}{BeginURL}{\param{const wxString\&}{ url}, \param{const wxString\&}{ characterStyle = wxEmptyString}}Begins applying wxTEXT\_ATTR\_URL to the content. Pass a URL and optionally, a character style to apply,since it is common to mark a URL with a familiar style such as blue text with underlining.\membersection{wxRichTextBuffer::CanPasteFromClipboard}\label{wxrichtextbuffercanpastefromclipboard}\constfunc{bool}{CanPasteFromClipboard}{\void}Returns \true if content can be pasted from the clipboard.\membersection{wxRichTextBuffer::CleanUpHandlers}\label{wxrichtextbuffercleanuphandlers}\func{void}{CleanUpHandlers}{\void}Cleans up the file handlers.\membersection{wxRichTextBuffer::Clear}\label{wxrichtextbufferclear}\func{void}{Clear}{\void}Clears the buffer.\membersection{wxRichTextBuffer::ClearListStyle}\label{wxrichtextbufferclearliststyle}\func{bool}{ClearListStyle}{\param{const wxRichTextRange\& }{range}, \param{int }{flags $=$ wxRICHTEXT\_SETSTYLE\_WITH\_UNDO}}\func{bool}{ClearListStyle}{\param{const wxRichTextRange\& }{range}, \param{int }{flags $=$ wxRICHTEXT\_SETSTYLE\_WITH\_UNDO}}Clears the list style from the given range, clearing list-related attributes and applying any named paragraph style associated with each paragraph.

⌨️ 快捷键说明

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