]>
Commit | Line | Data |
---|---|---|
1e6feb95 VZ |
1 | ////////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/univ/statbox.h | |
3 | // Purpose: wxStaticBox declaration | |
4 | // Author: Vadim Zeitlin | |
5 | // Modified by: | |
6 | // Created: 15.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_STATBOX_H_ | |
13 | #define _WX_UNIV_STATBOX_H_ | |
14 | ||
1e6feb95 VZ |
15 | class WXDLLEXPORT wxStaticBox : public wxStaticBoxBase |
16 | { | |
17 | public: | |
18 | wxStaticBox() { } | |
19 | ||
20 | wxStaticBox(wxWindow *parent, | |
21 | const wxString& label, | |
22 | const wxPoint& pos = wxDefaultPosition, | |
23 | const wxSize& size = wxDefaultSize) | |
24 | { | |
a290fa5a | 25 | Create(parent, wxID_ANY, label, pos, size); |
1e6feb95 VZ |
26 | } |
27 | ||
28 | wxStaticBox(wxWindow *parent, wxWindowID id, | |
29 | const wxString& label, | |
30 | const wxPoint& pos = wxDefaultPosition, | |
31 | const wxSize& size = wxDefaultSize, | |
32 | long style = 0, | |
33 | const wxString& name = wxStaticBoxNameStr) | |
34 | { | |
35 | Create(parent, id, label, pos, size, style, name); | |
36 | } | |
37 | ||
38 | bool Create(wxWindow *parent, | |
39 | wxWindowID id, | |
40 | const wxString& label, | |
41 | const wxPoint& pos = wxDefaultPosition, | |
42 | const wxSize& size = wxDefaultSize, | |
43 | long style = 0, | |
44 | const wxString& name = wxStaticBoxNameStr); | |
45 | ||
46 | // the origin of the static box is inside the border and under the label: | |
47 | // take account of this | |
48 | virtual wxPoint GetBoxAreaOrigin() const; | |
49 | ||
50 | protected: | |
51 | // draw the control | |
52 | virtual void DoDraw(wxControlRenderer *renderer); | |
53 | ||
54 | // get the size of the border | |
55 | wxRect GetBorderGeometry() const; | |
56 | ||
a290fa5a | 57 | // returning true from here ensures that we act as a container window for |
30827629 | 58 | // our children |
a290fa5a | 59 | virtual bool IsStaticBox() const { return true; } |
30827629 | 60 | |
1e6feb95 VZ |
61 | private: |
62 | DECLARE_DYNAMIC_CLASS(wxStaticBox) | |
63 | }; | |
64 | ||
65 | #endif // _WX_UNIV_STATBOX_H_ |