]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/motif/stattext.h | |
3 | // Purpose: wxStaticText class | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 17/09/98 | |
7 | // Copyright: (c) Julian Smart | |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifndef _WX_STATTEXT_H_ | |
12 | #define _WX_STATTEXT_H_ | |
13 | ||
14 | class WXDLLIMPEXP_CORE wxStaticText: public wxStaticTextBase | |
15 | { | |
16 | DECLARE_DYNAMIC_CLASS(wxStaticText) | |
17 | ||
18 | public: | |
19 | wxStaticText() { } | |
20 | ||
21 | wxStaticText(wxWindow *parent, wxWindowID id, | |
22 | const wxString& label, | |
23 | const wxPoint& pos = wxDefaultPosition, | |
24 | const wxSize& size = wxDefaultSize, | |
25 | long style = 0, | |
26 | const wxString& name = wxStaticTextNameStr) | |
27 | { | |
28 | Create(parent, id, label, pos, size, style, name); | |
29 | } | |
30 | ||
31 | bool Create(wxWindow *parent, wxWindowID id, | |
32 | const wxString& label, | |
33 | const wxPoint& pos = wxDefaultPosition, | |
34 | const wxSize& size = wxDefaultSize, | |
35 | long style = 0, | |
36 | const wxString& name = wxStaticTextNameStr); | |
37 | ||
38 | // implementation | |
39 | // -------------- | |
40 | ||
41 | // operations | |
42 | virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event)) | |
43 | { | |
44 | return false; | |
45 | } | |
46 | ||
47 | virtual void SetLabel(const wxString& label); | |
48 | ||
49 | // Get the widget that corresponds to the label | |
50 | // (for font setting, label setting etc.) | |
51 | virtual WXWidget GetLabelWidget() const | |
52 | { return m_labelWidget; } | |
53 | ||
54 | virtual void DoSetLabel(const wxString& str); | |
55 | virtual wxString DoGetLabel() const; | |
56 | ||
57 | virtual wxSize DoGetBestSize() const; | |
58 | protected: | |
59 | WXWidget m_labelWidget; | |
60 | }; | |
61 | ||
62 | #endif | |
63 | // _WX_STATTEXT_H_ |