]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/list.h
last line missing
[wxWidgets.git] / include / wx / list.h
index 186ad733cf6f4409e4f85fb10e3f8ef50873099f..7cad34a4207dd9b7592cae7c981f11e16807c947 100644 (file)
 #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); }        \
                                                                             \