projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixing searchctrl on osx_cocoa, changing type for peer to wxSearchCtrl
[wxWidgets.git]
/
src
/
xrc
/
xh_hyperlink.cpp
diff --git
a/src/xrc/xh_hyperlink.cpp
b/src/xrc/xh_hyperlink.cpp
index 21ea78724337c8dfc36b3533028695f32b14d34b..b70eb3f1fe6c5f1c17148c75e744f18a2dc63a8a 100644
(file)
--- a/
src/xrc/xh_hyperlink.cpp
+++ b/
src/xrc/xh_hyperlink.cpp
@@
-1,5
+1,5
@@
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: hyperlink.cpp
+// Name:
src/xrc/xh_
hyperlink.cpp
// Purpose: Hyperlink control
// Author: David Norris <danorris@gmail.com>
// Modified by: Ryan Norton, Francesco Montorsi
// Purpose: Hyperlink control
// Author: David Norris <danorris@gmail.com>
// Modified by: Ryan Norton, Francesco Montorsi
@@
-17,10
+17,6
@@
// Pre-compiled header stuff
//---------------------------------------------------------------------------
// 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"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
@@
-28,16
+24,19
@@
#pragma hdrstop
#endif
#pragma hdrstop
#endif
+#if wxUSE_XRC && wxUSE_HYPERLINKCTRL
+
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
-#include "wx/hyperlink.h"
-#include "wx/utils.h" // wxLaunchDefaultBrowser
-#include "wx/xrc/xmlres.h"
#include "wx/xrc/xh_hyperlink.h"
#include "wx/xrc/xh_hyperlink.h"
-#if wxUSE_HYPERLINKCTRL
+#ifndef WX_PRECOMP
+#endif
+
+#include "wx/hyperlink.h"
+#include "wx/xrc/xmlres.h"
//===========================================================================
// Implementation
//===========================================================================
// Implementation
@@
-52,6
+51,12
@@
IMPLEMENT_DYNAMIC_CLASS(wxHyperlinkCtrlXmlHandler, wxXmlResourceHandler)
wxHyperlinkCtrlXmlHandler::wxHyperlinkCtrlXmlHandler()
{
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();
}
AddWindowStyles();
}
@@
-59,10
+64,18
@@
wxObject *wxHyperlinkCtrlXmlHandler::DoCreateResource()
{
XRC_MAKE_INSTANCE(control, wxHyperlinkCtrl)
{
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);
SetupWindow(control);
- control->Create(m_parentAsWindow, GetID(),
- GetParamValue(wxT("label")), GetParamValue(wxT("url")),
- GetPosition(), GetSize(), GetStyle());
return control;
}
return control;
}
@@
-72,4
+85,4
@@
bool wxHyperlinkCtrlXmlHandler::CanHandle(wxXmlNode *node)
return IsOfClass(node, wxT("wxHyperlinkCtrl"));
}
return IsOfClass(node, wxT("wxHyperlinkCtrl"));
}
-#endif // wxUSE_HYPERLINKCTRL
+#endif // wxUSE_
XRC && wxUSE_
HYPERLINKCTRL