]> git.saurik.com Git - wxWidgets.git/blob - include/wx/richtext/richtexthtml.h
Added wxDataViewCustomCell.
[wxWidgets.git] / include / wx / richtext / richtexthtml.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/richtext/richedithtml.h
3 // Purpose: HTML I/O for wxRichTextCtrl
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 2005-09-30
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_RICHTEXTHTML_H_
13 #define _WX_RICHTEXTHTML_H_
14
15 /*!
16 * Includes
17 */
18
19 #include "wx/richtext/richtextbuffer.h"
20
21 /*!
22 * wxRichTextHTMLHandler
23 */
24
25 class WXDLLIMPEXP_ADV wxRichTextHTMLHandler: public wxRichTextFileHandler
26 {
27 DECLARE_CLASS(wxRichTextHTMLHandler)
28 public:
29 wxRichTextHTMLHandler(const wxString& name = wxT("HTML"), const wxString& ext = wxT("html"), int type = wxRICHTEXT_TYPE_HTML)
30 : wxRichTextFileHandler(name, ext, type)
31 { }
32
33 /// Can we save using this handler?
34 virtual bool CanSave() const { return true; }
35
36 /// Can we load using this handler?
37 virtual bool CanLoad() const { return false; }
38
39 /// Can we handle this filename (if using files)? By default, checks the extension.
40 virtual bool CanHandle(const wxString& filename) const;
41
42 /// Output character formatting
43 virtual void OutputCharacterFormatting(const wxTextAttrEx& currentStyle, const wxTextAttrEx& thisStyle, wxOutputStream& stream, bool start);
44
45 /// Output paragraph formatting
46 virtual void OutputParagraphFormatting(const wxTextAttrEx& currentStyle, const wxTextAttrEx& thisStyle, wxOutputStream& stream, bool start);
47
48 protected:
49 #if wxUSE_STREAMS
50 virtual bool DoLoadFile(wxRichTextBuffer *buffer, wxInputStream& stream);
51 virtual bool DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream& stream);
52 #endif
53 };
54
55 #endif
56 // _WX_RICHTEXTXML_H_