+ // this is the same as SetSelection( for single-selection controls but
+ // reads better for multi-selection ones
+ void Select(int n) { SetSelection(n); }
+
+
+protected:
+
+ // check that the index is valid
+ inline bool IsValid(int n) const { return n >= 0 && n < GetCount(); }
+};
+
+class WXDLLEXPORT wxItemContainer : public wxItemContainerImmutable
+{
+public:
+ wxItemContainer() { m_clientDataItemsType = wxClientData_None; }
+ virtual ~wxItemContainer();
+
+ // adding items
+ // ------------
+
+ int Append(const wxString& item)
+ { return DoAppend(item); }
+ int Append(const wxString& item, void *clientData)
+ { int n = DoAppend(item); SetClientData(n, clientData); return n; }
+ int Append(const wxString& item, wxClientData *clientData)
+ { int n = DoAppend(item); SetClientObject(n, clientData); return n; }
+
+ // only for rtti needs (separate name)
+ void AppendString( const wxString& item)
+ { Append( item ); }
+
+ // append several items at once to the control
+ void Append(const wxArrayString& strings);
+
+ int Insert(const wxString& item, int pos)
+ { return DoInsert(item, pos); }
+ int Insert(const wxString& item, int pos, void *clientData);
+ int Insert(const wxString& item, int pos, wxClientData *clientData);
+
+ // deleting items
+ // --------------
+
+ virtual void Clear() = 0;
+ virtual void Delete(int n) = 0;
+