2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: statbox.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxStaticBox
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxStaticBox
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2009-04-19 15:46:36 -04:00
|
|
|
A static box is a rectangle drawn around other windows to denote
|
2008-03-08 08:52:38 -05:00
|
|
|
a logical grouping of items.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2009-04-25 06:49:36 -04:00
|
|
|
Note that since wxWidgets 2.9.0 you are encouraged to build the windows which are
|
|
|
|
placed inside wxStaticBoxes as children of the wxStaticBox itself:
|
|
|
|
@code
|
|
|
|
...
|
|
|
|
wxStaticBox *stbox = new wxStaticBox(parentWindow, wxID_ANY, "StaticBox");
|
|
|
|
|
|
|
|
new wxStaticText(stbox, "This window is a child of the staticbox");
|
|
|
|
...
|
|
|
|
@endcode
|
2009-04-19 15:46:36 -04:00
|
|
|
|
2009-04-25 06:49:36 -04:00
|
|
|
Creating the windows which are placed inside wxStaticBoxes as siblings of the
|
|
|
|
wxStaticBox is still allowed but it's deprecated as it gives some problems
|
|
|
|
(e.g. relative to tooltips) on some ports.
|
|
|
|
|
|
|
|
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.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxcore}
|
|
|
|
@category{ctrl}
|
2008-10-13 04:05:18 -04:00
|
|
|
@appearance{staticbox.png}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2009-04-19 15:46:36 -04:00
|
|
|
@see wxStaticText, wxStaticBoxSizer
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxStaticBox : public wxControl
|
|
|
|
{
|
|
|
|
public:
|
2008-05-29 10:10:52 -04:00
|
|
|
/**
|
|
|
|
Default constructor
|
|
|
|
*/
|
|
|
|
wxStaticBox();
|
2008-10-07 12:57:34 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
Constructor, creating and showing a static box.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param parent
|
2008-03-09 08:33:59 -04:00
|
|
|
Parent window. Must not be @NULL.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param id
|
2008-03-09 08:33:59 -04:00
|
|
|
Window identifier. The value wxID_ANY indicates a default value.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param label
|
2008-03-09 08:33:59 -04:00
|
|
|
Text to be displayed in the static box, the empty string for no label.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param pos
|
2008-10-07 12:57:34 -04:00
|
|
|
Window position.
|
2009-04-19 15:46:36 -04:00
|
|
|
If ::wxDefaultPosition is specified then a default position is chosen.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param size
|
2008-10-07 12:57:34 -04:00
|
|
|
Checkbox size.
|
2009-04-19 15:46:36 -04:00
|
|
|
If ::wxDefaultSize is specified then a default size is chosen.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param style
|
2008-03-09 08:33:59 -04:00
|
|
|
Window style. See wxStaticBox.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param name
|
2008-03-09 08:33:59 -04:00
|
|
|
Window name.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see Create()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-08 09:43:31 -05:00
|
|
|
wxStaticBox(wxWindow* parent, wxWindowID id,
|
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
2008-11-13 16:32:53 -05:00
|
|
|
const wxString& name = wxStaticBoxNameStr);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Destructor, destroying the group box.
|
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual ~wxStaticBox();
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-10-07 12:57:34 -04:00
|
|
|
Creates the static box for two-step construction.
|
|
|
|
See wxStaticBox() for further details.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-29 11:34:31 -04:00
|
|
|
bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
|
2008-03-08 08:52:38 -05:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
2008-10-29 11:34:31 -04:00
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
|
|
|
const wxString& name = wxStaticBoxNameStr);
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|