wxRichTextFileHandlerThis is the base class for file handlers, for loading and/or saving content associated with a wxRichTextBuffer. Derived from Include files <wx/richtext/richtextbuffer.h> Data structures Members
wxRichTextFileHandler::wxRichTextFileHandler
wxRichTextFileHandler::wxRichTextFileHandlerwxRichTextFileHandler(const wxString& name = wxEmptyString, const wxString& ext = wxEmptyString, int type = 0) Constructor.
wxRichTextFileHandler::CanHandlebool CanHandle(const wxString& filename) const Override this function and return true if this handler can we handle filename. By default, this function checks the extension.
wxRichTextFileHandler::CanLoadbool CanLoad() const Override and return true if this handler can load content.
wxRichTextFileHandler::CanSavebool CanSave() const Override and return true if this handler can save content.
wxRichTextFileHandler::DoLoadFilebool DoLoadFile(wxRichTextBuffer* buffer, wxInputStream& stream) Override to load content from stream into buffer.
wxRichTextFileHandler::DoSaveFilebool DoSaveFile(wxRichTextBuffer* buffer, wxOutputStream& stream) Override to save content to stream from buffer.
wxRichTextFileHandler::GetEncodingconst wxString& GetEncoding() const Returns the encoding associated with the handler (if any).
wxRichTextFileHandler::GetExtensionwxString GetExtension() const Returns the extension associated with the handler.
wxRichTextFileHandler::GetFlagsint GetFlags() const Returns flags that change the behaviour of loading or saving. See the documentation for each handler class to see what flags are relevant for each handler.
wxRichTextFileHandler::GetNamewxString GetName() const Returns the name of the handler.
wxRichTextFileHandler::GetTypeint GetType() const Returns the type of the handler.
wxRichTextFileHandler::IsVisiblebool IsVisible() const Returns true if this handler should be visible to the user.
wxRichTextFileHandler::LoadFilebool LoadFile(wxRichTextBuffer* buffer, wxInputStream& stream) bool LoadFile(wxRichTextBuffer* buffer, const wxString& filename) Loads content from a stream or file. Not all handlers will implement file loading.
wxRichTextFileHandler::SaveFilebool SaveFile(wxRichTextBuffer* buffer, wxOutputStream& stream) bool SaveFile(wxRichTextBuffer* buffer, const wxString& filename) Saves content to a stream or file. Not all handlers will implement file saving.
wxRichTextFileHandler::SetEncodingvoid SetEncoding(const wxString& encoding) Sets the encoding to use when saving a file. If empty, a suitable encoding is chosen.
wxRichTextFileHandler::SetExtensionvoid SetExtension(const wxString& ext) Sets the default extension to recognise.
wxRichTextFileHandler::SetFlagsvoid SetFlags(int flags) Sets flags that change the behaviour of loading or saving. See the documentation for each handler class to see what flags are relevant for each handler. You call this function directly if you are using a file handler explicitly (without going through the text control or buffer LoadFile/SaveFile API). Or, you can call the control or buffer's SetHandlerFlags function to set the flags that will be used for subsequent load and save operations.
wxRichTextFileHandler::SetNamevoid SetName(const wxString& name) Sets the name of the handler.
wxRichTextFileHandler::SetTypevoid SetType(int type) Sets the handler type.
wxRichTextFileHandler::SetVisiblevoid SetVisible(bool visible) Sets whether the handler should be visible to the user (via the application's load and save dialogs).
|