X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/62a268cc71a93c9fd2d696bc85b323e232f44a20..c266eff98c5e44012647f54f38a1e29ecabd8759:/docs/latex/wx/richtextbuffer.tex diff --git a/docs/latex/wx/richtextbuffer.tex b/docs/latex/wx/richtextbuffer.tex index c177b3f5e5..76b48fc6d3 100644 --- a/docs/latex/wx/richtextbuffer.tex +++ b/docs/latex/wx/richtextbuffer.tex @@ -10,11 +10,15 @@ wxRichTextParagraphLayoutBox +\wxheading{Library} + +\helpref{wxRichtext}{librarieslist} + \wxheading{Data structures} \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}}} @@ -34,6 +38,18 @@ Default constructors. 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 with +a contol has the control as the only event handler, but the application is free +to add more if further notification is required. All handlers are notified +of an event originating from the buffer, such as the replacement of a style sheet +during loading. The buffer never deletes any of the event handlers, unless +\helpref{wxRichTextBuffer::RemoveEventHandler}{wxrichtextbufferremoveeventhandler} is +called with \true as the second argument. + \membersection{wxRichTextBuffer::AddHandler}\label{wxrichtextbufferaddhandler} \func{void}{AddHandler}{\param{wxRichTextFileHandler* }{handler}} @@ -127,6 +143,12 @@ defined for convenience: \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}} @@ -142,16 +164,22 @@ application should take care of incrementing the numbering. {\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 +#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} } @@ -181,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. @@ -194,6 +222,13 @@ differently by each command. If not dealt with by a command implementation, then it will be implemented automatically by not storing the command in the undo history when 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}} @@ -213,6 +248,13 @@ Begins using the specified text foreground colour. 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} @@ -229,7 +271,23 @@ Cleans up the file handlers. \func{void}{Clear}{\void} -Clears the buffer and resets the command processor. +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. + +{\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. +\end{itemize} + +See also \helpref{wxRichTextBuffer::SetListStyle}{wxrichtextbuffersetliststyle}, \helpref{wxRichTextBuffer::PromoteList}{wxrichtextbufferpromotelist}, \helpref{wxRichTextBuffer::NumberList}{wxrichtextbuffernumberlist}. \membersection{wxRichTextBuffer::ClearStyleStack}\label{wxrichtextbufferclearstylestack} @@ -257,7 +315,7 @@ Copy the given range to the clipboard. \membersection{wxRichTextBuffer::DeleteRangeWithUndo}\label{wxrichtextbufferdeleterangewithundo} -\func{bool}{DeleteRangeWithUndo}{\param{const wxRichTextRange\& }{range}, \param{long }{initialCaretPosition}, \param{long }{newCaretPositon}, \param{wxRichTextCtrl* }{ctrl}} +\func{bool}{DeleteRangeWithUndo}{\param{const wxRichTextRange\& }{range}, \param{wxRichTextCtrl* }{ctrl}} Submits a command to delete the given range. @@ -329,6 +387,12 @@ Ends using a left indent. Ends using a line spacing. +\membersection{wxRichTextBuffer::EndListStyle}\label{wxrichtextbufferendliststyle} + +\func{bool}{EndListStyle}{\void} + +Ends using a specified list style. + \membersection{wxRichTextBuffer::EndNumberedBullet}\label{wxrichtextbufferendnumberedbullet} \func{bool}{EndNumberedBullet}{\void} @@ -371,6 +435,12 @@ Ends suppressing undo/redo commands. Ends using a symbol bullet. +\membersection{wxRichTextBuffer::EndStandardBullet}\label{wxrichtextbufferendstandardbullet} + +\func{bool}{EndStandardBullet}{\void} + +Ends using a standard bullet. + \membersection{wxRichTextBuffer::EndTextColour}\label{wxrichtextbufferendtextcolour} \func{bool}{EndTextColour}{\void} @@ -383,6 +453,12 @@ Ends using a text foreground colour. Ends using underline. +\membersection{wxRichTextBuffer::EndURL}\label{wxrichtextbufferendurl} + +\func{bool}{EndURL}{\void} + +Ends applying a URL. + \membersection{wxRichTextBuffer::FindHandler}\label{wxrichtextbufferfindhandler} \func{wxRichTextFileHandler*}{FindHandler}{\param{int }{imageType}} @@ -405,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 @@ -427,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). @@ -446,11 +522,15 @@ used to determine the type to pass to \helpref{LoadFile}{wxrichtextbuffergetextw Returns the list of file handlers. -\membersection{wxRichTextBuffer::GetStyle}\label{wxrichtextbuffergetstyle} +\membersection{wxRichTextBuffer::GetRenderer}\label{wxrichtextbuffergetrenderer} -\func{bool}{GetStyle}{\param{long }{position}, \param{wxRichTextAttr\& }{style}} +\func{static wxRichTextRenderer*}{GetRenderer}{\void} -\func{bool}{GetStyle}{\param{long }{position}, \param{wxTextAttrEx\& }{style}} +Returns the object to be used to render certain aspects of the content, such as bullets. + +\membersection{wxRichTextBuffer::GetStyle}\label{wxrichtextbuffergetstyle} + +\func{bool}{GetStyle}{\param{long }{position}, \param{wxTextAttr\& }{style}} Gets the attributes at the given position. @@ -460,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 @@ -495,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. @@ -528,6 +606,8 @@ The function returns one of the following values: #define wxRICHTEXT_HITTEST_AFTER 0x04 // The point was on the position returned from HitTest #define wxRICHTEXT_HITTEST_ON 0x08 +// The point was on space outside content +#define wxRICHTEXT_HITTEST_OUTSIDE 0x10 \end{verbatim} } @@ -590,23 +670,68 @@ Loads content from a file. 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 number +produces 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::Reset}\label{wxrichtextbufferreset} +\membersection{wxRichTextBuffer::ResetAndClearCommands}\label{wxrichtextbufferresetandclearcommands} -\func{void}{Reset}{\void} +\func{void}{ResetAndClearCommands}{\void} -The same as \helpref{Clear}{wxrichtextbufferclear}, plus an empty paragraph is added. +Clears the buffer, adds a new blank paragraph, and clears the command history. \membersection{wxRichTextBuffer::SaveFile}\label{wxrichtextbuffersavefile} @@ -620,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 @@ -631,47 +754,64 @@ 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). This is not cumulative - setting the default style will replace the previous default style. -\membersection{wxRichTextBuffer::SetStyle}\label{wxrichtextbuffersetstyle} +\membersection{wxRichTextBuffer::SetListStyle}\label{wxrichtextbuffersetliststyle} -\func{bool}{SetStyle}{\param{const wxRichTextRange\& }{range}, \param{const wxRichTextAttr\& }{style}, \param{int }{flags $=$ wxRICHTEXT\_SETSTYLE\_WITH\_UNDO}} +\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}{SetStyle}{\param{const wxRichTextRange\& }{range}, \param{const wxTextAttrEx\& }{style}, \param{int }{flags $=$ wxRICHTEXT\_SETSTYLE\_WITH\_UNDO}} +\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 attributes for the given range, passing flags to determine how the attributes are set. +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. -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} is a bit list of the following: -{\it flags} may contain a bit list of the following values: +\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} -\begin{verbatim} -#define wxRICHTEXT_SETSTYLE_NONE 0x00 +See also \helpref{wxRichTextBuffer::NumberList}{wxrichtextbuffernumberlist}, \helpref{wxRichTextBuffer::PromoteList}{wxrichtextbufferpromotelist}, \helpref{wxRichTextBuffer::ClearListStyle}{wxrichtextbufferclearliststyle}. -// Specifies that this operation should be undoable -#define wxRICHTEXT_SETSTYLE_WITH_UNDO 0x01 +\membersection{wxRichTextBuffer::SetRenderer}\label{wxrichtextbuffersetrenderer} -// Specifies that the style should not be applied if the -// combined style at this point is already the style in question. -#define wxRICHTEXT_SETSTYLE_OPTIMIZE 0x02 +\func{static void}{SetRenderer}{\param{wxRichTextRenderer* }{renderer}} -// 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. -#define wxRICHTEXT_SETSTYLE_PARAGRAPHS_ONLY 0x04 +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. -// 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. -#define wxRICHTEXT_SETSTYLE_CHARACTERS_ONLY 0x08 -\end{verbatim} +\membersection{wxRichTextBuffer::SetStyle}\label{wxrichtextbuffersetstyle} + +\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. + +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 the +combined 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. +\item wxRICHTEXT\_SETSTYLE\_REMOVE: removes the specified style. Only the style flags are used in this operation. +\end{itemize} \membersection{wxRichTextBuffer::SetStyleSheet}\label{wxrichtextbuffersetstylesheet}