]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/containr.h
On screens with restricted space, it's useful to be able to add controls
[wxWidgets.git] / include / wx / containr.h
index 99049e718c9ed9f018739fa8935d3f062417c30e..cd79e5dd5b99f7d0195b65485f073f40e750e6f9 100644 (file)
 #ifndef _WX_CONTAINR_H_
 #define _WX_CONTAINR_H_
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma interface "containr.h"
-#endif
-
 class WXDLLEXPORT wxFocusEvent;
 class WXDLLEXPORT wxNavigationKeyEvent;
 class WXDLLEXPORT wxWindow;
@@ -65,7 +61,7 @@ public:
     void HandleOnFocus(wxFocusEvent& event);
     void HandleOnWindowDestroy(wxWindowBase *child);
 
-    // should be called from SetFocus(), returns FALSE if we did nothing with
+    // should be called from SetFocus(), returns false if we did nothing with
     // the focus and the default processing should take place
     bool DoSetFocus();
 
@@ -98,7 +94,7 @@ protected:
     DECLARE_NO_COPY_CLASS(wxControlContainer)
 };
 
-// this function is for wxWindows internal use only
+// this function is for wxWidgets internal use only
 extern bool wxSetFocusToChild(wxWindow *win, wxWindow **child);
 
 // ----------------------------------------------------------------------------
@@ -113,6 +109,7 @@ public: \
     void OnFocus(wxFocusEvent& event); \
     virtual void OnChildFocus(wxChildFocusEvent& event); \
     virtual void SetFocus(); \
+    virtual void SetFocusIgnoringChildren(); \
     virtual void RemoveChild(wxWindowBase *child); \
     virtual wxWindow *GetDefaultItem() const; \
     virtual wxWindow *SetDefaultItem(wxWindow *child); \
@@ -163,6 +160,11 @@ void classname::SetFocus() \
         wxWindow::SetFocus(); \
 } \
  \
+void classname::SetFocusIgnoringChildren() \
+{ \
+        wxWindow::SetFocus(); \
+} \
+ \
 void classname::OnChildFocus(wxChildFocusEvent& event) \
 { \
     m_container.SetLastFocus(event.GetWindow()); \