1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
|
\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::GetFlags}\label{wxrichtextfilehandlergetflags}
\constfunc{int}{GetFlags}{\void}
Returns flags that change the behaviour of loading or saving. See the documentation for each
handler class to see what flags are relevant for each 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::SetFlags}\label{wxrichtextfilehandlersetflags}
\func{void}{SetFlags}{\param{int }{flags}}
Sets flags that change the behaviour of loading or saving. See the documentation for each
handler class to see what flags are relevant for each handler.
You call this function directly if you are using a file handler explicitly (without
going through the text control or buffer LoadFile/SaveFile API). Or, you can
call the control or buffer's SetHandlerFlags function to set the flags that will
be used for subsequent load and save operations.
\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).
|