X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d5d63453b173c6419f200001ba451c20f525f9a1..44141a18c31bd78facb88230783aeb6c935cafc7:/include/wx/list.h diff --git a/include/wx/list.h b/include/wx/list.h index 4960930946..7cad34a420 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -267,6 +267,10 @@ protected: wxNodeBase *Append(void *object); // insert a new item at the beginning of the list wxNodeBase *Insert(void *object) { return Insert( (wxNodeBase*)NULL, object); } + // insert a new item at the given position + wxNodeBase *Insert(size_t pos, void *object) + { return pos == GetCount() ? Append(object) + : Insert(Item(pos), object); } // insert before given node or at front of list if prev == NULL wxNodeBase *Insert(wxNodeBase *prev, void *object); @@ -402,6 +406,8 @@ private: { return (nodetype *)wxListBase::Append(object); } \ nodetype *Insert(Tbase *object) \ { return (nodetype *)Insert((nodetype*)NULL, object); } \ + nodetype *Insert(size_t pos, Tbase *object) \ + { return (nodetype *)wxListBase::Insert(pos, object); } \ nodetype *Insert(nodetype *prev, Tbase *object) \ { return (nodetype *)wxListBase::Insert(prev, object); } \ \