]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/ctrlsub.h
added wxConvFileName which is a variable, not define as wxConvFile; added comments...
[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