]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/richtextfilehandler.tex
real LaTeX fix to last commit
[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
67\membersection{wxRichTextFileHandler::GetName}\label{wxrichtextfilehandlergetname}
68
69\constfunc{wxString}{GetName}{\void}
70
71Returns the name of the handler.
72
73\membersection{wxRichTextFileHandler::GetType}\label{wxrichtextfilehandlergettype}
74
75\constfunc{int}{GetType}{\void}
76
77Returns the type of the handler.
78
79\membersection{wxRichTextFileHandler::IsVisible}\label{wxrichtextfilehandlerisvisible}
80
81\constfunc{bool}{IsVisible}{\void}
82
83Returns \true if this handler should be visible to the user.
84
85\membersection{wxRichTextFileHandler::LoadFile}\label{wxrichtextfilehandlerloadfile}
86
87\func{bool}{LoadFile}{\param{wxRichTextBuffer* }{buffer}, \param{wxInputStream\& }{stream}}
88
89\func{bool}{LoadFile}{\param{wxRichTextBuffer* }{buffer}, \param{const wxString\& }{filename}}
90
91Loads content from a stream or file. Not all handlers will implement file loading.
92
93\membersection{wxRichTextFileHandler::SaveFile}\label{wxrichtextfilehandlersavefile}
94
95\func{bool}{SaveFile}{\param{wxRichTextBuffer* }{buffer}, \param{wxOutputStream\& }{stream}}
96
97\func{bool}{SaveFile}{\param{wxRichTextBuffer* }{buffer}, \param{const wxString\& }{filename}}
98
99Saves content to a stream or file. Not all handlers will implement file saving.
100
101\membersection{wxRichTextFileHandler::SetEncoding}\label{wxrichtextfilehandlersetencoding}
102
103\func{void}{SetEncoding}{\param{const wxString\& }{encoding}}
104
105Sets the encoding to use when saving a file. If empty, a suitable encoding is chosen.
106
107\membersection{wxRichTextFileHandler::SetExtension}\label{wxrichtextfilehandlersetextension}
108
109\func{void}{SetExtension}{\param{const wxString\& }{ext}}
110
111Sets the default extension to recognise.
112
113\membersection{wxRichTextFileHandler::SetName}\label{wxrichtextfilehandlersetname}
114
115\func{void}{SetName}{\param{const wxString\& }{name}}
116
117Sets the name of the handler.
118
119\membersection{wxRichTextFileHandler::SetType}\label{wxrichtextfilehandlersettype}
120
121\func{void}{SetType}{\param{int }{type}}
122
123Sets the handler type.
124
125\membersection{wxRichTextFileHandler::SetVisible}\label{wxrichtextfilehandlersetvisible}
126
127\func{void}{SetVisible}{\param{bool }{visible}}
128
129Sets whether the handler should be visible to the user (via the application's load and save
130dialogs).