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