]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/html.i
Added icons for the demo and for XRCed, and added a shortcut to XRCed
[wxWidgets.git] / wxPython / src / html.i
index ec23d14d8c77cf02fc04af512af897d9c8bd15c3..497741dcc6286a1d4f1ee81361f798ea37d674d9 100644 (file)
@@ -127,6 +127,9 @@ public:
     void PushTagHandler(wxHtmlTagHandler* handler, wxString tags);
     void PopTagHandler();
 
+    // Returns TRUE if the parser is allowed to open given URL (may be forbidden
+    // for security reasons)
+    virtual bool CanOpenURL(const wxString& url) const { return TRUE; }
 
     // void AddText(const char* txt) = 0;
     // void AddTag(const wxHtmlTag& tag);
@@ -137,13 +140,13 @@ public:
 
 class wxHtmlWinParser : public wxHtmlParser {
 public:
-    wxHtmlWinParser(wxWindow *wnd);
+    wxHtmlWinParser(wxHtmlWindow *wnd = NULL);
 
     void SetDC(wxDC *dc);
     wxDC* GetDC();
     int GetCharHeight();
     int GetCharWidth();
-    wxWindow* GetWindow();
+    wxHtmlWindow* GetWindow();
     //void SetFonts(wxString normal_face, wxString fixed_face, int *LIST);
     %addmethods {
         void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes) {
@@ -427,6 +430,7 @@ public:
     DEC_PYCALLBACK__STRING(OnSetTitle);
     DEC_PYCALLBACK__CELLINTINT(OnCellMouseHover);
     DEC_PYCALLBACK__CELLINTINTME(OnCellClicked);
+    DEC_PYCALLBACK_BOOL_STRING(OnOpeningURL);
     PYPRIVATE;
 };
 
@@ -434,6 +438,7 @@ IMPLEMENT_ABSTRACT_CLASS( wxPyHtmlWindow, wxHtmlWindow );
 IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle);
 IMP_PYCALLBACK__CELLINTINT(wxPyHtmlWindow, wxHtmlWindow, OnCellMouseHover);
 IMP_PYCALLBACK__CELLINTINTME(wxPyHtmlWindow, wxHtmlWindow, OnCellClicked);
+IMP_PYCALLBACK_BOOL_STRING(wxPyHtmlWindow, wxHtmlWindow, OnOpeningURL);
 
 
 void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) {