1 \section{\class{wxRichTextFileHandler
}}\label{wxrichtextfilehandler
}
3 This is the base class for file handlers, for loading and/or saving content
4 associated with a
\helpref{wxRichTextBuffer
}{wxrichtextbuffer
}.
6 \wxheading{Derived from
}
8 \helpref{wxObject
}{wxobject
}
10 \wxheading{Include files
}
12 <wx/richtext/richtextbuffer.h>
14 \wxheading{Data structures
}
16 \latexignore{\rtfignore{\wxheading{Members
}}}
18 \membersection{wxRichTextFileHandler::wxRichTextFileHandler
}\label{wxrichtextfilehandlerwxrichtextfilehandler
}
20 \func{}{wxRichTextFileHandler
}{\param{const wxString\&
}{name = wxEmptyString
},
\param{const wxString\&
}{ext = wxEmptyString
},
\param{int
}{type =
0}}
24 \membersection{wxRichTextFileHandler::CanHandle
}\label{wxrichtextfilehandlercanhandle
}
26 \constfunc{bool
}{CanHandle
}{\param{const wxString\&
}{filename
}}
28 Override this function and return
\true if this handler can we handle
{\it filename
}. By default,
29 this function checks the extension.
31 \membersection{wxRichTextFileHandler::CanLoad
}\label{wxrichtextfilehandlercanload
}
33 \constfunc{bool
}{CanLoad
}{\void}
35 Override and return
\true if this handler can load content.
37 \membersection{wxRichTextFileHandler::CanSave
}\label{wxrichtextfilehandlercansave
}
39 \constfunc{bool
}{CanSave
}{\void}
41 Override and return
\true if this handler can save content.
43 \membersection{wxRichTextFileHandler::DoLoadFile
}\label{wxrichtextfilehandlerdoloadfile
}
45 \func{bool
}{DoLoadFile
}{\param{wxRichTextBuffer*
}{buffer
},
\param{wxInputStream\&
}{stream
}}
47 Override to load content from
{\it stream
} into
{\it buffer
}.
49 \membersection{wxRichTextFileHandler::DoSaveFile
}\label{wxrichtextfilehandlerdosavefile
}
51 \func{bool
}{DoSaveFile
}{\param{wxRichTextBuffer*
}{buffer
},
\param{wxOutputStream\&
}{stream
}}
53 Override to save content to
{\it stream
} from
{\it buffer
}.
55 \membersection{wxRichTextFileHandler::GetEncoding
}\label{wxrichtextfilehandlergetencoding
}
57 \constfunc{const wxString\&
}{GetEncoding
}{\void}
59 Returns the encoding associated with the handler (if any).
61 \membersection{wxRichTextFileHandler::GetExtension
}\label{wxrichtextfilehandlergetextension
}
63 \constfunc{wxString
}{GetExtension
}{\void}
65 Returns the extension associated with the handler.
67 \membersection{wxRichTextFileHandler::GetName
}\label{wxrichtextfilehandlergetname
}
69 \constfunc{wxString
}{GetName
}{\void}
71 Returns the name of the handler.
73 \membersection{wxRichTextFileHandler::GetType
}\label{wxrichtextfilehandlergettype
}
75 \constfunc{int
}{GetType
}{\void}
77 Returns the type of the handler.
79 \membersection{wxRichTextFileHandler::IsVisible
}\label{wxrichtextfilehandlerisvisible
}
81 \constfunc{bool
}{IsVisible
}{\void}
83 Returns
\true if this handler should be visible to the user.
85 \membersection{wxRichTextFileHandler::LoadFile
}\label{wxrichtextfilehandlerloadfile
}
87 \func{bool
}{LoadFile
}{\param{wxRichTextBuffer*
}{buffer
},
\param{wxInputStream\&
}{stream
}}
89 \func{bool
}{LoadFile
}{\param{wxRichTextBuffer*
}{buffer
},
\param{const wxString\&
}{filename
}}
91 Loads content from a stream or file. Not all handlers will implement file loading.
93 \membersection{wxRichTextFileHandler::SaveFile
}\label{wxrichtextfilehandlersavefile
}
95 \func{bool
}{SaveFile
}{\param{wxRichTextBuffer*
}{buffer
},
\param{wxOutputStream\&
}{stream
}}
97 \func{bool
}{SaveFile
}{\param{wxRichTextBuffer*
}{buffer
},
\param{const wxString\&
}{filename
}}
99 Saves content to a stream or file. Not all handlers will implement file saving.
101 \membersection{wxRichTextFileHandler::SetEncoding
}\label{wxrichtextfilehandlersetencoding
}
103 \func{void
}{SetEncoding
}{\param{const wxString\&
}{encoding
}}
105 Sets the encoding to use when saving a file. If empty, a suitable encoding is chosen.
107 \membersection{wxRichTextFileHandler::SetExtension
}\label{wxrichtextfilehandlersetextension
}
109 \func{void
}{SetExtension
}{\param{const wxString\&
}{ext
}}
111 Sets the default extension to recognise.
113 \membersection{wxRichTextFileHandler::SetName
}\label{wxrichtextfilehandlersetname
}
115 \func{void
}{SetName
}{\param{const wxString\&
}{name
}}
117 Sets the name of the handler.
119 \membersection{wxRichTextFileHandler::SetType
}\label{wxrichtextfilehandlersettype
}
121 \func{void
}{SetType
}{\param{int
}{type
}}
123 Sets the handler type.
125 \membersection{wxRichTextFileHandler::SetVisible
}\label{wxrichtextfilehandlersetvisible
}
127 \func{void
}{SetVisible
}{\param{bool
}{visible
}}
129 Sets whether the handler should be visible to the user (via the application's load and save