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);
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) {
DEC_PYCALLBACK__STRING(OnSetTitle);
DEC_PYCALLBACK__CELLINTINT(OnCellMouseHover);
DEC_PYCALLBACK__CELLINTINTME(OnCellClicked);
+ DEC_PYCALLBACK_BOOL_STRING(OnOpeningURL);
PYPRIVATE;
};
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) {