X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77c5eefb1f06a8956231d2cbe1526e4de526cac5..7be1f0d91a912a73b110157170124830446e15e1:/include/wx/list.h diff --git a/include/wx/list.h b/include/wx/list.h index 0274f7fcb3..75c3c01cbb 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -195,11 +195,25 @@ public: size_t GetCount() const { return m_count; } // operations + // delete all nodes void Clear(); + // instruct it to destroy user data when deleting nodes void DeleteContents(bool destroy) { m_destroy = destroy; } + // query if to delete + bool GetDeleteContents() const + { return m_destroy; } + + // get the keytype + wxKeyType GetKeyType() const + { return m_keyType; } + + // set the keytype (required by the serial code) + void SetKeyType(wxKeyType keyType) + { wxASSERT( m_count==0 ); m_keyType = keyType; } + protected: // all methods here are "overloaded" in derived classes to provide compile // time type checking @@ -271,7 +285,7 @@ protected: void *FirstThat(wxListIterateFunction func); void ForEach(wxListIterateFunction func); void *LastThat(wxListIterateFunction func); - + private: // helpers // common part of all ctors @@ -461,8 +475,7 @@ public: wxNode *Add(const char *s) { return (wxNode *)wxStringListBase::Append(copystring(s)); } - void Delete(const char *s) - { wxStringListBase::DeleteObject((char *)s); } + bool Delete(const char *s); char **ListToArray(bool new_copies = FALSE) const; bool Member(const char *s) const;