]>
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) |
1e6feb95 VZ |
9 | // Licence: wxWindows license |
10 | /////////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_UNIV_STATBOX_H_ | |
13 | #define _WX_UNIV_STATBOX_H_ | |
14 | ||
15 | #ifdef __GNUG__ | |
a3870b2f | 16 | #pragma interface "univstatbox.h" |
1e6feb95 VZ |
17 | #endif |
18 | ||
19 | class WXDLLEXPORT wxStaticBox : public wxStaticBoxBase | |
20 | { | |
21 | public: | |
22 | wxStaticBox() { } | |
23 | ||
24 | wxStaticBox(wxWindow *parent, | |
25 | const wxString& label, | |
26 | const wxPoint& pos = wxDefaultPosition, | |
27 | const wxSize& size = wxDefaultSize) | |
28 | { | |
29 | Create(parent, -1, label, pos, size); | |
30 | } | |
31 | ||
32 | wxStaticBox(wxWindow *parent, wxWindowID id, | |
33 | const wxString& label, | |
34 | const wxPoint& pos = wxDefaultPosition, | |
35 | const wxSize& size = wxDefaultSize, | |
36 | long style = 0, | |
37 | const wxString& name = wxStaticBoxNameStr) | |
38 | { | |
39 | Create(parent, id, label, pos, size, style, name); | |
40 | } | |
41 | ||
42 | bool Create(wxWindow *parent, | |
43 | wxWindowID id, | |
44 | const wxString& label, | |
45 | const wxPoint& pos = wxDefaultPosition, | |
46 | const wxSize& size = wxDefaultSize, | |
47 | long style = 0, | |
48 | const wxString& name = wxStaticBoxNameStr); | |
49 | ||
50 | // the origin of the static box is inside the border and under the label: | |
51 | // take account of this | |
52 | virtual wxPoint GetBoxAreaOrigin() const; | |
53 | ||
54 | protected: | |
55 | // draw the control | |
56 | virtual void DoDraw(wxControlRenderer *renderer); | |
57 | ||
58 | // get the size of the border | |
59 | wxRect GetBorderGeometry() const; | |
60 | ||
30827629 VZ |
61 | // returning TRUE from here ensures that we act as a container window for |
62 | // our children | |
63 | virtual bool IsStaticBox() const { return TRUE; } | |
64 | ||
1e6feb95 VZ |
65 | private: |
66 | DECLARE_DYNAMIC_CLASS(wxStaticBox) | |
67 | }; | |
68 | ||
69 | #endif // _WX_UNIV_STATBOX_H_ |