wxWidgets/interface/wx/statbox.h
Vadim Zeitlin 3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00

102 lines
3.2 KiB
Objective-C

/////////////////////////////////////////////////////////////////////////////
// Name: statbox.h
// Purpose: interface of wxStaticBox
// Author: wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/**
@class wxStaticBox
A static box is a rectangle drawn around other windows to denote
a logical grouping of items.
Note that while the previous versions required that windows appearing
inside a static box be created as its siblings (i.e. use the same parent as
the static box itself), since wxWidgets 2.9.1 it is also possible to create
them as children of wxStaticBox itself and you are actually encouraged to
do it like this if compatibility with the previous versions is not
important.
So the new recommended way to create static box is:
@code
void MyFrame::CreateControls()
{
wxPanel *panel = new wxPanel(this);
wxStaticBox *box = new wxStaticBox(panel, wxID_ANY, "StaticBox");
new wxStaticText(box, wxID_ANY "This window is a child of the staticbox");
...
}
@endcode
While the compatible -- and now deprecated -- way is
@code
wxStaticBox *box = new wxStaticBox(panel, wxID_ANY, "StaticBox");
new wxStaticText(panel, wxID_ANY "This window is a child of the panel");
...
@endcode
Also note that there is a specialized wxSizer class (wxStaticBoxSizer) which can
be used as an easier way to pack items into a static box.
@library{wxcore}
@category{ctrl}
@appearance{staticbox}
@see wxStaticText, wxStaticBoxSizer
*/
class wxStaticBox : public wxControl
{
public:
/**
Default constructor
*/
wxStaticBox();
/**
Constructor, creating and showing a static box.
@param parent
Parent window. Must not be @NULL.
@param id
Window identifier. The value wxID_ANY indicates a default value.
@param label
Text to be displayed in the static box, the empty string for no label.
@param pos
Window position.
If ::wxDefaultPosition is specified then a default position is chosen.
@param size
Checkbox size.
If ::wxDefaultSize is specified then a default size is chosen.
@param style
Window style. See wxStaticBox.
@param name
Window name.
@see Create()
*/
wxStaticBox(wxWindow* parent, wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBoxNameStr);
/**
Destructor, destroying the group box.
*/
virtual ~wxStaticBox();
/**
Creates the static box for two-step construction.
See wxStaticBox() for further details.
*/
bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxString& name = wxStaticBoxNameStr);
};