]>
git.saurik.com Git - wxWidgets.git/blob - src/univ/stattext.cpp
772a8e9b38af25a535933a3a14d5bef69045dd93
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 // ----------------------------------------------------------------------------
44 // ----------------------------------------------------------------------------
46 bool wxStaticText::Create(wxWindow
*parent
,
48 const wxString
&label
,
54 if ( !wxControl::Create(parent
, id
, pos
, size
, style
, wxDefaultValidator
, name
) )
63 // ----------------------------------------------------------------------------
65 // ----------------------------------------------------------------------------
67 void wxStaticText::DoDraw(wxControlRenderer
*renderer
)
69 renderer
->DrawLabel();
72 void wxStaticText::SetLabel(const wxString
& str
)
74 // save original label
77 // draw as real label the abbreviated version of it
78 DoSetLabel(GetEllipsizedLabel());
81 void wxStaticText::DoSetLabel(const wxString
& str
)
86 wxString
wxStaticText::DoGetLabel() const
88 return wxControl::GetLabel();
92 FIXME: UpdateLabel() should be called on size events to allow correct
93 dynamic ellipsizing of the label
96 #endif // wxUSE_STATTEXT