X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/98159dd8b62759836ee48049e581e4c2be542cf0..24aab8e81a8627802e4111d9c99a50ece8d0026e:/src/generic/hyperlink.cpp diff --git a/src/generic/hyperlink.cpp b/src/generic/hyperlink.cpp index 54c6a9a092..fb245d32b2 100644 --- a/src/generic/hyperlink.cpp +++ b/src/generic/hyperlink.cpp @@ -17,15 +17,11 @@ // Pre-compiled header stuff //--------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "hyperlink.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif #if wxUSE_HYPERLINKCTRL @@ -38,6 +34,10 @@ #ifndef WX_PRECOMP #include "wx/utils.h" // for wxLaunchDefaultBrowser + #include "wx/dcclient.h" + #include "wx/menu.h" + #include "wx/log.h" + #include "wx/dataobj.h" #endif #include "wx/clipbrd.h" @@ -47,6 +47,7 @@ // ============================================================================ IMPLEMENT_DYNAMIC_CLASS(wxHyperlinkCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxHyperlinkEvent, wxCommandEvent) DEFINE_EVENT_TYPE(wxEVT_COMMAND_HYPERLINK) // reserved for internal use only @@ -82,7 +83,7 @@ bool wxHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id, if(url.empty()) SetURL(label); else - SetUrl(url); + SetURL(url); if(label.empty()) SetLabel(url); @@ -218,12 +219,14 @@ void wxHyperlinkCtrl::OnLeaveWindow(wxMouseEvent& WXUNUSED(event)) void wxHyperlinkCtrl::OnPopUpCopy( wxCommandEvent& WXUNUSED(event) ) { +#if wxUSE_CLIPBOARD if (!wxTheClipboard->Open()) return; wxTextDataObject *data = new wxTextDataObject( m_url ); wxTheClipboard->SetData( data ); wxTheClipboard->Close(); +#endif // wxUSE_CLIPBOARD } #endif // wxUSE_HYPERLINKCTRL