]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/richtextfilehandler.tex
added support for binary data to wxConfig (slightly modified patch 1736788)
[wxWidgets.git] / docs / latex / wx / richtextfilehandler.tex
CommitLineData
5f35b46a
JS
1\section{\class{wxRichTextFileHandler}}\label{wxrichtextfilehandler}
2
3This is the base class for file handlers, for loading and/or saving content
4associated with a \helpref{wxRichTextBuffer}{wxrichtextbuffer}.
5
6\wxheading{Derived from}
7
8\helpref{wxObject}{wxobject}
9
10\wxheading{Include files}
11
12<wx/richtext/richtextbuffer.h>
13
14\wxheading{Data structures}
15
16\latexignore{\rtfignore{\wxheading{Members}}}
17
18\membersection{wxRichTextFileHandler::wxRichTextFileHandler}\label{wxrichtextfilehandlerwxrichtextfilehandler}
19
20\func{}{wxRichTextFileHandler}{\param{const wxString\& }{name = wxEmptyString}, \param{const wxString\& }{ext = wxEmptyString}, \param{int }{type = 0}}
21
22Constructor.
23
24\membersection{wxRichTextFileHandler::CanHandle}\label{wxrichtextfilehandlercanhandle}
25
26\constfunc{bool}{CanHandle}{\param{const wxString\& }{filename}}
27
28Override this function and return \true if this handler can we handle {\it filename}. By default,
29this function checks the extension.
30
31\membersection{wxRichTextFileHandler::CanLoad}\label{wxrichtextfilehandlercanload}
32
33\constfunc{bool}{CanLoad}{\void}
34
35Override and return \true if this handler can load content.
36
37\membersection{wxRichTextFileHandler::CanSave}\label{wxrichtextfilehandlercansave}
38
39\constfunc{bool}{CanSave}{\void}
40
41Override and return \true if this handler can save content.
42
43\membersection{wxRichTextFileHandler::DoLoadFile}\label{wxrichtextfilehandlerdoloadfile}
44
45\func{bool}{DoLoadFile}{\param{wxRichTextBuffer* }{buffer}, \param{wxInputStream\& }{stream}}
46
47Override to load content from {\it stream} into {\it buffer}.
48
49\membersection{wxRichTextFileHandler::DoSaveFile}\label{wxrichtextfilehandlerdosavefile}
50
51\func{bool}{DoSaveFile}{\param{wxRichTextBuffer* }{buffer}, \param{wxOutputStream\& }{stream}}
52
53Override to save content to {\it stream} from {\it buffer}.
54
55\membersection{wxRichTextFileHandler::GetEncoding}\label{wxrichtextfilehandlergetencoding}
56
57\constfunc{const wxString\&}{GetEncoding}{\void}
58
59Returns the encoding associated with the handler (if any).
60
61\membersection{wxRichTextFileHandler::GetExtension}\label{wxrichtextfilehandlergetextension}
62
63\constfunc{wxString}{GetExtension}{\void}
64
65Returns the extension associated with the handler.
66
1f65137f
JS
67\membersection{wxRichTextFileHandler::GetFlags}\label{wxrichtextfilehandlergetflags}
68
69\constfunc{int}{GetFlags}{\void}
70
71Returns flags that change the behaviour of loading or saving. See the documentation for each
72handler class to see what flags are relevant for each handler.
73
5f35b46a
JS
74\membersection{wxRichTextFileHandler::GetName}\label{wxrichtextfilehandlergetname}
75
76\constfunc{wxString}{GetName}{\void}
77
78Returns the name of the handler.
79
80\membersection{wxRichTextFileHandler::GetType}\label{wxrichtextfilehandlergettype}
81
82\constfunc{int}{GetType}{\void}
83
84Returns the type of the handler.
85
86\membersection{wxRichTextFileHandler::IsVisible}\label{wxrichtextfilehandlerisvisible}
87
88\constfunc{bool}{IsVisible}{\void}
89
90Returns \true if this handler should be visible to the user.
91
92\membersection{wxRichTextFileHandler::LoadFile}\label{wxrichtextfilehandlerloadfile}
93
94\func{bool}{LoadFile}{\param{wxRichTextBuffer* }{buffer}, \param{wxInputStream\& }{stream}}
95
96\func{bool}{LoadFile}{\param{wxRichTextBuffer* }{buffer}, \param{const wxString\& }{filename}}
97
98Loads content from a stream or file. Not all handlers will implement file loading.
99
100\membersection{wxRichTextFileHandler::SaveFile}\label{wxrichtextfilehandlersavefile}
101
102\func{bool}{SaveFile}{\param{wxRichTextBuffer* }{buffer}, \param{wxOutputStream\& }{stream}}
103
104\func{bool}{SaveFile}{\param{wxRichTextBuffer* }{buffer}, \param{const wxString\& }{filename}}
105
106Saves content to a stream or file. Not all handlers will implement file saving.
107
108\membersection{wxRichTextFileHandler::SetEncoding}\label{wxrichtextfilehandlersetencoding}
109
110\func{void}{SetEncoding}{\param{const wxString\& }{encoding}}
111
112Sets the encoding to use when saving a file. If empty, a suitable encoding is chosen.
113
114\membersection{wxRichTextFileHandler::SetExtension}\label{wxrichtextfilehandlersetextension}
115
116\func{void}{SetExtension}{\param{const wxString\& }{ext}}
117
118Sets the default extension to recognise.
119
1f65137f
JS
120\membersection{wxRichTextFileHandler::SetFlags}\label{wxrichtextfilehandlersetflags}
121
122\func{void}{SetFlags}{\param{int }{flags}}
123
124Sets flags that change the behaviour of loading or saving. See the documentation for each
125handler class to see what flags are relevant for each handler.
126
127You call this function directly if you are using a file handler explicitly (without
128going through the text control or buffer LoadFile/SaveFile API). Or, you can
129call the control or buffer's SetHandlerFlags function to set the flags that will
130be used for subsequent load and save operations.
131
5f35b46a
JS
132\membersection{wxRichTextFileHandler::SetName}\label{wxrichtextfilehandlersetname}
133
134\func{void}{SetName}{\param{const wxString\& }{name}}
135
136Sets the name of the handler.
137
138\membersection{wxRichTextFileHandler::SetType}\label{wxrichtextfilehandlersettype}
139
140\func{void}{SetType}{\param{int }{type}}
141
142Sets the handler type.
143
144\membersection{wxRichTextFileHandler::SetVisible}\label{wxrichtextfilehandlersetvisible}
145
146\func{void}{SetVisible}{\param{bool }{visible}}
147
148Sets whether the handler should be visible to the user (via the application's load and save
149dialogs).
62a268cc 150