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 /////////////////////////////////////////////////////////////////////////////
17 #include "wx/wxPython/wxPython.h"
18 #include "wx/wxPython/pyclasses.h"
19 #include "wx/wxPython/pyistream.h"
21 #include "IEHtmlWin.h"
24 //---------------------------------------------------------------------------
27 %pythoncode { wx = core }
29 MAKE_CONST_WXSTRING_NOSWIG(PanelNameStr);
31 %include _iewin_rename.i
34 //---------------------------------------------------------------------------
36 class wxMSHTMLEvent : public wxNotifyEvent
39 wxMSHTMLEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
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,
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)
65 //---------------------------------------------------------------------------
67 enum wxIEHtmlRefreshLevel {
68 wxIEHTML_REFRESH_NORMAL = 0,
69 wxIEHTML_REFRESH_IFEXPIRED = 1,
70 wxIEHTML_REFRESH_CONTINUE = 2,
71 wxIEHTML_REFRESH_COMPLETELY = 3
75 class wxIEHtmlWin : public wxWindow /* wxActiveX */
78 %pythonAppend wxIEHtmlWin "self._setOORInfo(self)"
80 wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1,
81 const wxPoint& pos = wxDefaultPosition,
82 const wxSize& size = wxDefaultSize,
84 const wxString& name = wxPyPanelNameStr);
86 void LoadUrl(const wxString&);
87 bool LoadString(wxString html);
88 bool LoadStream(wxInputStream *is);
90 %pythoncode { Navigate = LoadUrl }
92 void SetCharset(wxString charset);
93 void SetEditMode(bool seton);
95 wxString GetStringSelection(bool asHTML = False);
96 wxString GetText(bool asHTML = False);
102 %name(RefreshPage)bool Refresh(wxIEHtmlRefreshLevel level);
108 //---------------------------------------------------------------------------