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