1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/panelg.h
3 // Purpose: wxPanel: a container for child controls
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_GENERIC_PANEL_H_
13 #define _WX_GENERIC_PANEL_H_
15 // ----------------------------------------------------------------------------
16 // headers and forward declarations
17 // ----------------------------------------------------------------------------
19 #include "wx/window.h"
20 #include "wx/containr.h"
22 class WXDLLEXPORT wxControlContainer
;
24 extern WXDLLEXPORT_DATA(const wxChar
) wxPanelNameStr
[];
26 // ----------------------------------------------------------------------------
27 // wxPanel contains other controls and implements TAB traversal between them
28 // ----------------------------------------------------------------------------
30 class WXDLLEXPORT wxPanel
: public wxWindow
35 // Old-style constructor (no default values for coordinates to avoid
36 // ambiguity with the new one)
37 wxPanel(wxWindow
*parent
,
38 int x
, int y
, int width
, int height
,
39 long style
= wxTAB_TRAVERSAL
| wxNO_BORDER
,
40 const wxString
& name
= wxPanelNameStr
)
44 Create(parent
, wxID_ANY
, wxPoint(x
, y
), wxSize(width
, height
), style
, name
);
48 wxPanel(wxWindow
*parent
,
49 wxWindowID winid
= wxID_ANY
,
50 const wxPoint
& pos
= wxDefaultPosition
,
51 const wxSize
& size
= wxDefaultSize
,
52 long style
= wxTAB_TRAVERSAL
| wxNO_BORDER
,
53 const wxString
& name
= wxPanelNameStr
)
57 Create(parent
, winid
, pos
, size
, style
, name
);
61 bool Create(wxWindow
*parent
, wxWindowID winid
,
62 const wxPoint
& pos
= wxDefaultPosition
,
63 const wxSize
& size
= wxDefaultSize
,
64 long style
= wxTAB_TRAVERSAL
| wxNO_BORDER
,
65 const wxString
& name
= wxPanelNameStr
);
69 // implementation from now on
70 // --------------------------
72 // calls layout for layout constraints and sizers
73 void OnSize(wxSizeEvent
& event
);
75 virtual void InitDialog();
77 #ifdef __WXUNIVERSAL__
78 virtual bool IsCanvasWindow() const { return true; }
82 WX_DECLARE_CONTROL_CONTAINER();
85 // common part of all ctors
89 DECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel
)
94 // _WX_GENERIC_PANEL_H_