62a268cc71
Added rich text control formatting and symbol dialogs API changes for wxRichTextCtrl git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
132 lines
4.3 KiB
TeX
132 lines
4.3 KiB
TeX
\section{\class{wxRichTextFileHandler}}\label{wxrichtextfilehandler}
|
|
|
|
This is the base class for file handlers, for loading and/or saving content
|
|
associated with a \helpref{wxRichTextBuffer}{wxrichtextbuffer}.
|
|
|
|
\wxheading{Derived from}
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
\wxheading{Include files}
|
|
|
|
<wx/richtext/richtextbuffer.h>
|
|
|
|
\wxheading{Data structures}
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
\membersection{wxRichTextFileHandler::wxRichTextFileHandler}\label{wxrichtextfilehandlerwxrichtextfilehandler}
|
|
|
|
\func{}{wxRichTextFileHandler}{\param{const wxString\& }{name = wxEmptyString}, \param{const wxString\& }{ext = wxEmptyString}, \param{int }{type = 0}}
|
|
|
|
Constructor.
|
|
|
|
\membersection{wxRichTextFileHandler::CanHandle}\label{wxrichtextfilehandlercanhandle}
|
|
|
|
\constfunc{bool}{CanHandle}{\param{const wxString\& }{filename}}
|
|
|
|
Override this function and return \true if this handler can we handle {\it filename}. By default,
|
|
this function checks the extension.
|
|
|
|
\membersection{wxRichTextFileHandler::CanLoad}\label{wxrichtextfilehandlercanload}
|
|
|
|
\constfunc{bool}{CanLoad}{\void}
|
|
|
|
Override and return \true if this handler can load content.
|
|
|
|
\membersection{wxRichTextFileHandler::CanSave}\label{wxrichtextfilehandlercansave}
|
|
|
|
\constfunc{bool}{CanSave}{\void}
|
|
|
|
Override and return \true if this handler can save content.
|
|
|
|
\membersection{wxRichTextFileHandler::DoLoadFile}\label{wxrichtextfilehandlerdoloadfile}
|
|
|
|
\func{bool}{DoLoadFile}{\param{wxRichTextBuffer* }{buffer}, \param{wxInputStream\& }{stream}}
|
|
|
|
Override to load content from {\it stream} into {\it buffer}.
|
|
|
|
\membersection{wxRichTextFileHandler::DoSaveFile}\label{wxrichtextfilehandlerdosavefile}
|
|
|
|
\func{bool}{DoSaveFile}{\param{wxRichTextBuffer* }{buffer}, \param{wxOutputStream\& }{stream}}
|
|
|
|
Override to save content to {\it stream} from {\it buffer}.
|
|
|
|
\membersection{wxRichTextFileHandler::GetEncoding}\label{wxrichtextfilehandlergetencoding}
|
|
|
|
\constfunc{const wxString\&}{GetEncoding}{\void}
|
|
|
|
Returns the encoding associated with the handler (if any).
|
|
|
|
\membersection{wxRichTextFileHandler::GetExtension}\label{wxrichtextfilehandlergetextension}
|
|
|
|
\constfunc{wxString}{GetExtension}{\void}
|
|
|
|
Returns the extension associated with the handler.
|
|
|
|
\membersection{wxRichTextFileHandler::GetName}\label{wxrichtextfilehandlergetname}
|
|
|
|
\constfunc{wxString}{GetName}{\void}
|
|
|
|
Returns the name of the handler.
|
|
|
|
\membersection{wxRichTextFileHandler::GetType}\label{wxrichtextfilehandlergettype}
|
|
|
|
\constfunc{int}{GetType}{\void}
|
|
|
|
Returns the type of the handler.
|
|
|
|
\membersection{wxRichTextFileHandler::IsVisible}\label{wxrichtextfilehandlerisvisible}
|
|
|
|
\constfunc{bool}{IsVisible}{\void}
|
|
|
|
Returns \true if this handler should be visible to the user.
|
|
|
|
\membersection{wxRichTextFileHandler::LoadFile}\label{wxrichtextfilehandlerloadfile}
|
|
|
|
\func{bool}{LoadFile}{\param{wxRichTextBuffer* }{buffer}, \param{wxInputStream\& }{stream}}
|
|
|
|
\func{bool}{LoadFile}{\param{wxRichTextBuffer* }{buffer}, \param{const wxString\& }{filename}}
|
|
|
|
Loads content from a stream or file. Not all handlers will implement file loading.
|
|
|
|
\membersection{wxRichTextFileHandler::SaveFile}\label{wxrichtextfilehandlersavefile}
|
|
|
|
\func{bool}{SaveFile}{\param{wxRichTextBuffer* }{buffer}, \param{wxOutputStream\& }{stream}}
|
|
|
|
\func{bool}{SaveFile}{\param{wxRichTextBuffer* }{buffer}, \param{const wxString\& }{filename}}
|
|
|
|
Saves content to a stream or file. Not all handlers will implement file saving.
|
|
|
|
\membersection{wxRichTextFileHandler::SetEncoding}\label{wxrichtextfilehandlersetencoding}
|
|
|
|
\func{void}{SetEncoding}{\param{const wxString\& }{encoding}}
|
|
|
|
Sets the encoding to use when saving a file. If empty, a suitable encoding is chosen.
|
|
|
|
\membersection{wxRichTextFileHandler::SetExtension}\label{wxrichtextfilehandlersetextension}
|
|
|
|
\func{void}{SetExtension}{\param{const wxString\& }{ext}}
|
|
|
|
Sets the default extension to recognise.
|
|
|
|
\membersection{wxRichTextFileHandler::SetName}\label{wxrichtextfilehandlersetname}
|
|
|
|
\func{void}{SetName}{\param{const wxString\& }{name}}
|
|
|
|
Sets the name of the handler.
|
|
|
|
\membersection{wxRichTextFileHandler::SetType}\label{wxrichtextfilehandlersettype}
|
|
|
|
\func{void}{SetType}{\param{int }{type}}
|
|
|
|
Sets the handler type.
|
|
|
|
\membersection{wxRichTextFileHandler::SetVisible}\label{wxrichtextfilehandlersetvisible}
|
|
|
|
\func{void}{SetVisible}{\param{bool }{visible}}
|
|
|
|
Sets whether the handler should be visible to the user (via the application's load and save
|
|
dialogs).
|
|
|