1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/richtext/richedithtml.h
3 // Purpose: HTML I/O for wxRichTextCtrl
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_RICHTEXTHTML_H_
13 #define _WX_RICHTEXTHTML_H_
19 #include "wx/richtext/richtextbuffer.h"
22 * wxRichTextHTMLHandler
25 class WXDLLIMPEXP_ADV wxRichTextHTMLHandler
: public wxRichTextFileHandler
27 DECLARE_CLASS(wxRichTextHTMLHandler
)
29 wxRichTextHTMLHandler(const wxString
& name
= wxT("HTML"), const wxString
& ext
= wxT("html"), int type
= wxRICHTEXT_TYPE_HTML
)
30 : wxRichTextFileHandler(name
, ext
, type
)
33 /// Can we save using this handler?
34 virtual bool CanSave() const { return true; }
36 /// Can we load using this handler?
37 virtual bool CanLoad() const { return false; }
39 /// Can we handle this filename (if using files)? By default, checks the extension.
40 virtual bool CanHandle(const wxString
& filename
) const;
42 /// Output character formatting
43 virtual void OutputCharacterFormatting(const wxTextAttrEx
& currentStyle
, const wxTextAttrEx
& thisStyle
, wxOutputStream
& stream
, bool start
);
45 /// Output paragraph formatting
46 virtual void OutputParagraphFormatting(const wxTextAttrEx
& currentStyle
, const wxTextAttrEx
& thisStyle
, wxOutputStream
& stream
, bool start
);
50 virtual bool DoLoadFile(wxRichTextBuffer
*buffer
, wxInputStream
& stream
);
51 virtual bool DoSaveFile(wxRichTextBuffer
*buffer
, wxOutputStream
& stream
);