]>
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
7 // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // ============================================================================
13 // ============================================================================
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 #include "wx/wxprec.h"
27 #include "wx/stattext.h"
30 #include "wx/dcclient.h"
31 #include "wx/validate.h"
34 #include "wx/univ/renderer.h"
35 #include "wx/univ/theme.h"
37 // ============================================================================
39 // ============================================================================
41 // ----------------------------------------------------------------------------
43 // ----------------------------------------------------------------------------
45 bool wxStaticText::Create(wxWindow
*parent
,
47 const wxString
&label
,
53 if ( !wxControl::Create(parent
, id
, pos
, size
, style
, wxDefaultValidator
, name
) )
62 // ----------------------------------------------------------------------------
64 // ----------------------------------------------------------------------------
66 void wxStaticText::DoDraw(wxControlRenderer
*renderer
)
68 renderer
->DrawLabel();
71 void wxStaticText::SetLabel(const wxString
& str
)
73 // save original label
76 // draw as real label the abbreviated version of it
77 DoSetLabel(GetEllipsizedLabel());
80 void wxStaticText::DoSetLabel(const wxString
& str
)
85 wxString
wxStaticText::DoGetLabel() const
87 return wxControl::GetLabel();
91 FIXME: UpdateLabel() should be called on size events to allow correct
92 dynamic ellipsizing of the label
95 #endif // wxUSE_STATTEXT