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 wxButton
;
27 class WXDLLEXPORT wxControlContainer
;
29 WXDLLEXPORT_DATA(extern const wxChar
*) wxPanelNameStr
;
31 // ----------------------------------------------------------------------------
32 // wxPanel contains other controls and implements TAB traversal between them
33 // ----------------------------------------------------------------------------
35 class WXDLLEXPORT wxPanel
: public wxWindow
40 // Old-style constructor (no default values for coordinates to avoid
41 // ambiguity with the new one)
42 wxPanel(wxWindow
*parent
,
43 int x
, int y
, int width
, int height
,
44 long style
= wxTAB_TRAVERSAL
| wxNO_BORDER
,
45 const wxString
& name
= wxPanelNameStr
)
49 Create(parent
, -1, wxPoint(x
, y
), wxSize(width
, height
), style
, name
);
53 wxPanel(wxWindow
*parent
,
55 const wxPoint
& pos
= wxDefaultPosition
,
56 const wxSize
& size
= wxDefaultSize
,
57 long style
= wxTAB_TRAVERSAL
| wxNO_BORDER
,
58 const wxString
& name
= wxPanelNameStr
)
62 Create(parent
, id
, pos
, size
, style
, name
);
66 bool Create(wxWindow
*parent
, wxWindowID id
,
67 const wxPoint
& pos
= wxDefaultPosition
,
68 const wxSize
& size
= wxDefaultSize
,
69 long style
= wxTAB_TRAVERSAL
| wxNO_BORDER
,
70 const wxString
& name
= wxPanelNameStr
);
74 // implementation from now on
75 // --------------------------
77 // Sends an OnInitDialog event, which in turns transfers data to
78 // to the dialog via validators.
79 virtual void InitDialog();
81 // responds to colour changes
82 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
84 // calls layout for layout constraints and sizers
85 void OnSize(wxSizeEvent
& event
);
87 WX_DECLARE_CONTROL_CONTAINER();
90 // common part of all ctors
93 // the object which implements the TAB traversal logic
94 wxControlContainer
*m_container
;
97 DECLARE_DYNAMIC_CLASS(wxPanel
)
102 // _WX_GENERIC_PANEL_H_