X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d220ae323719c2dccd35587b1b72f45e9bbeda79..68ee7c47300b37e408ef9a04ec9f83af78e90817:/include/wx/generic/panelg.h diff --git a/include/wx/generic/panelg.h b/include/wx/generic/panelg.h index 5a813e3ddf..308be49ecb 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,23 +71,29 @@ 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(long focus) { m_lastFocus = focus; } - long GetLastFocus() const { return m_lastFocus; } + void SetLastFocus(wxWindow *win) { m_winLastFocused = win; } + wxWindow *GetLastFocus() const { return m_winLastFocused; } protected: // common part of all ctors void Init(); // the child which had the focus last time this panel was activated - long m_lastFocus; + wxWindow *m_winLastFocused; // a default button or NULL wxButton *m_btnDefault; @@ -98,4 +104,4 @@ private: }; #endif - // __PANELH_G__ + // _WX_GENERIC_PANEL_H_