X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/319fefa9109ef95cab9f6dcbd46e3f3edbcff8c9..0dfef5a8124ac0f1bb2aed6ef5ddfa833e8e2c6e:/include/wx/generic/panelg.h diff --git a/include/wx/generic/panelg.h b/include/wx/generic/panelg.h index f47c9afc41..de9db536e2 100644 --- a/include/wx/generic/panelg.h +++ b/include/wx/generic/panelg.h @@ -6,11 +6,11 @@ // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __PANELH_G__ -#define __PANELH_G__ +#ifndef _WX_GENERIC_PANEL_H_ +#define _WX_GENERIC_PANEL_H_ #ifdef __GNUG__ #pragma interface "panelg.h" @@ -25,7 +25,7 @@ class WXDLLEXPORT wxPanel : public wxWindow { public: wxPanel() { Init(); } - + // Old-style constructor (no default values for coordinates to avoid // ambiguity with the new one) wxPanel(wxWindow *parent, @@ -37,7 +37,7 @@ public: Create(parent, -1, wxPoint(x, y), wxSize(width, height), style, name); } - + // Constructor wxPanel(wxWindow *parent, wxWindowID id = -1, @@ -57,7 +57,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL | wxNO_BORDER, const wxString& name = wxPanelNameStr); - + // Sends an OnInitDialog event, which in turns transfers data to // to the dialog via validators. virtual void InitDialog(); @@ -71,13 +71,19 @@ public: // responds to colour changes void OnSysColourChanged(wxSysColourChangedEvent& event); - + // process a keyboard navigation message (Tab traversal) void OnNavigationKey(wxNavigationKeyEvent& event); - + // set the focus to the first child if we get it void OnFocus(wxFocusEvent& event); + // calls layout for layout constraints and sizers + void OnSize(wxSizeEvent& event); + + // overridden to tab move focus into first focusable child + virtual void SetFocus(); + // called by wxWindow whenever it gets focus void SetLastFocus(wxWindow *win) { m_winLastFocused = win; } wxWindow *GetLastFocus() const { return m_winLastFocused; } @@ -86,6 +92,9 @@ protected: // common part of all ctors void Init(); + // set the focus to the child which had it the last time + bool SetFocusToChild(); + // the child which had the focus last time this panel was activated wxWindow *m_winLastFocused; @@ -98,4 +107,4 @@ private: }; #endif - // __PANELH_G__ + // _WX_GENERIC_PANEL_H_