Added URL support to attribute objects and to wxRichTextCtrl,
generating a wxTextUrlEvent as appropriate. Added outline list support and updated previews. Added alignment support for bullets. Added single right parenthesis support. Added XML stylesheet reading/writing. Changed SetBulletSymbol to SetBulletText so it can support bullet text more generally (e.g. for cached outline list numbering) Added wxRichTextRenderer to isolate e.g. bullet drawing and make it customisable. Added event handler support to wxRichTextBuffer. Updated documentation. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -34,6 +34,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 +139,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}}
|
||||
@@ -194,6 +212,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 +238,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}
|
||||
@@ -329,6 +361,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 +409,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 +427,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}}
|
||||
@@ -446,6 +496,12 @@ used to determine the type to pass to \helpref{LoadFile}{wxrichtextbuffergetextw
|
||||
|
||||
Returns the list of file handlers.
|
||||
|
||||
\membersection{wxRichTextBuffer::GetRenderer}\label{wxrichtextbuffergetrenderer}
|
||||
|
||||
\func{static wxRichTextRenderer*}{GetRenderer}{\void}
|
||||
|
||||
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{wxRichTextAttr\& }{style}}
|
||||
@@ -596,6 +652,12 @@ Marks the buffer as modified or unmodified.
|
||||
|
||||
Pastes the clipboard content to the buffer at the given position.
|
||||
|
||||
\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}}
|
||||
@@ -638,6 +700,14 @@ 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::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}}
|
||||
|
Reference in New Issue
Block a user