]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/richtextfilehandler.tex
fix refcountlist subsection location
[wxWidgets.git] / docs / latex / wx / richtextfilehandler.tex
1 \section{\class{wxRichTextFileHandler}}\label{wxrichtextfilehandler}
2
3 This is the base class for file handlers, for loading and/or saving content
4 associated 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
22 Constructor.
23
24 \membersection{wxRichTextFileHandler::CanHandle}\label{wxrichtextfilehandlercanhandle}
25
26 \constfunc{bool}{CanHandle}{\param{const wxString\& }{filename}}
27
28 Override this function and return \true if this handler can we handle {\it filename}. By default,
29 this function checks the extension.
30
31 \membersection{wxRichTextFileHandler::CanLoad}\label{wxrichtextfilehandlercanload}
32
33 \constfunc{bool}{CanLoad}{\void}
34
35 Override and return \true if this handler can load content.
36
37 \membersection{wxRichTextFileHandler::CanSave}\label{wxrichtextfilehandlercansave}
38
39 \constfunc{bool}{CanSave}{\void}
40
41 Override 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
47 Override 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
53 Override to save content to {\it stream} from {\it buffer}.
54
55 \membersection{wxRichTextFileHandler::GetEncoding}\label{wxrichtextfilehandlergetencoding}
56
57 \constfunc{const wxString\&}{GetEncoding}{\void}
58
59 Returns the encoding associated with the handler (if any).
60
61 \membersection{wxRichTextFileHandler::GetExtension}\label{wxrichtextfilehandlergetextension}
62
63 \constfunc{wxString}{GetExtension}{\void}
64
65 Returns the extension associated with the handler.
66
67 \membersection{wxRichTextFileHandler::GetName}\label{wxrichtextfilehandlergetname}
68
69 \constfunc{wxString}{GetName}{\void}
70
71 Returns the name of the handler.
72
73 \membersection{wxRichTextFileHandler::GetType}\label{wxrichtextfilehandlergettype}
74
75 \constfunc{int}{GetType}{\void}
76
77 Returns the type of the handler.
78
79 \membersection{wxRichTextFileHandler::IsVisible}\label{wxrichtextfilehandlerisvisible}
80
81 \constfunc{bool}{IsVisible}{\void}
82
83 Returns \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
91 Loads 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
99 Saves 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
105 Sets 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
111 Sets the default extension to recognise.
112
113 \membersection{wxRichTextFileHandler::SetName}\label{wxrichtextfilehandlersetname}
114
115 \func{void}{SetName}{\param{const wxString\& }{name}}
116
117 Sets the name of the handler.
118
119 \membersection{wxRichTextFileHandler::SetType}\label{wxrichtextfilehandlersettype}
120
121 \func{void}{SetType}{\param{int }{type}}
122
123 Sets the handler type.
124
125 \membersection{wxRichTextFileHandler::SetVisible}\label{wxrichtextfilehandlersetvisible}
126
127 \func{void}{SetVisible}{\param{bool }{visible}}
128
129 Sets whether the handler should be visible to the user (via the application's load and save
130 dialogs).
131