]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/list.h
Some Motif fixes; makefile fixes; added wxTransferStreamToFile/FileToStream for wxWin
[wxWidgets.git] / include / wx / list.h
index 496093094638fa4fdcf176f2b9395913075acdb7..7cad34a4207dd9b7592cae7c981f11e16807c947 100644 (file)
@@ -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); }        \
                                                                             \