X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4617be085fb55acce74f4d4687b098918dc9d107..9c383901330c5c6d53a277c0549ae0eac6f0ecff:/wxPython/src/html.i?ds=inline diff --git a/wxPython/src/html.i b/wxPython/src/html.i index 651cfe2767..12396332c1 100644 --- a/wxPython/src/html.i +++ b/wxPython/src/html.i @@ -50,7 +50,6 @@ MAKE_CONST_WXSTRING2(HtmlPrintingTitleStr, wxT("Printing")) // TODO: Split this file into multiple %included files that coresponds to the // wx/html include files (more or less.) -//--------------------------------------------------------------------------- //--------------------------------------------------------------------------- %newgroup @@ -385,6 +384,10 @@ private: //--------------------------------------------------------------------------- + +%typemap(out) wxHtmlCell* { $result = wxPyMake_wxObject($1, $owner); } +%typemap(out) const wxHtmlCell* { $result = wxPyMake_wxObject($1, $owner); } + //--------------------------------------------------------------------------- %newgroup @@ -500,8 +503,13 @@ enum class wxHtmlCell : public wxObject { public: + %typemap(out) wxHtmlCell*; // turn off this typemap + wxHtmlCell(); + // Turn it back on again + %typemap(out) wxHtmlCell* { $result = wxPyMake_wxObject($1, $owner); } + int GetPosX(); int GetPosY(); int GetWidth(); @@ -583,6 +591,9 @@ class wxHtmlWordCell : public wxHtmlCell { public: wxHtmlWordCell(const wxString& word, wxDC& dc); + wxString ConvertToText(wxHtmlSelection *sel) const; + bool IsLinebreakAllowed() const; + void SetPreviousWord(wxHtmlWordCell *cell); }; @@ -730,7 +741,6 @@ public: } void OnLinkClicked(const wxHtmlLinkInfo& link); - void base_OnLinkClicked(const wxHtmlLinkInfo& link); wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType type, const wxString& url, @@ -760,9 +770,6 @@ void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) { if (! found) wxHtmlWindow::OnLinkClicked(link); } -void wxPyHtmlWindow::base_OnLinkClicked(const wxHtmlLinkInfo& link) { - wxHtmlWindow::OnLinkClicked(link); -} wxHtmlOpeningStatus wxPyHtmlWindow::OnOpeningURL(wxHtmlURLType type, @@ -939,12 +946,16 @@ public: // Converts current page to text: wxString ToText(); - void base_OnLinkClicked(const wxHtmlLinkInfo& link); - void base_OnSetTitle(const wxString& title); - void base_OnCellMouseHover(wxHtmlCell *cell, wxCoord x, wxCoord y); - void base_OnCellClicked(wxHtmlCell *cell, - wxCoord x, wxCoord y, - const wxMouseEvent& event); + void OnLinkClicked(const wxHtmlLinkInfo& link); + void OnSetTitle(const wxString& title); + void OnCellMouseHover(wxHtmlCell *cell, wxCoord x, wxCoord y); + void OnCellClicked(wxHtmlCell *cell, + wxCoord x, wxCoord y, + const wxMouseEvent& event); + %MAKE_BASE_FUNC(HtmlWindow, OnLinkClicked); + %MAKE_BASE_FUNC(HtmlWindow, OnSetTitle); + %MAKE_BASE_FUNC(HtmlWindow, OnCellMouseHover); + %MAKE_BASE_FUNC(HtmlWindow, OnCellClicked); static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); @@ -1139,10 +1150,6 @@ public: int GetCurIndex(); int GetMaxIndex(); const wxString& GetName(); - // WXWIN_COMPATIBILITY_2_4 -#if 0 - wxHtmlContentsItem* GetContentsItem(); -#endif }; //--------------------------------------------------------------------------- @@ -1165,13 +1172,6 @@ public: // TODO: this one needs fixed... const wxHtmlBookRecArray& GetBookRecArray(); - // WXWIN_COMPATIBILITY_2_4 -#if 0 - wxHtmlContentsItem* GetContents(); - int GetContentsCnt(); - wxHtmlContentsItem* GetIndex(); - int GetIndexCnt(); -#endif }; //--------------------------------------------------------------------------- @@ -1255,7 +1255,10 @@ public: wxHtmlHelpData* GetData(); wxHtmlHelpController* GetController() const; + + %disownarg( wxHtmlHelpController* controller ); void SetController(wxHtmlHelpController* controller); + %cleardisown( wxHtmlHelpController* controller ); // Displays page x. If not found it will offect the user a choice of // searching books. @@ -1360,7 +1363,9 @@ public: wxHtmlHelpController* GetController() const; /// Sets the help controller associated with the window. + %disownarg( wxHtmlHelpController* controller ); void SetController(wxHtmlHelpController* controller); + %cleardisown( wxHtmlHelpController* controller ); /// Returns the help window. wxHtmlHelpWindow* GetHelpWindow() const; @@ -1417,7 +1422,9 @@ public: wxHtmlHelpController* GetController() const; /// Sets the controller associated with this dialog. + %disownarg( wxHtmlHelpController* controller ); void SetController(wxHtmlHelpController* controller); + %cleardisown( wxHtmlHelpController* controller ); /// Returns the help window. wxHtmlHelpWindow* GetHelpWindow() const; @@ -1533,8 +1540,6 @@ public: void MakeModalIfNeeded(); wxWindow* FindTopLevelWindow(); - - %pythoncode { def Destroy(self): pass } };