]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/statbox.h
undo the last change as it results in buildbot configuration error
[wxWidgets.git] / interface / wx / statbox.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: statbox.h
e54c96f1 3// Purpose: interface of wxStaticBox
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxStaticBox
7c913512 11
f3289ffb 12 A static box is a rectangle drawn around other windows to denote
23324ae1 13 a logical grouping of items.
7c913512 14
39cdc95f
FM
15 Note that since wxWidgets 2.9.0 you are encouraged to build the windows which are
16 placed inside wxStaticBoxes as children of the wxStaticBox itself:
17 @code
18 ...
19 wxStaticBox *stbox = new wxStaticBox(parentWindow, wxID_ANY, "StaticBox");
20
21 new wxStaticText(stbox, "This window is a child of the staticbox");
22 ...
23 @endcode
f3289ffb 24
39cdc95f
FM
25 Creating the windows which are placed inside wxStaticBoxes as siblings of the
26 wxStaticBox is still allowed but it's deprecated as it gives some problems
27 (e.g. relative to tooltips) on some ports.
28
29 Also note that there is a specialized wxSizer class (wxStaticBoxSizer) which can
30 be used as an easier way to pack items into a static box.
7c913512 31
23324ae1
FM
32 @library{wxcore}
33 @category{ctrl}
7e59b885 34 @appearance{staticbox.png}
7c913512 35
f3289ffb 36 @see wxStaticText, wxStaticBoxSizer
23324ae1
FM
37*/
38class wxStaticBox : public wxControl
39{
40public:
671600d8
RR
41 /**
42 Default constructor
43 */
44 wxStaticBox();
4701dc09 45
23324ae1
FM
46 /**
47 Constructor, creating and showing a static box.
3c4f71cc 48
7c913512 49 @param parent
4cc4bfaf 50 Parent window. Must not be @NULL.
7c913512 51 @param id
4cc4bfaf 52 Window identifier. The value wxID_ANY indicates a default value.
7c913512 53 @param label
4cc4bfaf 54 Text to be displayed in the static box, the empty string for no label.
7c913512 55 @param pos
4701dc09 56 Window position.
f3289ffb 57 If ::wxDefaultPosition is specified then a default position is chosen.
7c913512 58 @param size
4701dc09 59 Checkbox size.
f3289ffb 60 If ::wxDefaultSize is specified then a default size is chosen.
7c913512 61 @param style
4cc4bfaf 62 Window style. See wxStaticBox.
7c913512 63 @param name
4cc4bfaf 64 Window name.
3c4f71cc 65
4cc4bfaf 66 @see Create()
23324ae1 67 */
7c913512
FM
68 wxStaticBox(wxWindow* parent, wxWindowID id,
69 const wxString& label,
70 const wxPoint& pos = wxDefaultPosition,
71 const wxSize& size = wxDefaultSize,
72 long style = 0,
11e3af6e 73 const wxString& name = wxStaticBoxNameStr);
23324ae1
FM
74
75 /**
76 Destructor, destroying the group box.
77 */
adaaa686 78 virtual ~wxStaticBox();
23324ae1
FM
79
80 /**
4701dc09
FM
81 Creates the static box for two-step construction.
82 See wxStaticBox() for further details.
23324ae1 83 */
5267aefd 84 bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
23324ae1 85 const wxPoint& pos = wxDefaultPosition,
5267aefd
FM
86 const wxSize& size = wxDefaultSize, long style = 0,
87 const wxString& name = wxStaticBoxNameStr);
23324ae1 88};
e54c96f1 89