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
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
%module iewin
|
|
|
|
|
|
|
|
%{
|
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
|
|
|
|
%pythoncode { wx = core }
|
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-01-13 20:51:52 -05:00
|
|
|
class wxIEHtmlWin : public wxWindow /* wxActiveX */
|
2002-07-03 18:05:30 -04:00
|
|
|
{
|
|
|
|
public:
|
2004-01-13 20:51:52 -05:00
|
|
|
%addtofunc wxIEHtmlWin "self._setOORInfo(self)"
|
|
|
|
|
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-01-13 20:51:52 -05: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();
|
2003-03-25 01:35:27 -05:00
|
|
|
%name(RefreshPage)bool Refresh(wxIEHtmlRefreshLevel level);
|
2002-07-03 18:05:30 -04:00
|
|
|
bool Stop();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|