]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/hyperlink.cpp
add -mno-cygwin detection: we should treat cygwin as Windows, not Unix, when it's...
[wxWidgets.git] / src / generic / hyperlink.cpp
index 864ff142b16f8c2ccbe8f376199d3e3f2ef036a1..21f80fc13135f1f2602ea1688640e30291a36d36 100644 (file)
@@ -53,6 +53,8 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_HYPERLINK)
 // reserved for internal use only
 #define wxHYPERLINKCTRL_POPUP_COPY_ID           16384
 
+const wxChar wxHyperlinkCtrlNameStr[] = wxT("hyperlink");
+
 // ----------------------------------------------------------------------------
 // wxHyperlinkCtrl
 // ----------------------------------------------------------------------------
@@ -113,10 +115,8 @@ bool wxHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id,
     f.SetUnderlined(true);
     SetFont(f);
 
-    CacheBestSize(DoGetBestSize());
-    SetMinSize(GetBestSize());
-    SetSize (DoGetBestSize());
-
+    SetInitialSize(size);
+    
     return true;
 }
 
@@ -128,14 +128,11 @@ wxSize wxHyperlinkCtrl::DoGetBestSize() const
     dc.SetFont(GetFont());
     dc.GetTextExtent(GetLabel(), &w, &h);
 
-    return wxSize(w, h);
+    wxSize best(w, h);
+    CacheBestSize(best);
+    return best;
 }
 
-void wxHyperlinkCtrl::DoGetSize(int *width, int *height) const
-{
-    if (width) *width = GetBestSize().GetWidth();
-    if (height) *height = GetBestSize().GetHeight();
-}
 
 void wxHyperlinkCtrl::SetNormalColour(const wxColour &colour)
 {