X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8ba7c77150d74a5385f2385e5448ca491263179f..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/include/wx/ctrlsub.h diff --git a/include/wx/ctrlsub.h b/include/wx/ctrlsub.h index 1736c324e6..d747a60d2b 100644 --- a/include/wx/ctrlsub.h +++ b/include/wx/ctrlsub.h @@ -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