2002-07-03 18:05:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: iewin.i
|
|
|
|
// Purpose: Internet Explorer in a wxWindow
|
|
|
|
//
|
|
|
|
// Author: Robin Dunn
|
|
|
|
//
|
|
|
|
// Created: 20-Apr-2001
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) 2001 by Total Control Software
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
2004-06-01 22:29:55 -04:00
|
|
|
%module(package="wx") iewin
|
2002-07-03 18:05:30 -04:00
|
|
|
|
|
|
|
%{
|
2004-01-13 20:51:52 -05:00
|
|
|
#include "wx/wxPython/wxPython.h"
|
|
|
|
#include "wx/wxPython/pyclasses.h"
|
|
|
|
#include "wx/wxPython/pyistream.h"
|
|
|
|
|
2002-07-03 18:05:30 -04:00
|
|
|
#include "IEHtmlWin.h"
|
|
|
|
%}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2004-01-13 20:51:52 -05:00
|
|
|
%import core.i
|
2004-04-25 02:51:10 -04:00
|
|
|
%pythoncode { wx = _core }
|
2004-04-27 15:26:48 -04:00
|
|
|
%pythoncode { __docfilter__ = wx.__DocFilter(globals()) }
|
2004-05-07 21:22:44 -04:00
|
|
|
%pythoncode {
|
|
|
|
import warnings
|
|
|
|
warnings.warn("This module is deprecated. Please use the wx.lib.iewin module instead.",
|
|
|
|
DeprecationWarning, stacklevel=2)
|
|
|
|
}
|
2002-07-03 18:05:30 -04:00
|
|
|
|
2004-01-13 20:51:52 -05:00
|
|
|
MAKE_CONST_WXSTRING_NOSWIG(PanelNameStr);
|
2002-07-03 18:05:30 -04:00
|
|
|
|
2004-01-13 20:51:52 -05:00
|
|
|
%include _iewin_rename.i
|
2002-07-03 18:05:30 -04:00
|
|
|
|
2002-07-05 20:42:51 -04:00
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2002-07-03 18:05:30 -04:00
|
|
|
class wxMSHTMLEvent : public wxNotifyEvent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxMSHTMLEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
|
2002-07-11 13:43:34 -04:00
|
|
|
wxString GetText1();
|
2002-07-03 18:05:30 -04:00
|
|
|
long GetLong1();
|
|
|
|
long GetLong2();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
enum {
|
|
|
|
wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2,
|
|
|
|
wxEVT_COMMAND_MSHTML_NEWWINDOW2,
|
|
|
|
wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE,
|
|
|
|
wxEVT_COMMAND_MSHTML_PROGRESSCHANGE,
|
|
|
|
wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE,
|
|
|
|
wxEVT_COMMAND_MSHTML_TITLECHANGE,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2004-01-14 20:08:37 -05:00
|
|
|
%pythoncode {
|
2004-01-13 20:51:52 -05:00
|
|
|
EVT_MSHTML_BEFORENAVIGATE2 = wx.PyEventBinder(wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2, 1)
|
|
|
|
EVT_MSHTML_NEWWINDOW2 = wx.PyEventBinder(wxEVT_COMMAND_MSHTML_NEWWINDOW2, 1)
|
|
|
|
EVT_MSHTML_DOCUMENTCOMPLETE = wx.PyEventBinder(wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE, 1)
|
|
|
|
EVT_MSHTML_PROGRESSCHANGE = wx.PyEventBinder(wxEVT_COMMAND_MSHTML_PROGRESSCHANGE, 1)
|
|
|
|
EVT_MSHTML_STATUSTEXTCHANGE = wx.PyEventBinder(wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE, 1)
|
|
|
|
EVT_MSHTML_TITLECHANGE = wx.PyEventBinder(wxEVT_COMMAND_MSHTML_TITLECHANGE, 1)
|
|
|
|
}
|
2002-07-03 18:05:30 -04:00
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
enum wxIEHtmlRefreshLevel {
|
|
|
|
wxIEHTML_REFRESH_NORMAL = 0,
|
|
|
|
wxIEHTML_REFRESH_IFEXPIRED = 1,
|
|
|
|
wxIEHTML_REFRESH_CONTINUE = 2,
|
|
|
|
wxIEHTML_REFRESH_COMPLETELY = 3
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2004-06-01 17:38:05 -04:00
|
|
|
MustHaveApp(wxIEHtmlWin);
|
|
|
|
|
2004-01-13 20:51:52 -05:00
|
|
|
class wxIEHtmlWin : public wxWindow /* wxActiveX */
|
2002-07-03 18:05:30 -04:00
|
|
|
{
|
|
|
|
public:
|
2004-01-30 20:18:37 -05:00
|
|
|
%pythonAppend wxIEHtmlWin "self._setOORInfo(self)"
|
2004-01-13 20:51:52 -05:00
|
|
|
|
2002-07-05 20:42:51 -04:00
|
|
|
wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name = wxPyPanelNameStr);
|
2002-07-03 18:05:30 -04:00
|
|
|
|
|
|
|
void LoadUrl(const wxString&);
|
|
|
|
bool LoadString(wxString html);
|
2002-07-19 20:06:59 -04:00
|
|
|
bool LoadStream(wxInputStream *is);
|
2002-07-03 18:05:30 -04:00
|
|
|
|
2004-01-13 20:51:52 -05:00
|
|
|
%pythoncode { Navigate = LoadUrl }
|
2002-07-11 13:43:34 -04:00
|
|
|
|
2002-07-03 18:05:30 -04:00
|
|
|
void SetCharset(wxString charset);
|
|
|
|
void SetEditMode(bool seton);
|
|
|
|
bool GetEditMode();
|
2004-09-23 16:23:54 -04:00
|
|
|
wxString GetStringSelection(bool asHTML = false);
|
|
|
|
wxString GetText(bool asHTML = false);
|
2002-07-03 18:05:30 -04:00
|
|
|
|
|
|
|
bool GoBack();
|
|
|
|
bool GoForward();
|
|
|
|
bool GoHome();
|
|
|
|
bool GoSearch();
|
2004-12-23 15:44:09 -05:00
|
|
|
%Rename(RefreshPage, bool, Refresh(wxIEHtmlRefreshLevel level));
|
2002-07-03 18:05:30 -04:00
|
|
|
bool Stop();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|