1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_hyperlink.cpp
3 // Purpose: Hyperlink control
4 // Author: David Norris <danorris@gmail.com>
5 // Modified by: Ryan Norton, Francesco Montorsi
7 // Copyright: (c) 2005 David Norris
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 //===========================================================================
13 //===========================================================================
15 //---------------------------------------------------------------------------
16 // Pre-compiled header stuff
17 //---------------------------------------------------------------------------
19 // For compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.h"
26 #if wxUSE_XRC && wxUSE_HYPERLINKCTRL
28 //---------------------------------------------------------------------------
30 //---------------------------------------------------------------------------
32 #include "wx/xrc/xh_hyperlink.h"
37 #include "wx/hyperlink.h"
38 #include "wx/xrc/xmlres.h"
40 //===========================================================================
42 //===========================================================================
44 //---------------------------------------------------------------------------
45 // wxHyperlinkCtrlXmlHandler
46 //---------------------------------------------------------------------------
48 // Register with wxWindows' dynamic class subsystem.
49 IMPLEMENT_DYNAMIC_CLASS(wxHyperlinkCtrlXmlHandler
, wxXmlResourceHandler
)
51 wxHyperlinkCtrlXmlHandler::wxHyperlinkCtrlXmlHandler()
53 XRC_ADD_STYLE(wxHL_CONTEXTMENU
);
54 XRC_ADD_STYLE(wxHL_ALIGN_LEFT
);
55 XRC_ADD_STYLE(wxHL_ALIGN_RIGHT
);
56 XRC_ADD_STYLE(wxHL_ALIGN_CENTRE
);
57 XRC_ADD_STYLE(wxHL_DEFAULT_STYLE
);
62 wxObject
*wxHyperlinkCtrlXmlHandler::DoCreateResource()
64 XRC_MAKE_INSTANCE(control
, wxHyperlinkCtrl
)
70 GetText(wxT("label")),
71 GetParamValue(wxT("url")),
72 GetPosition(), GetSize(),
73 GetStyle(wxT("style"), wxHL_DEFAULT_STYLE
),
82 bool wxHyperlinkCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
84 return IsOfClass(node
, wxT("wxHyperlinkCtrl"));
87 #endif // wxUSE_XRC && wxUSE_HYPERLINKCTRL