1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Internet Explorer in a wxWindow
7 // Created: 20-Apr-2001
9 // Copyright: (c) 2001 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
18 #include "IEHtmlWin.h"
19 #include "pyistream.h"
22 //---------------------------------------------------------------------------
25 %include my_typemaps.i
34 %pragma(python) code = "import wx"
36 //---------------------------------------------------------------------------
39 // Put some wx default wxChar* values into wxStrings.
40 DECLARE_DEF_STRING(PanelNameStr);
43 //---------------------------------------------------------------------------
45 class wxMSHTMLEvent : public wxNotifyEvent
48 wxMSHTMLEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
56 wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2,
57 wxEVT_COMMAND_MSHTML_NEWWINDOW2,
58 wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE,
59 wxEVT_COMMAND_MSHTML_PROGRESSCHANGE,
60 wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE,
61 wxEVT_COMMAND_MSHTML_TITLECHANGE,
65 %pragma(python) code = "
66 def EVT_MSHTML_BEFORENAVIGATE2(win, id, func):
67 win.Connect(id, -1, wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2, func)
69 def EVT_MSHTML_NEWWINDOW2(win, id, func):
70 win.Connect(id, -1, wxEVT_COMMAND_MSHTML_NEWWINDOW2, func)
72 def EVT_MSHTML_DOCUMENTCOMPLETE(win, id, func):
73 win.Connect(id, -1, wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE, func)
75 def EVT_MSHTML_PROGRESSCHANGE(win, id, func):
76 win.Connect(id, -1, wxEVT_COMMAND_MSHTML_PROGRESSCHANGE, func)
78 def EVT_MSHTML_STATUSTEXTCHANGE(win, id, func):
79 win.Connect(id, -1, wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE, func)
81 def EVT_MSHTML_TITLECHANGE(win, id, func):
82 win.Connect(id, -1, wxEVT_COMMAND_MSHTML_TITLECHANGE, func)
85 //---------------------------------------------------------------------------
87 enum wxIEHtmlRefreshLevel {
88 wxIEHTML_REFRESH_NORMAL = 0,
89 wxIEHTML_REFRESH_IFEXPIRED = 1,
90 wxIEHTML_REFRESH_CONTINUE = 2,
91 wxIEHTML_REFRESH_COMPLETELY = 3
95 class wxIEHtmlWin : public wxWindow /* wxActiveX */
98 wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1,
99 const wxPoint& pos = wxDefaultPosition,
100 const wxSize& size = wxDefaultSize,
102 const wxString& name = wxPyPanelNameStr);
104 void LoadUrl(const wxString&);
105 bool LoadString(wxString html);
106 bool LoadStream(wxInputStream *is);
108 %pragma(python) addtoclass = "Navigate = LoadUrl"
110 void SetCharset(wxString charset);
111 void SetEditMode(bool seton);
113 wxString GetStringSelection(bool asHTML = FALSE);
114 wxString GetText(bool asHTML = FALSE);
120 bool Refresh(wxIEHtmlRefreshLevel level);
126 //---------------------------------------------------------------------------
130 wxClassInfo::CleanUpClasses();
131 wxClassInfo::InitializeClasses();
135 //----------------------------------------------------------------------
137 %pragma(python) include="_iewinextras.py";
139 //---------------------------------------------------------------------------