]>
Commit | Line | Data |
---|---|---|
c731eb47 RD |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: iewin.i | |
3 | // Purpose: Internet Explorer in a wxWindow | |
4 | // | |
5 | // Author: Robin Dunn | |
6 | // | |
7 | // Created: 20-Apr-2001 | |
8 | // RCS-ID: $Id$ | |
9 | // Copyright: (c) 2001 by Total Control Software | |
10 | // Licence: wxWindows license | |
11 | ///////////////////////////////////////////////////////////////////////////// | |
12 | ||
13 | ||
14 | %module iewin | |
15 | ||
16 | %{ | |
de7b7fe6 RD |
17 | #include "wx/wxPython/wxPython.h" |
18 | #include "wx/wxPython/pyclasses.h" | |
19 | #include "wx/wxPython/pyistream.h" | |
20 | ||
c731eb47 RD |
21 | #include "IEHtmlWin.h" |
22 | %} | |
23 | ||
24 | //--------------------------------------------------------------------------- | |
25 | ||
de7b7fe6 RD |
26 | %import core.i |
27 | %pythoncode { wx = core } | |
c731eb47 | 28 | |
de7b7fe6 | 29 | MAKE_CONST_WXSTRING_NOSWIG(PanelNameStr); |
c731eb47 | 30 | |
de7b7fe6 | 31 | %include _iewin_rename.i |
c731eb47 | 32 | |
d7abf017 RD |
33 | |
34 | //--------------------------------------------------------------------------- | |
35 | ||
c731eb47 RD |
36 | class wxMSHTMLEvent : public wxNotifyEvent |
37 | { | |
38 | public: | |
39 | wxMSHTMLEvent(wxEventType commandType = wxEVT_NULL, int id = 0); | |
83a73288 | 40 | wxString GetText1(); |
c731eb47 RD |
41 | long GetLong1(); |
42 | long GetLong2(); | |
43 | }; | |
44 | ||
45 | ||
46 | enum { | |
47 | wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2, | |
48 | wxEVT_COMMAND_MSHTML_NEWWINDOW2, | |
49 | wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE, | |
50 | wxEVT_COMMAND_MSHTML_PROGRESSCHANGE, | |
51 | wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE, | |
52 | wxEVT_COMMAND_MSHTML_TITLECHANGE, | |
53 | }; | |
54 | ||
55 | ||
d2f9bbfd | 56 | %pythoncode { |
de7b7fe6 RD |
57 | EVT_MSHTML_BEFORENAVIGATE2 = wx.PyEventBinder(wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2, 1) |
58 | EVT_MSHTML_NEWWINDOW2 = wx.PyEventBinder(wxEVT_COMMAND_MSHTML_NEWWINDOW2, 1) | |
59 | EVT_MSHTML_DOCUMENTCOMPLETE = wx.PyEventBinder(wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE, 1) | |
60 | EVT_MSHTML_PROGRESSCHANGE = wx.PyEventBinder(wxEVT_COMMAND_MSHTML_PROGRESSCHANGE, 1) | |
61 | EVT_MSHTML_STATUSTEXTCHANGE = wx.PyEventBinder(wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE, 1) | |
62 | EVT_MSHTML_TITLECHANGE = wx.PyEventBinder(wxEVT_COMMAND_MSHTML_TITLECHANGE, 1) | |
63 | } | |
c731eb47 RD |
64 | |
65 | //--------------------------------------------------------------------------- | |
66 | ||
67 | enum wxIEHtmlRefreshLevel { | |
68 | wxIEHTML_REFRESH_NORMAL = 0, | |
69 | wxIEHTML_REFRESH_IFEXPIRED = 1, | |
70 | wxIEHTML_REFRESH_CONTINUE = 2, | |
71 | wxIEHTML_REFRESH_COMPLETELY = 3 | |
72 | }; | |
73 | ||
74 | ||
de7b7fe6 | 75 | class wxIEHtmlWin : public wxWindow /* wxActiveX */ |
c731eb47 RD |
76 | { |
77 | public: | |
2b9048c5 | 78 | %pythonAppend wxIEHtmlWin "self._setOORInfo(self)" |
de7b7fe6 | 79 | |
d7abf017 RD |
80 | wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1, |
81 | const wxPoint& pos = wxDefaultPosition, | |
82 | const wxSize& size = wxDefaultSize, | |
83 | long style = 0, | |
84 | const wxString& name = wxPyPanelNameStr); | |
c731eb47 RD |
85 | |
86 | void LoadUrl(const wxString&); | |
87 | bool LoadString(wxString html); | |
d3b55102 | 88 | bool LoadStream(wxInputStream *is); |
c731eb47 | 89 | |
de7b7fe6 | 90 | %pythoncode { Navigate = LoadUrl } |
83a73288 | 91 | |
c731eb47 RD |
92 | void SetCharset(wxString charset); |
93 | void SetEditMode(bool seton); | |
94 | bool GetEditMode(); | |
de7b7fe6 RD |
95 | wxString GetStringSelection(bool asHTML = False); |
96 | wxString GetText(bool asHTML = False); | |
c731eb47 RD |
97 | |
98 | bool GoBack(); | |
99 | bool GoForward(); | |
100 | bool GoHome(); | |
101 | bool GoSearch(); | |
1e4a197e | 102 | %name(RefreshPage)bool Refresh(wxIEHtmlRefreshLevel level); |
c731eb47 RD |
103 | bool Stop(); |
104 | ||
105 | }; | |
106 | ||
107 | ||
108 | //--------------------------------------------------------------------------- | |
109 | ||
c731eb47 | 110 |