X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4d98817cfab2654773755cb5c540057c5f3d4fd6..bfa78c63b9045c2a594ca6f04dc26a70c21f5f42:/include/wx/containr.h diff --git a/include/wx/containr.h b/include/wx/containr.h index 7cb13e8fc1..d4eb907682 100644 --- a/include/wx/containr.h +++ b/include/wx/containr.h @@ -14,6 +14,11 @@ #include "wx/defs.h" +#ifndef wxHAS_NATIVE_TAB_TRAVERSAL + // We need wxEVT_XXX declarations in this case. + #include "wx/event.h" +#endif + class WXDLLIMPEXP_FWD_CORE wxWindow; class WXDLLIMPEXP_FWD_CORE wxWindowBase; @@ -116,9 +121,6 @@ protected: #else // !wxHAS_NATIVE_TAB_TRAVERSAL -class WXDLLIMPEXP_FWD_CORE wxFocusEvent; -class WXDLLIMPEXP_FWD_CORE wxNavigationKeyEvent; - // ---------------------------------------------------------------------------- // wxControlContainer for TAB navigation implemented in wx itself // ---------------------------------------------------------------------------- @@ -146,7 +148,7 @@ protected: #endif // wxHAS_NATIVE_TAB_TRAVERSAL/!wxHAS_NATIVE_TAB_TRAVERSAL // this function is for wxWidgets internal use only -extern bool wxSetFocusToChild(wxWindow *win, wxWindow **child); +extern WXDLLIMPEXP_CORE bool wxSetFocusToChild(wxWindow *win, wxWindow **child); // ---------------------------------------------------------------------------- // wxNavigationEnabled: Derive from this class to support keyboard navigation @@ -166,40 +168,40 @@ public: m_container.SetContainerWindow(this); #ifndef wxHAS_NATIVE_TAB_TRAVERSAL - Connect(wxEVT_NAVIGATION_KEY, + BaseWindowClass::Connect(wxEVT_NAVIGATION_KEY, wxNavigationKeyEventHandler(wxNavigationEnabled::OnNavigationKey)); - Connect(wxEVT_SET_FOCUS, + BaseWindowClass::Connect(wxEVT_SET_FOCUS, wxFocusEventHandler(wxNavigationEnabled::OnFocus)); - Connect(wxEVT_CHILD_FOCUS, + BaseWindowClass::Connect(wxEVT_CHILD_FOCUS, wxChildFocusEventHandler(wxNavigationEnabled::OnChildFocus)); #endif // !wxHAS_NATIVE_TAB_TRAVERSAL } - virtual bool AcceptsFocus() const + WXDLLIMPEXP_INLINE_CORE virtual bool AcceptsFocus() const { return m_container.AcceptsFocus(); } - virtual bool AcceptsFocusRecursively() const + WXDLLIMPEXP_INLINE_CORE virtual bool AcceptsFocusRecursively() const { return m_container.AcceptsFocusRecursively(); } - virtual bool AcceptsFocusFromKeyboard() const + WXDLLIMPEXP_INLINE_CORE virtual bool AcceptsFocusFromKeyboard() const { return m_container.AcceptsFocusFromKeyboard(); } - virtual void AddChild(wxWindowBase *child) + WXDLLIMPEXP_INLINE_CORE virtual void AddChild(wxWindowBase *child) { BaseWindowClass::AddChild(child); m_container.UpdateCanFocus(); } - virtual void RemoveChild(wxWindowBase *child) + WXDLLIMPEXP_INLINE_CORE virtual void RemoveChild(wxWindowBase *child) { #ifndef wxHAS_NATIVE_TAB_TRAVERSAL m_container.HandleOnWindowDestroy(child); @@ -210,7 +212,7 @@ public: m_container.UpdateCanFocus(); } - virtual void SetFocus() + WXDLLIMPEXP_INLINE_CORE virtual void SetFocus() { if ( !m_container.DoSetFocus() ) BaseWindowClass::SetFocus(); @@ -256,7 +258,7 @@ protected: // look at them. // ---------------------------------------------------------------------------- -#ifdef WXWIN_COMPATIBILITY_2_8 +#if WXWIN_COMPATIBILITY_2_8 // common part of WX_DECLARE_CONTROL_CONTAINER in the native and generic cases, // it should be used in the wxWindow-derived class declaration