X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b815cf68d24508ab76ace1ef439a6d4feffbd487..43c42c18d36c703a88b1b7b697bac27fe5608eca:/include/wx/hyperlink.h diff --git a/include/wx/hyperlink.h b/include/wx/hyperlink.h index 8478ede57b..969a6864d7 100644 --- a/include/wx/hyperlink.h +++ b/include/wx/hyperlink.h @@ -68,6 +68,8 @@ public: // NOTE: also wxWindow::Set/GetLabel, wxWindow::Set/GetBackgroundColour, // wxWindow::Get/SetFont, wxWindow::Get/SetCursor are important ! + virtual bool HasTransparentBackground() { return true; } + protected: virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } @@ -86,7 +88,7 @@ public: class WXDLLIMPEXP_FWD_ADV wxHyperlinkEvent; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_HYPERLINK, wxHyperlinkEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_HYPERLINK, wxHyperlinkEvent ); // // An event fired when the user clicks on the label in a hyperlink control. @@ -97,7 +99,7 @@ class WXDLLIMPEXP_ADV wxHyperlinkEvent : public wxCommandEvent public: wxHyperlinkEvent() {} wxHyperlinkEvent(wxObject *generator, wxWindowID id, const wxString& url) - : wxCommandEvent(wxEVT_COMMAND_HYPERLINK, id), + : wxCommandEvent(wxEVT_HYPERLINK, id), m_url(url) { SetEventObject(generator); @@ -130,12 +132,13 @@ typedef void (wxEvtHandler::*wxHyperlinkEventFunction)(wxHyperlinkEvent&); wxEVENT_HANDLER_CAST(wxHyperlinkEventFunction, func) #define EVT_HYPERLINK(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_HYPERLINK, id, wxHyperlinkEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_HYPERLINK, id, wxHyperlinkEventHandler(fn)) #if defined(__WXGTK210__) && !defined(__WXUNIVERSAL__) #include "wx/gtk/hyperlink.h" -#elif defined(__WXMSW__) && !defined(__WXUNIVERSAL__) +// Note that the native control is only available in Unicode version under MSW. +#elif defined(__WXMSW__) && wxUSE_UNICODE && !defined(__WXUNIVERSAL__) #include "wx/msw/hyperlink.h" #else #include "wx/generic/hyperlink.h" @@ -163,6 +166,8 @@ typedef void (wxEvtHandler::*wxHyperlinkEventFunction)(wxHyperlinkEvent&); }; #endif +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_HYPERLINK wxEVT_HYPERLINK #endif // wxUSE_HYPERLINKCTRL