]>
Commit | Line | Data |
---|---|---|
0e320a79 DW |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: stattext.h | |
3 | // Purpose: wxStaticText class | |
d90895ac | 4 | // Author: David Webster |
0e320a79 | 5 | // Modified by: |
d90895ac | 6 | // Created: 10/17/99 |
0e320a79 | 7 | // RCS-ID: $Id$ |
d90895ac DW |
8 | // Copyright: (c) David Webster |
9 | // Licence: wxWindows licence | |
0e320a79 DW |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_STATTEXT_H_ | |
13 | #define _WX_STATTEXT_H_ | |
14 | ||
15 | #ifdef __GNUG__ | |
16 | #pragma interface "stattext.h" | |
17 | #endif | |
18 | ||
19 | #include "wx/control.h" | |
20 | ||
21 | WXDLLEXPORT_DATA(extern const char*) wxStaticTextNameStr; | |
22 | ||
23 | class WXDLLEXPORT wxStaticText: public wxControl | |
24 | { | |
d90895ac DW |
25 | DECLARE_DYNAMIC_CLASS(wxStaticText) |
26 | ||
0e320a79 | 27 | public: |
d90895ac | 28 | inline wxStaticText() { } |
0e320a79 | 29 | |
d90895ac | 30 | inline wxStaticText(wxWindow *parent, wxWindowID id, |
0e320a79 DW |
31 | const wxString& label, |
32 | const wxPoint& pos = wxDefaultPosition, | |
33 | const wxSize& size = wxDefaultSize, | |
34 | long style = 0, | |
35 | const wxString& name = wxStaticTextNameStr) | |
d90895ac DW |
36 | { |
37 | Create(parent, id, label, pos, size, style, name); | |
38 | } | |
0e320a79 | 39 | |
d90895ac | 40 | bool Create(wxWindow *parent, wxWindowID id, |
0e320a79 DW |
41 | const wxString& label, |
42 | const wxPoint& pos = wxDefaultPosition, | |
43 | const wxSize& size = wxDefaultSize, | |
44 | long style = 0, | |
45 | const wxString& name = wxStaticTextNameStr); | |
46 | ||
d90895ac DW |
47 | // accessors |
48 | void SetLabel(const wxString&); | |
49 | ||
50 | // overriden base class virtuals | |
51 | virtual bool AcceptsFocus() const { return FALSE; } | |
52 | ||
53 | // callbacks | |
54 | virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, | |
55 | WXUINT message, WXWPARAM wParam, WXLPARAM lParam); | |
a885d89a | 56 | virtual MRESULT OS2WindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); |
0e320a79 | 57 | |
d90895ac | 58 | protected: |
e78c4d50 | 59 | virtual wxSize DoGetBestSize() const; |
0e320a79 DW |
60 | }; |
61 | ||
62 | #endif | |
63 | // _WX_STATTEXT_H_ |