]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_hyperlink.cpp
Use t_str() instead of c_str()
[wxWidgets.git] / src / xrc / xh_hyperlink.cpp
index f4a7424993992986f4b6a4aa1629f562aec73a2a..2976cc26fa7add6fed521e3113cbe6fba9a1f212 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        src/xrc/hyperlink.cpp
+// Name:        src/xrc/xh_hyperlink.cpp
 // Purpose:     Hyperlink control
 // Author:      David Norris <danorris@gmail.com>
 // Modified by: Ryan Norton, Francesco Montorsi
 // 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 +51,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 +64,13 @@ wxObject *wxHyperlinkCtrlXmlHandler::DoCreateResource()
 {
     XRC_MAKE_INSTANCE(control, wxHyperlinkCtrl)
 
-    SetupWindow(control);
     control->Create(m_parentAsWindow, GetID(),
         GetParamValue(wxT("label")), GetParamValue(wxT("url")),
-        GetPosition(), GetSize(), GetStyle());
+        GetPosition(), GetSize(),
+        GetStyle(wxT("style"), wxHL_DEFAULT_STYLE),
+        GetName());
+
+    SetupWindow(control);
 
     return control;
 }