name wxStaticBoxSizer; some other minor wording clarifications
[wxWidgets.git] / interface / wx / statbox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: statbox.h
3 // Purpose: interface of wxStaticBox
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxStaticBox
11
12 A static box is a rectangle drawn around other windows to denote
13 a logical grouping of items.
14
15 Please note that a static box should @b not be used as the parent for the
16 controls it contains, instead they should be @b siblings of each other.
17 Although using a static box as a parent might work in some ports of wxWidgets,
18 it would result in a crash under, for example, wxGTK, and thus it's explicitely
19 disallowed (an assertion will fail if you try to add children to a wxStaticBox).
20
21 Also, please note that because of this, the order in which you create new
22 controls is important. Create your wxStaticBox control @b before any
23 siblings that are to appear inside the wxStaticBox in order to preserve the
24 correct Z-order of controls.
25
26 You may want to use wxStaticBoxSizer instead of wxStaticBox to avoid this problem.
27
28 @library{wxcore}
29 @category{ctrl}
30 @appearance{staticbox.png}
31
32 @see wxStaticText, wxStaticBoxSizer
33 */
34 class wxStaticBox : public wxControl
35 {
36 public:
37 /**
38 Default constructor
39 */
40 wxStaticBox();
41
42 /**
43 Constructor, creating and showing a static box.
44
45 @param parent
46 Parent window. Must not be @NULL.
47 @param id
48 Window identifier. The value wxID_ANY indicates a default value.
49 @param label
50 Text to be displayed in the static box, the empty string for no label.
51 @param pos
52 Window position.
53 If ::wxDefaultPosition is specified then a default position is chosen.
54 @param size
55 Checkbox size.
56 If ::wxDefaultSize is specified then a default size is chosen.
57 @param style
58 Window style. See wxStaticBox.
59 @param name
60 Window name.
61
62 @see Create()
63 */
64 wxStaticBox(wxWindow* parent, wxWindowID id,
65 const wxString& label,
66 const wxPoint& pos = wxDefaultPosition,
67 const wxSize& size = wxDefaultSize,
68 long style = 0,
69 const wxString& name = wxStaticBoxNameStr);
70
71 /**
72 Destructor, destroying the group box.
73 */
74 virtual ~wxStaticBox();
75
76 /**
77 Creates the static box for two-step construction.
78 See wxStaticBox() for further details.
79 */
80 bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
81 const wxPoint& pos = wxDefaultPosition,
82 const wxSize& size = wxDefaultSize, long style = 0,
83 const wxString& name = wxStaticBoxNameStr);
84 };
85