]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/stattext.cpp
Use std::isfinite() for wxFinite() for C++11 compilers.
[wxWidgets.git] / src / univ / stattext.cpp
index ea5d42a206ad653621f6d7a39d16a3487e858be9..a34cf8ad17ad9b178c7f3e20844073e8221e28cc 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     14.08.00
-// RCS-ID:      $Id$
 // Copyright:   (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -39,8 +38,6 @@
 // implementation
 // ============================================================================
 
-IMPLEMENT_ABSTRACT_CLASS(wxStaticText, wxControl)
-
 // ----------------------------------------------------------------------------
 // creation
 // ----------------------------------------------------------------------------
@@ -62,35 +59,12 @@ bool wxStaticText::Create(wxWindow *parent,
     return true;
 }
 
-// ----------------------------------------------------------------------------
-// size management
-// ----------------------------------------------------------------------------
-
-wxSize wxStaticText::DoGetBestClientSize() const
-{
-    wxStaticText *self = wxConstCast(this, wxStaticText);
-    wxClientDC dc(self);
-    dc.SetFont(GetFont());
-    wxCoord width, height;
-    dc.GetMultiLineTextExtent(GetLabel(), &width, &height);
-
-    return wxSize(width, height);
-}
-
 // ----------------------------------------------------------------------------
 // drawing
 // ----------------------------------------------------------------------------
 
 void wxStaticText::DoDraw(wxControlRenderer *renderer)
 {
-    if ( UseBgCol() )
-    {
-        wxDC& dc = renderer->GetDC();
-        dc.SetBrush(GetBackgroundColour());
-        dc.SetPen(*wxTRANSPARENT_PEN);
-        dc.DrawRectangle(renderer->GetRect());
-    }
-
     renderer->DrawLabel();
 }
 
@@ -99,8 +73,8 @@ void wxStaticText::SetLabel(const wxString& str)
     // save original label
     m_labelOrig = str;
 
-    // draw as real label the result of GetEllipsizedLabelWithoutMarkup:
-    DoSetLabel(GetEllipsizedLabelWithoutMarkup());
+    // draw as real label the abbreviated version of it
+    DoSetLabel(GetEllipsizedLabel());
 }
 
 void wxStaticText::DoSetLabel(const wxString& str)