1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/panelg.h
3 // Purpose: wxPanel: a container for child controls
4 // Author: Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_GENERIC_PANEL_H_
13 #define _WX_GENERIC_PANEL_H_
16 #pragma interface "panelg.h"
19 // ----------------------------------------------------------------------------
20 // headers and forward declarations
21 // ----------------------------------------------------------------------------
23 #include "wx/window.h"
24 #include "wx/containr.h"
26 class WXDLLEXPORT wxControlContainer
;
28 WXDLLEXPORT_DATA(extern const wxChar
*) wxPanelNameStr
;
30 // ----------------------------------------------------------------------------
31 // wxPanel contains other controls and implements TAB traversal between them
32 // ----------------------------------------------------------------------------
34 class WXDLLEXPORT wxPanel
: public wxWindow
39 // Old-style constructor (no default values for coordinates to avoid
40 // ambiguity with the new one)
41 wxPanel(wxWindow
*parent
,
42 int x
, int y
, int width
, int height
,
43 long style
= wxTAB_TRAVERSAL
| wxNO_BORDER
,
44 const wxString
& name
= wxPanelNameStr
)
48 Create(parent
, -1, wxPoint(x
, y
), wxSize(width
, height
), style
, name
);
52 wxPanel(wxWindow
*parent
,
54 const wxPoint
& pos
= wxDefaultPosition
,
55 const wxSize
& size
= wxDefaultSize
,
56 long style
= wxTAB_TRAVERSAL
| wxNO_BORDER
,
57 const wxString
& name
= wxPanelNameStr
)
61 Create(parent
, id
, pos
, size
, style
, name
);
65 bool Create(wxWindow
*parent
, wxWindowID id
,
66 const wxPoint
& pos
= wxDefaultPosition
,
67 const wxSize
& size
= wxDefaultSize
,
68 long style
= wxTAB_TRAVERSAL
| wxNO_BORDER
,
69 const wxString
& name
= wxPanelNameStr
);
73 // implementation from now on
74 // --------------------------
76 // responds to colour changes
77 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
79 // calls layout for layout constraints and sizers
80 void OnSize(wxSizeEvent
& event
);
82 virtual void InitDialog();
85 virtual bool ProvidesBackground() { return TRUE
; }
88 WX_DECLARE_CONTROL_CONTAINER();
91 // common part of all ctors
95 DECLARE_DYNAMIC_CLASS(wxPanel
)
100 // _WX_GENERIC_PANEL_H_