]> git.saurik.com Git - wxWidgets.git/blame - 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
CommitLineData
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
14%module iewin
15
16%{
17#include "wxPython.h"
18#include "IEHtmlWin.h"
d3b55102 19#include "pyistream.h"
c731eb47
RD
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
d3b55102 32%extern streams.i
c731eb47
RD
33
34%pragma(python) code = "import wx"
35
36//---------------------------------------------------------------------------
37
d7abf017
RD
38%{
39 // Put some wx default wxChar* values into wxStrings.
40 DECLARE_DEF_STRING(PanelNameStr);
41%}
42
43//---------------------------------------------------------------------------
44
c731eb47
RD
45class wxMSHTMLEvent : public wxNotifyEvent
46{
47public:
48 wxMSHTMLEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
83a73288 49 wxString GetText1();
c731eb47
RD
50 long GetLong1();
51 long GetLong2();
52};
53
54
55enum {
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 = "
66def EVT_MSHTML_BEFORENAVIGATE2(win, id, func):
67 win.Connect(id, -1, wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2, func)
68
69def EVT_MSHTML_NEWWINDOW2(win, id, func):
70 win.Connect(id, -1, wxEVT_COMMAND_MSHTML_NEWWINDOW2, func)
71
72def EVT_MSHTML_DOCUMENTCOMPLETE(win, id, func):
73 win.Connect(id, -1, wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE, func)
74
75def EVT_MSHTML_PROGRESSCHANGE(win, id, func):
76 win.Connect(id, -1, wxEVT_COMMAND_MSHTML_PROGRESSCHANGE, func)
77
78def EVT_MSHTML_STATUSTEXTCHANGE(win, id, func):
79 win.Connect(id, -1, wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE, func)
80
81def EVT_MSHTML_TITLECHANGE(win, id, func):
82 win.Connect(id, -1, wxEVT_COMMAND_MSHTML_TITLECHANGE, func)
83"
84
85//---------------------------------------------------------------------------
86
87enum wxIEHtmlRefreshLevel {
88 wxIEHTML_REFRESH_NORMAL = 0,
89 wxIEHTML_REFRESH_IFEXPIRED = 1,
90 wxIEHTML_REFRESH_CONTINUE = 2,
91 wxIEHTML_REFRESH_COMPLETELY = 3
92};
93
94
95class wxIEHtmlWin : public wxWindow /* wxActiveX */
96{
97public:
d7abf017
RD
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);
c731eb47
RD
103
104 void LoadUrl(const wxString&);
105 bool LoadString(wxString html);
d3b55102 106 bool LoadStream(wxInputStream *is);
c731eb47 107
83a73288
RD
108 %pragma(python) addtoclass = "Navigate = LoadUrl"
109
c731eb47
RD
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//---------------------------------------------------------------------------