]>
git.saurik.com Git - wxWidgets.git/blob - src/univ/stattext.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/univ/stattext.cpp
3 // Purpose: wxStaticText
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 #include "wx/wxprec.h"
28 #include "wx/stattext.h"
31 #include "wx/dcclient.h"
32 #include "wx/validate.h"
35 #include "wx/univ/renderer.h"
36 #include "wx/univ/theme.h"
38 // ============================================================================
40 // ============================================================================
42 IMPLEMENT_ABSTRACT_CLASS(wxStaticText
, wxGenericStaticText
)
44 // ----------------------------------------------------------------------------
46 // ----------------------------------------------------------------------------
48 bool wxStaticText::Create(wxWindow
*parent
,
50 const wxString
&label
,
56 if ( !wxControl::Create(parent
, id
, pos
, size
, style
, wxDefaultValidator
, name
) )
65 // ----------------------------------------------------------------------------
67 // ----------------------------------------------------------------------------
69 void wxStaticText::DoDraw(wxControlRenderer
*renderer
)
71 renderer
->DrawLabel();
74 void wxStaticText::SetLabel(const wxString
& str
)
76 // save original label
79 // draw as real label the result of GetEllipsizedLabelWithoutMarkup:
80 DoSetLabel(GetEllipsizedLabelWithoutMarkup());
83 void wxStaticText::DoSetLabel(const wxString
& str
)
88 wxString
wxStaticText::DoGetLabel() const
90 return wxControl::GetLabel();
94 FIXME: UpdateLabel() should be called on size events to allow correct
95 dynamic ellipsizing of the label
98 #endif // wxUSE_STATTEXT