X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/28583246911da03843797b5090a1eef68b1707a3..486a0fa75f8ae4ef12968ef0eee8b54b066d11af:/src/xrc/xh_hyperlink.cpp diff --git a/src/xrc/xh_hyperlink.cpp b/src/xrc/xh_hyperlink.cpp index f4a7424993..870b7b4707 100644 --- a/src/xrc/xh_hyperlink.cpp +++ b/src/xrc/xh_hyperlink.cpp @@ -1,10 +1,9 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/xrc/hyperlink.cpp +// Name: src/xrc/xh_hyperlink.cpp // Purpose: Hyperlink control // Author: David Norris // Modified by: Ryan Norton, Francesco Montorsi // Created: 04/02/2005 -// RCS-ID: $Id$ // Copyright: (c) 2005 David Norris // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -17,10 +16,6 @@ // 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" @@ -55,6 +50,12 @@ IMPLEMENT_DYNAMIC_CLASS(wxHyperlinkCtrlXmlHandler, wxXmlResourceHandler) wxHyperlinkCtrlXmlHandler::wxHyperlinkCtrlXmlHandler() { + XRC_ADD_STYLE(wxHL_CONTEXTMENU); + XRC_ADD_STYLE(wxHL_ALIGN_LEFT); + XRC_ADD_STYLE(wxHL_ALIGN_RIGHT); + XRC_ADD_STYLE(wxHL_ALIGN_CENTRE); + XRC_ADD_STYLE(wxHL_DEFAULT_STYLE); + AddWindowStyles(); } @@ -62,10 +63,18 @@ wxObject *wxHyperlinkCtrlXmlHandler::DoCreateResource() { XRC_MAKE_INSTANCE(control, wxHyperlinkCtrl) + control->Create + ( + m_parentAsWindow, + GetID(), + GetText(wxT("label")), + GetParamValue(wxT("url")), + GetPosition(), GetSize(), + GetStyle(wxT("style"), wxHL_DEFAULT_STYLE), + GetName() + ); + SetupWindow(control); - control->Create(m_parentAsWindow, GetID(), - GetParamValue(wxT("label")), GetParamValue(wxT("url")), - GetPosition(), GetSize(), GetStyle()); return control; }