]>
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 | ||
b2eb030f | 14 | %module(package="wx") iewin |
c731eb47 RD |
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 | 26 | %import core.i |
54f9ee45 | 27 | %pythoncode { wx = _core } |
99109c0f | 28 | %pythoncode { __docfilter__ = wx.__DocFilter(globals()) } |
165e6ca3 RD |
29 | %pythoncode { |
30 | import warnings | |
31 | warnings.warn("This module is deprecated. Please use the wx.lib.iewin module instead.", | |
32 | DeprecationWarning, stacklevel=2) | |
33 | } | |
c731eb47 | 34 | |
de7b7fe6 | 35 | MAKE_CONST_WXSTRING_NOSWIG(PanelNameStr); |
c731eb47 | 36 | |
de7b7fe6 | 37 | %include _iewin_rename.i |
c731eb47 | 38 | |
d7abf017 RD |
39 | |
40 | //--------------------------------------------------------------------------- | |
41 | ||
c731eb47 RD |
42 | class wxMSHTMLEvent : public wxNotifyEvent |
43 | { | |
44 | public: | |
45 | wxMSHTMLEvent(wxEventType commandType = wxEVT_NULL, int id = 0); | |
83a73288 | 46 | wxString GetText1(); |
c731eb47 RD |
47 | long GetLong1(); |
48 | long GetLong2(); | |
49 | }; | |
50 | ||
51 | ||
52 | enum { | |
53 | wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2, | |
54 | wxEVT_COMMAND_MSHTML_NEWWINDOW2, | |
55 | wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE, | |
56 | wxEVT_COMMAND_MSHTML_PROGRESSCHANGE, | |
57 | wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE, | |
58 | wxEVT_COMMAND_MSHTML_TITLECHANGE, | |
59 | }; | |
60 | ||
61 | ||
d2f9bbfd | 62 | %pythoncode { |
de7b7fe6 RD |
63 | EVT_MSHTML_BEFORENAVIGATE2 = wx.PyEventBinder(wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2, 1) |
64 | EVT_MSHTML_NEWWINDOW2 = wx.PyEventBinder(wxEVT_COMMAND_MSHTML_NEWWINDOW2, 1) | |
65 | EVT_MSHTML_DOCUMENTCOMPLETE = wx.PyEventBinder(wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE, 1) | |
66 | EVT_MSHTML_PROGRESSCHANGE = wx.PyEventBinder(wxEVT_COMMAND_MSHTML_PROGRESSCHANGE, 1) | |
67 | EVT_MSHTML_STATUSTEXTCHANGE = wx.PyEventBinder(wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE, 1) | |
68 | EVT_MSHTML_TITLECHANGE = wx.PyEventBinder(wxEVT_COMMAND_MSHTML_TITLECHANGE, 1) | |
69 | } | |
c731eb47 RD |
70 | |
71 | //--------------------------------------------------------------------------- | |
72 | ||
73 | enum wxIEHtmlRefreshLevel { | |
74 | wxIEHTML_REFRESH_NORMAL = 0, | |
75 | wxIEHTML_REFRESH_IFEXPIRED = 1, | |
76 | wxIEHTML_REFRESH_CONTINUE = 2, | |
77 | wxIEHTML_REFRESH_COMPLETELY = 3 | |
78 | }; | |
79 | ||
80 | ||
ab1f7d2a RD |
81 | MustHaveApp(wxIEHtmlWin); |
82 | ||
de7b7fe6 | 83 | class wxIEHtmlWin : public wxWindow /* wxActiveX */ |
c731eb47 RD |
84 | { |
85 | public: | |
2b9048c5 | 86 | %pythonAppend wxIEHtmlWin "self._setOORInfo(self)" |
de7b7fe6 | 87 | |
d7abf017 RD |
88 | wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1, |
89 | const wxPoint& pos = wxDefaultPosition, | |
90 | const wxSize& size = wxDefaultSize, | |
91 | long style = 0, | |
92 | const wxString& name = wxPyPanelNameStr); | |
c731eb47 RD |
93 | |
94 | void LoadUrl(const wxString&); | |
95 | bool LoadString(wxString html); | |
d3b55102 | 96 | bool LoadStream(wxInputStream *is); |
c731eb47 | 97 | |
de7b7fe6 | 98 | %pythoncode { Navigate = LoadUrl } |
83a73288 | 99 | |
c731eb47 RD |
100 | void SetCharset(wxString charset); |
101 | void SetEditMode(bool seton); | |
102 | bool GetEditMode(); | |
a72f4631 RD |
103 | wxString GetStringSelection(bool asHTML = false); |
104 | wxString GetText(bool asHTML = false); | |
c731eb47 RD |
105 | |
106 | bool GoBack(); | |
107 | bool GoForward(); | |
108 | bool GoHome(); | |
109 | bool GoSearch(); | |
1b8c7ba6 | 110 | %Rename(RefreshPage, bool, Refresh(wxIEHtmlRefreshLevel level)); |
c731eb47 RD |
111 | bool Stop(); |
112 | ||
113 | }; | |
114 | ||
115 | ||
116 | //--------------------------------------------------------------------------- | |
117 | ||
c731eb47 | 118 |