]> git.saurik.com Git - wxWidgets.git/blob - wxPython/contrib/iewin/iewin.i
Moved tools to be a Python package in wxPython.tools, added scripts to
[wxWidgets.git] / wxPython / contrib / iewin / iewin.i
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 %{
17 #include "wxPython.h"
18 #include "IEHtmlWin.h"
19 #include "pyistream.h"
20 %}
21
22 //---------------------------------------------------------------------------
23
24 %include typemaps.i
25 %include my_typemaps.i
26
27 %extern wx.i
28 %extern windows.i
29 %extern _defs.i
30 %extern misc.i
31 %extern events.i
32 %extern streams.i
33
34 %pragma(python) code = "import wx"
35
36 //---------------------------------------------------------------------------
37
38 %{
39 // Put some wx default wxChar* values into wxStrings.
40 DECLARE_DEF_STRING(PanelNameStr);
41 %}
42
43 //---------------------------------------------------------------------------
44
45 class wxMSHTMLEvent : public wxNotifyEvent
46 {
47 public:
48 wxMSHTMLEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
49 wxString GetText1();
50 long GetLong1();
51 long GetLong2();
52 };
53
54
55 enum {
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,
62 };
63
64
65 %pragma(python) code = "
66 def EVT_MSHTML_BEFORENAVIGATE2(win, id, func):
67 win.Connect(id, -1, wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2, func)
68
69 def EVT_MSHTML_NEWWINDOW2(win, id, func):
70 win.Connect(id, -1, wxEVT_COMMAND_MSHTML_NEWWINDOW2, func)
71
72 def EVT_MSHTML_DOCUMENTCOMPLETE(win, id, func):
73 win.Connect(id, -1, wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE, func)
74
75 def EVT_MSHTML_PROGRESSCHANGE(win, id, func):
76 win.Connect(id, -1, wxEVT_COMMAND_MSHTML_PROGRESSCHANGE, func)
77
78 def EVT_MSHTML_STATUSTEXTCHANGE(win, id, func):
79 win.Connect(id, -1, wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE, func)
80
81 def EVT_MSHTML_TITLECHANGE(win, id, func):
82 win.Connect(id, -1, wxEVT_COMMAND_MSHTML_TITLECHANGE, func)
83 "
84
85 //---------------------------------------------------------------------------
86
87 enum wxIEHtmlRefreshLevel {
88 wxIEHTML_REFRESH_NORMAL = 0,
89 wxIEHTML_REFRESH_IFEXPIRED = 1,
90 wxIEHTML_REFRESH_CONTINUE = 2,
91 wxIEHTML_REFRESH_COMPLETELY = 3
92 };
93
94
95 class wxIEHtmlWin : public wxWindow /* wxActiveX */
96 {
97 public:
98 wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1,
99 const wxPoint& pos = wxDefaultPosition,
100 const wxSize& size = wxDefaultSize,
101 long style = 0,
102 const wxString& name = wxPyPanelNameStr);
103
104 void LoadUrl(const wxString&);
105 bool LoadString(wxString html);
106 bool LoadStream(wxInputStream *is);
107
108 %pragma(python) addtoclass = "Navigate = LoadUrl"
109
110 void SetCharset(wxString charset);
111 void SetEditMode(bool seton);
112 bool GetEditMode();
113 wxString GetStringSelection(bool asHTML = FALSE);
114 wxString GetText(bool asHTML = FALSE);
115
116 bool GoBack();
117 bool GoForward();
118 bool GoHome();
119 bool GoSearch();
120 bool Refresh(wxIEHtmlRefreshLevel level);
121 bool Stop();
122
123 };
124
125
126 //---------------------------------------------------------------------------
127
128 %init %{
129
130 wxClassInfo::CleanUpClasses();
131 wxClassInfo::InitializeClasses();
132
133 %}
134
135 //----------------------------------------------------------------------
136
137 %pragma(python) include="_iewinextras.py";
138
139 //---------------------------------------------------------------------------