]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/iewin/iewin.i
default style for statusbars varies by platform
[wxWidgets.git] / wxPython / contrib / iewin / iewin.i
index 00de90791dc063286eaee36fe1f83a84539cbb9f..01764566aaae6f0108e50e14e3d8fb4b8427dd59 100644 (file)
 %module iewin
 
 %{
 %module iewin
 
 %{
-#include "wxPython.h"
+#include "wx/wxPython/wxPython.h"
+#include "wx/wxPython/pyclasses.h"
+#include "wx/wxPython/pyistream.h"    
+
 #include "IEHtmlWin.h"
 %}
 
 //---------------------------------------------------------------------------
 
 #include "IEHtmlWin.h"
 %}
 
 //---------------------------------------------------------------------------
 
-%include typemaps.i
-%include my_typemaps.i
-
-%extern wx.i
-%extern windows.i
-%extern _defs.i
-%extern misc.i
-%extern events.i
+%import core.i
+%pythoncode { wx = core }
 
 
-%pragma(python) code = "import wx"
+MAKE_CONST_WXSTRING_NOSWIG(PanelNameStr);
 
 
-//---------------------------------------------------------------------------
+%include _iewin_rename.i
 
 
-%{
-    // Put some wx default wxChar* values into wxStrings.
-    DECLARE_DEF_STRING(PanelNameStr);
-%}
 
 //---------------------------------------------------------------------------
 
 
 //---------------------------------------------------------------------------
 
@@ -60,25 +53,14 @@ enum {
 };
 
 
 };
 
 
-%pragma(python) code = "
-def EVT_MSHTML_BEFORENAVIGATE2(win, id, func):
-    win.Connect(id, -1, wxEVT_COMMAND_MSHTML_BEFORENAVIGATE2, func)
-
-def EVT_MSHTML_NEWWINDOW2(win, id, func):
-    win.Connect(id, -1, wxEVT_COMMAND_MSHTML_NEWWINDOW2, func)
-
-def EVT_MSHTML_DOCUMENTCOMPLETE(win, id, func):
-    win.Connect(id, -1, wxEVT_COMMAND_MSHTML_DOCUMENTCOMPLETE, func)
-
-def EVT_MSHTML_PROGRESSCHANGE(win, id, func):
-    win.Connect(id, -1, wxEVT_COMMAND_MSHTML_PROGRESSCHANGE, func)
-
-def EVT_MSHTML_STATUSTEXTCHANGE(win, id, func):
-    win.Connect(id, -1, wxEVT_COMMAND_MSHTML_STATUSTEXTCHANGE, func)
-
-def EVT_MSHTML_TITLECHANGE(win, id, func):
-    win.Connect(id, -1, wxEVT_COMMAND_MSHTML_TITLECHANGE, func)
-"
+%pythoncode {    
+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)
+}
 
 //---------------------------------------------------------------------------
 
 
 //---------------------------------------------------------------------------
 
@@ -90,9 +72,11 @@ enum wxIEHtmlRefreshLevel {
 };
 
 
 };
 
 
-class wxIEHtmlWin : public wxWindow /* wxActiveX */
+class wxIEHtmlWin : public wxWindow /* wxActiveX */ 
 {
 public:
 {
 public:
+    %pythonAppend wxIEHtmlWin      "self._setOORInfo(self)"
+    
     wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
     wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
@@ -101,21 +85,21 @@ public:
 
     void LoadUrl(const wxString&);
     bool LoadString(wxString html);
 
     void LoadUrl(const wxString&);
     bool LoadString(wxString html);
-    /* bool LoadStream(istream *strm); */
+    bool LoadStream(wxInputStream *is);
 
 
-    %pragma(python) addtoclass = "Navigate = LoadUrl"
+    %pythoncode { Navigate = LoadUrl }
 
     void SetCharset(wxString charset);
     void SetEditMode(bool seton);
     bool GetEditMode();
 
     void SetCharset(wxString charset);
     void SetEditMode(bool seton);
     bool GetEditMode();
-    wxString GetStringSelection(bool asHTML = FALSE);
-    wxString GetText(bool asHTML = FALSE);
+    wxString GetStringSelection(bool asHTML = False);
+    wxString GetText(bool asHTML = False);
 
     bool GoBack();
     bool GoForward();
     bool GoHome();
     bool GoSearch();
 
     bool GoBack();
     bool GoForward();
     bool GoHome();
     bool GoSearch();
-    bool Refresh(wxIEHtmlRefreshLevel level);
+    %name(RefreshPage)bool Refresh(wxIEHtmlRefreshLevel level);
     bool Stop();
 
 };
     bool Stop();
 
 };
@@ -123,15 +107,4 @@ public:
 
 //---------------------------------------------------------------------------
 
 
 //---------------------------------------------------------------------------
 
-%init %{
-
-    wxClassInfo::CleanUpClasses();
-    wxClassInfo::InitializeClasses();
-
-%}
-
-//----------------------------------------------------------------------
 
 
-%pragma(python) include="_iewinextras.py";
-
-//---------------------------------------------------------------------------