X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e70b4d2db930a297f0625b7d43109f793fd3338a..9057d6d46ea0acc7223311b81c7b50707d787f66:/wxPython/src/html.i diff --git a/wxPython/src/html.i b/wxPython/src/html.i index b9ee8454be..ba3f6c8d6d 100644 --- a/wxPython/src/html.i +++ b/wxPython/src/html.i @@ -1546,7 +1546,7 @@ public: void RefreshLists(); // Gets the HTML window - wxHtmlWindow* GetHtmlWindow() const; + wxPyHtmlWindow* GetHtmlWindow() const; // Gets the splitter window wxSplitterWindow* GetSplitterWindow(); @@ -1569,20 +1569,47 @@ public: %property(TreeCtrl, GetTreeCtrl, doc="See `GetTreeCtrl`"); }; +//--------------------------------------------------------------------------- + + +%constant wxEventType wxEVT_COMMAND_HTML_CELL_CLICKED; +%constant wxEventType wxEVT_COMMAND_HTML_CELL_HOVER; +%constant wxEventType wxEVT_COMMAND_HTML_LINK_CLICKED; + -class wxHtmlWindowEvent: public wxNotifyEvent +class wxHtmlCellEvent : public wxCommandEvent { public: - wxHtmlWindowEvent(wxEventType commandType = wxEVT_NULL, int id = 0): - wxNotifyEvent(commandType, id); + wxHtmlCellEvent(wxEventType commandType, int id, + wxHtmlCell *cell, const wxPoint &pt, + const wxMouseEvent &ev); + + wxHtmlCell* GetCell() const; + wxPoint GetPoint() const; + wxMouseEvent GetMouseEvent() const; + + void SetLinkClicked(bool linkclicked); + bool GetLinkClicked() const; +}; - void SetURL(const wxString& url); - const wxString& GetURL() const; - %property(URL, GetURL, SetURL, doc="See `GetURL` and `SetURL`"); +class wxHtmlLinkEvent : public wxCommandEvent +{ +public: + wxHtmlLinkEvent(int id, const wxHtmlLinkInfo &linkinfo); + + const wxHtmlLinkInfo &GetLinkInfo() const; }; +%pythoncode { + EVT_HTML_CELL_CLICKED = wx.PyEventBinder( wxEVT_COMMAND_HTML_CELL_CLICKED, 1 ) + EVT_HTML_CELL_HOVER = wx.PyEventBinder( wxEVT_COMMAND_HTML_CELL_HOVER, 1 ) + EVT_HTML_LINK_CLICKED = wx.PyEventBinder( wxEVT_COMMAND_HTML_LINK_CLICKED, 1 ) +} + +//--------------------------------------------------------------------------- + MustHaveApp(wxHtmlHelpFrame); @@ -1594,7 +1621,9 @@ public: wxHtmlHelpFrame(wxWindow* parent, int wxWindowID, const wxString& title = wxPyEmptyString, - int style = wxHF_DEFAULTSTYLE, wxHtmlHelpData* data = NULL); + int style = wxHF_DEFAULTSTYLE, wxHtmlHelpData* data = NULL, + wxConfigBase *config=NULL, + const wxString& rootpath = wxPyEmptyString); %RenameCtor(PreHtmlHelpFrame, wxHtmlHelpFrame(wxHtmlHelpData* data = NULL)); // Turn it back on again @@ -1602,7 +1631,9 @@ public: bool Create(wxWindow* parent, wxWindowID id, const wxString& title = wxPyEmptyString, - int style = wxHF_DEFAULT_STYLE); + int style = wxHF_DEFAULT_STYLE, + wxConfigBase *config=NULL, + const wxString& rootpath = wxPyEmptyString); wxHtmlHelpData* GetData(); void SetTitleFormat(const wxString& format);