]> git.saurik.com Git - wxWidgets.git/blob - include/wx/univ/stattext.h
maintaint the mouse capture stack in all ports, not just wxUniv
[wxWidgets.git] / include / wx / univ / stattext.h
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$
8 // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_UNIV_STATTEXT_H_
13 #define _WX_UNIV_STATTEXT_H_
14
15 #ifdef __GNUG__
16 #pragma interface "univstattext.h"
17 #endif
18
19 class WXDLLEXPORT wxStaticText : public wxStaticTextBase
20 {
21 public:
22 // usual ctor
23 wxStaticText(wxWindow *parent,
24 const wxString& label,
25 const wxPoint& pos = wxDefaultPosition,
26 const wxSize& size = wxDefaultSize)
27 {
28 Create(parent, -1, label, pos, size, 0, wxStaticTextNameStr);
29 }
30
31 // full form
32 wxStaticText(wxWindow *parent,
33 wxWindowID id,
34 const wxString& label,
35 const wxPoint& pos = wxDefaultPosition,
36 const wxSize& size = wxDefaultSize,
37 long style = 0,
38 const wxString &name = wxStaticTextNameStr)
39 {
40 Create(parent, id, label, pos, size, style, name);
41 }
42
43 // function ctor
44 bool Create(wxWindow *parent,
45 wxWindowID id,
46 const wxString &label,
47 const wxPoint &pos = wxDefaultPosition,
48 const wxSize &size = wxDefaultSize,
49 long style = 0,
50 const wxString &name = wxStaticTextNameStr);
51
52 // implementation only from now on
53
54 virtual void SetLabel(const wxString& label);
55
56 protected:
57 // calculate the optimal size for the label
58 virtual wxSize DoGetBestClientSize() const;
59
60 // draw the control
61 virtual void DoDraw(wxControlRenderer *renderer);
62
63 DECLARE_ABSTRACT_CLASS(wxStaticText)
64 };
65
66 #endif // _WX_UNIV_STATTEXT_H_