1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/hyperlink.cpp
3 // Purpose: Hyperlink control
4 // Author: David Norris <danorris@gmail.com>
5 // Modified by: Ryan Norton, Francesco Montorsi
8 // Copyright: (c) 2005 David Norris
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 //===========================================================================
14 //===========================================================================
16 //---------------------------------------------------------------------------
17 // Pre-compiled header stuff
18 //---------------------------------------------------------------------------
20 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
21 #pragma implementation "hyperlink.h"
24 // For compilers that support precompilation, includes "wx.h".
25 #include "wx/wxprec.h"
31 #if wxUSE_XRC && wxUSE_HYPERLINKCTRL
33 //---------------------------------------------------------------------------
35 //---------------------------------------------------------------------------
37 #include "wx/xrc/xh_hyperlink.h"
42 #include "wx/hyperlink.h"
43 #include "wx/xrc/xmlres.h"
45 //===========================================================================
47 //===========================================================================
49 //---------------------------------------------------------------------------
50 // wxHyperlinkCtrlXmlHandler
51 //---------------------------------------------------------------------------
53 // Register with wxWindows' dynamic class subsystem.
54 IMPLEMENT_DYNAMIC_CLASS(wxHyperlinkCtrlXmlHandler
, wxXmlResourceHandler
)
56 wxHyperlinkCtrlXmlHandler::wxHyperlinkCtrlXmlHandler()
61 wxObject
*wxHyperlinkCtrlXmlHandler::DoCreateResource()
63 XRC_MAKE_INSTANCE(control
, wxHyperlinkCtrl
)
66 control
->Create(m_parentAsWindow
, GetID(),
67 GetParamValue(wxT("label")), GetParamValue(wxT("url")),
68 GetPosition(), GetSize(), GetStyle());
73 bool wxHyperlinkCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
75 return IsOfClass(node
, wxT("wxHyperlinkCtrl"));
78 #endif // wxUSE_XRC && wxUSE_HYPERLINKCTRL