// 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
#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"
// ============================================================================
IMPLEMENT_DYNAMIC_CLASS(wxHyperlinkCtrl, wxControl)
+IMPLEMENT_DYNAMIC_CLASS(wxHyperlinkEvent, wxCommandEvent)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_HYPERLINK)
// reserved for internal use only
if(url.empty())
SetURL(label);
else
- SetUrl(url);
+ SetURL(url);
if(label.empty())
SetLabel(url);
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