]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/_richtexthtml.i
fix wxUniv/MSW compilation with wxUSE_MENUS==0 (patch 1744277)
[wxWidgets.git] / wxPython / src / _richtexthtml.i
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: _richtexthtml
3 // Purpose: wxRichTextHTMLHandler
4 //
5 // Author: Robin Dunn
6 //
7 // Created: 18-May-2007
8 // RCS-ID: $Id$
9 // Copyright: (c) 2007 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
12
13 // Not a %module
14
15
16 //---------------------------------------------------------------------------
17
18 %{
19 #include <wx/richtext/richtexthtml.h>
20 %}
21
22 //---------------------------------------------------------------------------
23 %newgroup
24
25 MAKE_CONST_WXSTRING2(HtmlName, wxT("HTML"));
26 MAKE_CONST_WXSTRING2(HtmlExt, wxT("html"));
27
28 class wxRichTextHTMLHandler: public wxRichTextFileHandler
29 {
30 public:
31 wxRichTextHTMLHandler(const wxString& name = wxPyHtmlName,
32 const wxString& ext = wxPyHtmlExt,
33 int type = wxRICHTEXT_TYPE_HTML);
34
35 DocDeclStr(
36 virtual bool , CanSave() const,
37 "Can we save using this handler?", "");
38 DocDeclStr(
39 virtual bool , CanLoad() const,
40 "Can we load using this handler?", "");
41 DocDeclStr(
42 virtual bool , CanHandle(const wxString& filename) const,
43 "Can we handle this filename (if using files)? By default, checks the
44 extension.", "");
45
46
47 DocDeclStr(
48 void , SetTemporaryImageLocations(const wxArrayString& locations),
49 "Set the list of image locations generated by the last operation", "");
50 DocDeclStr(
51 const wxArrayString& , GetTemporaryImageLocations() const,
52 "Get the list of image locations generated by the last operation", "");
53 %property(TemporaryImageLocations, GetTemporaryImageLocations, SetTemporaryImageLocations);
54
55
56
57 DocDeclStr(
58 void , ClearTemporaryImageLocations(),
59 "Clear the image locations generated by the last operation", "");
60 DocDeclStr(
61 bool , DeleteTemporaryImages(),
62 "Delete the in-memory or temporary files generated by the last operation", "");
63
64
65 // DocDeclStr(
66 // static bool , DeleteTemporaryImages(int flags, const wxArrayString& imageLocations),
67 // "Delete the in-memory or temporary files generated by the last operation. This
68 // is a static function that can be used to delete the saved locations from an
69 // earlier operation, for example after the user has viewed the HTML file.", "");
70
71
72 DocDeclStr(
73 static void , SetFileCounter(int counter),
74 "Reset the file counter, in case, for example, the same names are required each
75 time", "");
76
77
78 DocDeclStr(
79 void , SetTempDir(const wxString& tempDir),
80 "Set the directory for storing temporary files. If empty, the system temporary
81 directory will be used.", "");
82 DocDeclStr(
83 const wxString& , GetTempDir() const,
84 "Get the directory for storing temporary files. If empty, the system temporary
85 directory will be used.", "");
86 %property(TempDir, GetTempDir, SetTempDir);
87
88
89 DocDeclStr(
90 void , SetFontSizeMapping(const wxArrayInt& fontSizeMapping),
91 "Set mapping from point size to HTML font size. There should be 7 elements, one
92 for each HTML font size, each element specifying the maximum point size for
93 that HTML font size. E.g. 8, 10, 13, 17, 22, 29, 100
94 ", "");
95 DocDeclStr(
96 wxArrayInt , GetFontSizeMapping() const,
97 "Get mapping deom point size to HTML font size.", "");
98 %property(FontSizeMapping, GetFontSizeMapping, SetFontSizeMapping);
99
100 };
101
102 //---------------------------------------------------------------------------