]>
Commit | Line | Data |
---|---|---|
1e6feb95 VZ |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/univ/stattext.h | |
3 | // Purpose: wxStaticText | |
4 | // Author: Vadim Zeitlin | |
5 | // Modified by: | |
6 | // Created: 14.08.00 | |
7 | // RCS-ID: $Id$ | |
442b35b5 | 8 | // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) |
65571936 | 9 | // Licence: wxWindows licence |
1e6feb95 VZ |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_UNIV_STATTEXT_H_ | |
13 | #define _WX_UNIV_STATTEXT_H_ | |
14 | ||
12028905 | 15 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
a3870b2f | 16 | #pragma interface "univstattext.h" |
1e6feb95 VZ |
17 | #endif |
18 | ||
19 | class WXDLLEXPORT wxStaticText : public wxStaticTextBase | |
20 | { | |
21 | public: | |
55e0770e VS |
22 | wxStaticText() { } |
23 | ||
1e6feb95 VZ |
24 | // usual ctor |
25 | wxStaticText(wxWindow *parent, | |
26 | const wxString& label, | |
27 | const wxPoint& pos = wxDefaultPosition, | |
28 | const wxSize& size = wxDefaultSize) | |
29 | { | |
a290fa5a | 30 | Create(parent, wxID_ANY, label, pos, size, 0, wxStaticTextNameStr); |
1e6feb95 VZ |
31 | } |
32 | ||
33 | // full form | |
34 | wxStaticText(wxWindow *parent, | |
35 | wxWindowID id, | |
36 | const wxString& label, | |
37 | const wxPoint& pos = wxDefaultPosition, | |
3379ed37 | 38 | const wxSize& size = wxDefaultSize, |
1e6feb95 VZ |
39 | long style = 0, |
40 | const wxString &name = wxStaticTextNameStr) | |
41 | { | |
42 | Create(parent, id, label, pos, size, style, name); | |
43 | } | |
44 | ||
45 | // function ctor | |
46 | bool Create(wxWindow *parent, | |
47 | wxWindowID id, | |
48 | const wxString &label, | |
49 | const wxPoint &pos = wxDefaultPosition, | |
3379ed37 | 50 | const wxSize &size = wxDefaultSize, |
1e6feb95 VZ |
51 | long style = 0, |
52 | const wxString &name = wxStaticTextNameStr); | |
53 | ||
54 | // implementation only from now on | |
55 | ||
56 | virtual void SetLabel(const wxString& label); | |
57 | ||
a290fa5a | 58 | virtual bool IsFocused() const { return false; } |
2cdd094b | 59 | |
1e6feb95 VZ |
60 | protected: |
61 | // calculate the optimal size for the label | |
62 | virtual wxSize DoGetBestClientSize() const; | |
63 | ||
64 | // draw the control | |
65 | virtual void DoDraw(wxControlRenderer *renderer); | |
3379ed37 VZ |
66 | |
67 | DECLARE_ABSTRACT_CLASS(wxStaticText) | |
1e6feb95 VZ |
68 | }; |
69 | ||
70 | #endif // _WX_UNIV_STATTEXT_H_ |