]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/panelg.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxPanel: similar to wxWindows but is coloured as for a dialog
4 // Author: Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "panelg.h"
19 #include "wx/window.h"
21 WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr
;
24 class WXDLLEXPORT wxPanel
: public wxWindow
29 // Old-style constructor (no default values for coordinates to avoid
30 // ambiguity with the new one)
31 wxPanel(wxWindow
*parent
,
32 int x
, int y
, int width
, int height
,
33 long style
= wxTAB_TRAVERSAL
| wxNO_BORDER
,
34 const wxString
& name
= wxPanelNameStr
)
36 Create(parent
, -1, wxPoint(x
, y
), wxSize(width
, height
), style
, name
);
40 wxPanel(wxWindow
*parent
,
42 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxSize
& size
= wxDefaultSize
,
44 long style
= wxTAB_TRAVERSAL
| wxNO_BORDER
,
45 const wxString
& name
= wxPanelNameStr
)
47 Create(parent
, id
, pos
, size
, style
, name
);
51 bool Create(wxWindow
*parent
, wxWindowID id
,
52 const wxPoint
& pos
= wxDefaultPosition
,
53 const wxSize
& size
= wxDefaultSize
,
54 long style
= wxTAB_TRAVERSAL
| wxNO_BORDER
,
55 const wxString
& name
= wxPanelNameStr
);
57 // Sends an OnInitDialog event, which in turns transfers data to
58 // to the dialog via validators.
59 virtual void InitDialog();
62 // responds to colour changes
63 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
65 // process a keyboard navigation message (Tab traversal)
66 void OnNavigationKey(wxNavigationKeyEvent
& event
);
68 // set the focus to the first child if we get it
69 void OnFocus(wxFocusEvent
& event
);
71 // called by wxWindow whenever it gets focus
72 void SetLastFocus(wxWindow
*focus
) { m_lastFocus
= focus
; }
75 // the child which had the focus last time this panel was activated
76 wxWindow
*m_lastFocus
;
79 DECLARE_DYNAMIC_CLASS(wxPanel
)