X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/39bc0347fda3505f7fb43447f21efd84b9e00b3c..64ea838d8f4d1853b7d850db93ee565e901d099a:/src/univ/stattext.cpp diff --git a/src/univ/stattext.cpp b/src/univ/stattext.cpp index ea5d42a206..772a8e9b38 100644 --- a/src/univ/stattext.cpp +++ b/src/univ/stattext.cpp @@ -39,8 +39,6 @@ // implementation // ============================================================================ -IMPLEMENT_ABSTRACT_CLASS(wxStaticText, wxControl) - // ---------------------------------------------------------------------------- // creation // ---------------------------------------------------------------------------- @@ -62,35 +60,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 +74,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)