X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/54da4255a20216b070ec044ae2b8af75e9f2681f..794bcc2dea743ac907b839f54e451847c9ea4b72:/include/wx/list.h diff --git a/include/wx/list.h b/include/wx/list.h index 186ad733cf..7cad34a420 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -29,12 +29,6 @@ #pragma interface "list.h" #endif -#ifdef __WXPM__ -#define LINKAGEMODE _Optlink -#else -#define LINKAGEMODE -#endif - // ----------------------------------------------------------------------------- // headers // ----------------------------------------------------------------------------- @@ -273,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); @@ -408,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); } \ \