+public:
+ wxItemContainer() { m_clientDataItemsType = wxClientData_None; }
+ virtual ~wxItemContainer();
+
+ // adding items
+ // ------------
+
+ // append single item, return its position in the control (which can be
+ // different from the last one if the control is sorted)
+ int Append(const wxString& item)
+ { return AppendItems(item); }
+ int Append(const wxString& item, void *clientData)
+ { return AppendItems(item, &clientData); }
+ int Append(const wxString& item, wxClientData *clientData)
+ { return AppendItems(item, &clientData); }
+
+ // append several items at once to the control, return the position of the
+ // last item appended
+ int Append(const wxArrayString& items)
+ { return AppendItems(items); }
+ int Append(const wxArrayString& items, void **clientData)
+ { return AppendItems(items, clientData); }
+ int Append(const wxArrayString& items, wxClientData **clientData)
+ { return AppendItems(items, clientData); }
+ int Append(unsigned int n, const wxString *items)
+ { return AppendItems(wxArrayStringsAdapter(n, items)); }
+ int Append(unsigned int n, const wxString *items, void **clientData)
+ { return AppendItems(wxArrayStringsAdapter(n, items), clientData); }
+ int Append(unsigned int n,
+ const wxString *items,
+ wxClientData **clientData)
+ { return AppendItems(wxArrayStringsAdapter(n, items), clientData); }
+
+ // only for RTTI needs (separate name)
+ void AppendString(const wxString& item)
+ { Append(item); }
+
+
+ // inserting items: not for sorted controls!
+ // -----------------------------------------
+
+ // insert single item at the given position, return its effective position
+ int Insert(const wxString& item, unsigned int pos)
+ { return InsertItems(item, pos); }
+ int Insert(const wxString& item, unsigned int pos, void *clientData)
+ { return InsertItems(item, pos, &clientData); }
+ int Insert(const wxString& item, unsigned int pos, wxClientData *clientData)
+ { return InsertItems(item, pos, &clientData); }
+
+ // insert several items at once into the control, return the index of the
+ // last item inserted
+ int Insert(const wxArrayString& items, unsigned int pos)
+ { return InsertItems(items, pos); }
+ int Insert(const wxArrayString& items, unsigned int pos, void **clientData)
+ { return InsertItems(items, pos, clientData); }
+ int Insert(const wxArrayString& items,
+ unsigned int pos,
+ wxClientData **clientData)
+ { return InsertItems(items, pos, clientData); }
+ int Insert(unsigned int n, const wxString *items, unsigned int pos)
+ { return InsertItems(wxArrayStringsAdapter(n, items), pos); }
+ int Insert(unsigned int n,
+ const wxString *items,
+ unsigned int pos,
+ void **clientData)
+ { return InsertItems(wxArrayStringsAdapter(n, items), pos, clientData); }
+ int Insert(unsigned int n,
+ const wxString *items,
+ unsigned int pos,
+ wxClientData **clientData)
+ { return InsertItems(wxArrayStringsAdapter(n, items), pos, clientData); }
+
+
+ // replacing items
+ // ---------------
+
+ void Set(const wxArrayString& items)
+ { Clear(); Append(items); }
+ void Set(const wxArrayString& items, void **clientData)
+ { Clear(); Append(items, clientData); }
+ void Set(const wxArrayString& items, wxClientData **clientData)
+ { Clear(); Append(items, clientData); }
+ void Set(unsigned int n, const wxString *items)
+ { Clear(); Append(n, items); }
+ void Set(unsigned int n, const wxString *items, void **clientData)
+ { Clear(); Append(n, items, clientData); }
+ void Set(unsigned int n, const wxString *items, wxClientData **clientData)
+ { Clear(); Append(n, items, clientData); }
+
+ // deleting items
+ // --------------
+
+ void Clear();
+ void Delete(unsigned int pos);
+
+
+ // client data stuff
+ // -----------------
+
+ void SetClientData(unsigned int n, void* clientData);
+ void* GetClientData(unsigned int n) const;
+
+ void SetClientObject(unsigned int n, wxClientData* clientData);
+ wxClientData* GetClientObject(unsigned int n) const;
+
+ bool HasClientData() const
+ { return m_clientDataItemsType != wxClientData_None; }
+ bool HasClientObjectData() const
+ { return m_clientDataItemsType == wxClientData_Object; }
+ bool HasClientUntypedData() const
+ { return m_clientDataItemsType == wxClientData_Void; }
+
+
+ // The control may maintain its items in a sorted order in which case
+ // items are automatically inserted at the right position when they are
+ // inserted or appended. Derived classes have to override this method if
+ // they implement sorting, typically by returning HasFlag(wxXX_SORT)
+ virtual bool IsSorted() const { return false; }
+
+protected:
+ // there is usually no need to override this method but you can do it if it
+ // is more convenient to only do "real" insertions in DoInsertItems() and
+ // to implement items appending here (in which case DoInsertItems() should
+ // call this method if pos == GetCount() as it can still be called in this
+ // case if public Insert() is called with such position)
+ virtual int DoAppendItems(const wxArrayStringsAdapter& items,
+ void **clientData,
+ wxClientDataType type)