wxMDIChildFrame::Maximize() should have default value for its argument just as wxFram...
[wxWidgets.git] / include / wx / ctrlsub.h
index 1736c324e6feb56912f55b41f84ecd7bd4ccca6a..d747a60d2b3c0550f9beaad29e6238fe2083faea 100644 (file)
@@ -16,6 +16,8 @@
     #pragma interface "controlwithitems.h"
 #endif
 
+#include "wx/defs.h"
+
 #if wxUSE_CONTROLS
 
 #include "wx/control.h"      // base class
@@ -65,6 +67,11 @@ public:
     // reads better for multi-selection ones
     void Select(int n) { SetSelection(n); }
 
+
+protected:
+
+    // check that the index is valid
+    inline bool IsValid(int n) const { return n >= 0 && n < GetCount(); }
 };
 
 class WXDLLEXPORT wxItemContainer : public wxItemContainerImmutable