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

📄 richtextbuffer.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
📖 第 1 页 / 共 3 页
字号:
by the paragraph. However the text colour attributes {\it will} be changed toshow red.\membersection{wxRichTextBuffer::GetStyleSheet}\label{wxrichtextbuffergetstylesheet}\constfunc{wxRichTextStyleSheet*}{GetStyleSheet}{\void}Returns the current style sheet associated with the buffer, if any.\membersection{wxRichTextBuffer::GetStyleStackSize}\label{wxrichtextbuffergetstylestacksize}\constfunc{size\_t}{GetStyleStackSize}{\void}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}}Gets the attributes at the given position.This function gets the {\it uncombined style} - that is, the attributes associated with theparagraph or character content, and not necessarily the combined attributes you see on thescreen. To get the combined attributes, use \helpref{GetStyle}{wxrichtextbuffergetstyle}.If you specify (any) paragraph attribute in {\it style}'s flags, this function will fetchthe paragraph attributes. Otherwise, it will return the character attributes.\membersection{wxRichTextBuffer::HitTest}\label{wxrichtextbufferhittest}\func{int}{HitTest}{\param{wxDC\& }{dc}, \param{const wxPoint\& }{pt}, \param{long\& }{textPosition}}Finds the text position for the given position, putting the position in {\it textPosition} ifone is found. {\it pt} is in logical units (a zero y position isat the beginning of the buffer).The function returns one of the following values:{\small\begin{verbatim}// The point was not on this object#define wxRICHTEXT_HITTEST_NONE     0x01// The point was before the position returned from HitTest#define wxRICHTEXT_HITTEST_BEFORE   0x02// The point was after the position returned from HitTest#define wxRICHTEXT_HITTEST_AFTER    0x04// The point was on the position returned from HitTest#define wxRICHTEXT_HITTEST_ON       0x08\end{verbatim}}\membersection{wxRichTextBuffer::Init}\label{wxrichtextbufferinit}\func{void}{Init}{\void}Initialisation.\membersection{wxRichTextBuffer::InitStandardHandlers}\label{wxrichtextbufferinitstandardhandlers}\func{void}{InitStandardHandlers}{\void}Initialises the standard handlers. Currently, only the plain text loading/saving handleris initialised by default.\membersection{wxRichTextBuffer::InsertHandler}\label{wxrichtextbufferinserthandler}\func{void}{InsertHandler}{\param{wxRichTextFileHandler* }{handler}}Inserts a handler at the front of the list.\membersection{wxRichTextBuffer::InsertImageWithUndo}\label{wxrichtextbufferinsertimagewithundo}\func{bool}{InsertImageWithUndo}{\param{long }{pos}, \param{const wxRichTextImageBlock\& }{imageBlock}, \param{wxRichTextCtrl* }{ctrl}}Submits a command to insert the given image.\membersection{wxRichTextBuffer::InsertNewlineWithUndo}\label{wxrichtextbufferinsertnewlinewithundo}\func{bool}{InsertNewlineWithUndo}{\param{long }{pos}, \param{wxRichTextCtrl* }{ctrl}}Submits a command to insert a newline.\membersection{wxRichTextBuffer::InsertTextWithUndo}\label{wxrichtextbufferinserttextwithundo}\func{bool}{InsertTextWithUndo}{\param{long }{pos}, \param{const wxString\& }{text}, \param{wxRichTextCtrl* }{ctrl}}Submits a command to insert the given text.\membersection{wxRichTextBuffer::IsModified}\label{wxrichtextbufferismodified}\constfunc{bool}{IsModified}{\void}Returns \true if the buffer has been modified.\membersection{wxRichTextBuffer::LoadFile}\label{wxrichtextbufferloadfile}\func{bool}{LoadFile}{\param{wxInputStream\& }{stream}, \param{int }{type = wxRICHTEXT\_TYPE\_ANY}}Loads content from a stream.\func{bool}{LoadFile}{\param{const wxString\& }{filename}, \param{int }{type = wxRICHTEXT\_TYPE\_ANY}}Loads content from a file.\membersection{wxRichTextBuffer::Modify}\label{wxrichtextbuffermodify}\func{void}{Modify}{\param{bool }{modify = true}}Marks the buffer as modified or unmodified.\membersection{wxRichTextBuffer::NumberList}\label{wxrichtextbuffernumberlist}\func{bool}{NumberList}{\param{const wxRichTextRange\& }{range}, \param{const wxRichTextListStyleDefinition* }{style}, \param{int }{flags $=$ wxRICHTEXT\_SETSTYLE\_WITH\_UNDO}, \param{int}{ startFrom = -1}, \param{int}{ listLevel = -1}}\func{bool}{Number}{\param{const wxRichTextRange\& }{range}, \param{const wxString\& }{styleName}, \param{int }{flags $=$ wxRICHTEXT\_SETSTYLE\_WITH\_UNDO}, \param{int}{ startFrom = -1}, \param{int}{ listLevel = -1}}Numbers the paragraphs in the given range. Pass flags to determine how the attributes are set.Either the style definition or the name of the style definition (in the current sheet) can be passed.{\it flags} is a bit list of the following:\begin{itemize}\itemsep=0pt\item wxRICHTEXT\_SETSTYLE\_WITH\_UNDO: specifies that this command will be undoable.\item wxRICHTEXT\_SETSTYLE\_RENUMBER: specifies that numbering should start from {\it startFrom}, otherwise existing attributes are used.\item wxRICHTEXT\_SETSTYLE\_SPECIFY\_LEVEL: specifies that {\it listLevel} should be used as the level for all paragraphs, otherwise the current indentation will be used.\end{itemize}See also \helpref{wxRichTextBuffer::SetListStyle}{wxrichtextbuffersetliststyle}, \helpref{wxRichTextBuffer::PromoteList}{wxrichtextbufferpromotelist}, \helpref{wxRichTextBuffer::ClearListStyle}{wxrichtextbufferclearliststyle}.\membersection{wxRichTextBuffer::PasteFromClipboard}\label{wxrichtextbufferpastefromclipboard}\func{bool}{PasteFromClipboard}{\param{long }{position}}Pastes the clipboard content to the buffer at the given position.\membersection{wxRichTextBuffer::PromoteList}\label{wxrichtextbufferpromotelist}\func{bool}{PromoteList}{\param{int}{ promoteBy}, \param{const wxRichTextRange\& }{range}, \param{const wxRichTextListStyleDefinition* }{style}, \param{int }{flags $=$ wxRICHTEXT\_SETSTYLE\_WITH\_UNDO}, \param{int}{ listLevel = -1}}\func{bool}{PromoteList}{\param{int}{ promoteBy}, \param{const wxRichTextRange\& }{range}, \param{const wxString\& }{styleName}, \param{int }{flags $=$ wxRICHTEXT\_SETSTYLE\_WITH\_UNDO}, \param{int}{ listLevel = -1}}Promotes or demotes the paragraphs in the given range. A positive {\it promoteBy} produces a smaller indent, and a negative numberproduces a larger indent. Pass flags to determine how the attributes are set.Either the style definition or the name of the style definition (in the current sheet) can be passed.{\it flags} is a bit list of the following:\begin{itemize}\itemsep=0pt\item wxRICHTEXT\_SETSTYLE\_WITH\_UNDO: specifies that this command will be undoable.\item wxRICHTEXT\_SETSTYLE\_RENUMBER: specifies that numbering should start from {\it startFrom}, otherwise existing attributes are used.\item wxRICHTEXT\_SETSTYLE\_SPECIFY\_LEVEL: specifies that {\it listLevel} should be used as the level for all paragraphs, otherwise the current indentation will be used.\end{itemize}See also \helpref{wxRichTextBuffer::SetListStyle}{wxrichtextbuffersetliststyle}, See also \helpref{wxRichTextBuffer::SetListStyle}{wxrichtextbuffernumberlist}, \helpref{wxRichTextBuffer::ClearListStyle}{wxrichtextbufferclearliststyle}.\membersection{wxRichTextBuffer::RemoveEventHandler}\label{wxrichtextbufferremoveeventhandler}\func{bool}{RemoveEventHandler}{\param{wxEvtHandler* }{handler}, \param{bool}{ deleteHandler = false}}Removes an event handler from the buffer's list of handlers, deleting the object if {\it deleteHandler} is \true.\membersection{wxRichTextBuffer::RemoveHandler}\label{wxrichtextbufferremovehandler}\func{bool}{RemoveHandler}{\param{const wxString\& }{name}}Removes a handler.\membersection{wxRichTextBuffer::ResetAndClearCommands}\label{wxrichtextbufferresetandclearcommands}\func{void}{ResetAndClearCommands}{\void}Clears the buffer, adds a new blank paragraph, and clears the command history.\membersection{wxRichTextBuffer::SaveFile}\label{wxrichtextbuffersavefile}\func{bool}{SaveFile}{\param{wxOutputStream\& }{stream}, \param{int }{type = wxRICHTEXT\_TYPE\_ANY}}Saves content to a stream.\func{bool}{SaveFile}{\param{const wxString\& }{filename}, \param{int }{type = wxRICHTEXT\_TYPE\_ANY}}Saves content to a file.\membersection{wxRichTextBuffer::SetBasicStyle}\label{wxrichtextbuffersetbasicstyle}\func{void}{SetBasicStyle}{\param{const wxRichTextAttr\& }{style}}\func{void}{SetBasicStyle}{\param{const wxTextAttrEx\& }{style}}Sets the basic (overall) style. This is the style of the wholebuffer before further styles are applied, unlike the default style, whichonly affects the style currently being applied (for example, setting the defaultstyle to bold will cause subsequently inserted text to be bold).\membersection{wxRichTextBuffer::SetDefaultStyle}\label{wxrichtextbuffersetdefaultstyle}\func{void}{SetDefaultStyle}{\param{const wxTextAttrEx\& }{style}}Sets the default style, affecting the style currently being applied (for example, setting the defaultstyle to bold will cause subsequently inserted text to be bold).This is not cumulative - setting the default style will replace the previous default style.\membersection{wxRichTextBuffer::SetListStyle}\label{wxrichtextbuffersetliststyle}\func{bool}{SetListStyle}{\param{const wxRichTextRange\& }{range}, \param{const wxRichTextListStyleDefinition* }{style}, \param{int }{flags $=$ wxRICHTEXT\_SETSTYLE\_WITH\_UNDO}, \param{int}{ startFrom = -1}, \param{int}{ listLevel = -1}}\func{bool}{SetListStyle}{\param{const wxRichTextRange\& }{range}, \param{const wxString\& }{styleName}, \param{int }{flags $=$ wxRICHTEXT\_SETSTYLE\_WITH\_UNDO}, \param{int}{ startFrom = -1}, \param{int}{ listLevel = -1}}Sets the list attributes for the given range, passing flags to determine how the attributes are set.Either the style definition or the name of the style definition (in the current sheet) can be passed.{\it flags} is a bit list of the following:\begin{itemize}\itemsep=0pt\item wxRICHTEXT\_SETSTYLE\_WITH\_UNDO: specifies that this command will be undoable.\item wxRICHTEXT\_SETSTYLE\_RENUMBER: specifies that numbering should start from {\it startFrom}, otherwise existing attributes are used.\item wxRICHTEXT\_SETSTYLE\_SPECIFY\_LEVEL: specifies that {\it listLevel} should be used as the level for all paragraphs, otherwise the current indentation will be used.\end{itemize}See also \helpref{wxRichTextBuffer::NumberList}{wxrichtextbuffernumberlist}, \helpref{wxRichTextBuffer::PromoteList}{wxrichtextbufferpromotelist}, \helpref{wxRichTextBuffer::ClearListStyle}{wxrichtextbufferclearliststyle}.\membersection{wxRichTextBuffer::SetRenderer}\label{wxrichtextbuffersetrenderer}\func{static void}{SetRenderer}{\param{wxRichTextRenderer* }{renderer}}Sets {\it renderer} as the object to be used to render certain aspects of the content, such as bullets.You can override default rendering by deriving a new class from wxRichTextRenderer or wxRichTextStdRenderer,overriding one or more virtual functions, and setting an instance of the class using this function.\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}}Sets the attributes for the given range. Pass 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.So, for example, to set the style for a character at position 5, use the range (5,5).This differs from the wxRichTextCtrl API, where you would specify (5,6).{\it flags} may contain a bit list of the following values:\begin{itemize}\itemsep=0pt\item wxRICHTEXT\_SETSTYLE\_NONE: no style flag.\item wxRICHTEXT\_SETSTYLE\_WITH\_UNDO: specifies that this operation should be undoable.\item wxRICHTEXT\_SETSTYLE\_OPTIMIZE: specifies that the style should not be applied if thecombined style at this point is already the style in question.\item wxRICHTEXT\_SETSTYLE\_PARAGRAPHS\_ONLY: specifies that the style should only be applied to paragraphs,and not the content. This allows content styling to be preserved independently from that of e.g. a named paragraph style.\item wxRICHTEXT\_SETSTYLE\_CHARACTERS\_ONLY: specifies that the style should only be applied to characters,and not the paragraph. This allows content styling to be preserved independently from that of e.g. a named paragraph style.\item wxRICHTEXT\_SETSTYLE\_RESET: resets (clears) the existing style before applying the new style.\end{itemize}\membersection{wxRichTextBuffer::SetStyleSheet}\label{wxrichtextbuffersetstylesheet}\func{void}{SetStyleSheet}{\param{wxRichTextStyleSheet* }{styleSheet}}Sets the current style sheet, if any. This will allow the application to usenamed character and paragraph styles found in the style sheet.\membersection{wxRichTextBuffer::SubmitAction}\label{wxrichtextbuffersubmitaction}\func{bool}{SubmitAction}{\param{wxRichTextAction* }{action}}Submit an action immediately, or delay it according to whether collapsing is on.\membersection{wxRichTextBuffer::SuppressingUndo}\label{wxrichtextbuffersuppressingundo}\constfunc{bool}{SuppressingUndo}{\void}Returns \true if undo suppression is currently on.

⌨️ 快捷键说明

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