X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/debe6624c1e9d4bf3243381153d1e173c849bcd8..7ce404dd7b42723cbeabb6928fddf340d26235d2:/include/wx/list.h diff --git a/include/wx/list.h b/include/wx/list.h index 32444309a5..61466cd3aa 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -9,8 +9,8 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifndef __LISTH__ -#define __LISTH__ +#ifndef _WX_LISTH__ +#define _WX_LISTH__ #ifdef __GNUG__ #pragma interface "list.h" @@ -43,7 +43,7 @@ class WXDLLEXPORT wxNode: public wxObject char *string; } key; - wxNode(wxList *the_list = NULL, wxNode *last_one = NULL, wxNode *next_one = NULL, wxObject *object = NULL); + wxNode(wxList *the_list = (wxList *) NULL, wxNode *last_one = (wxNode *) NULL, wxNode *next_one = (wxNode *) NULL, wxObject *object = (wxObject *) NULL); wxNode(wxList *the_list, wxNode *last_one, wxNode *next_one, wxObject *object, long the_key); wxNode(wxList *the_list, wxNode *last_one, wxNode *next_one, @@ -76,14 +76,10 @@ class WXDLLEXPORT wxList: public wxObject wxList(int N, wxObject *Objects[]); wxList(wxObject *object, ...); -#ifdef USE_STORABLE_CLASSES - wxList( istream &stream, char *data ); - virtual void StoreObject( ostream &stream ); -#endif - ~wxList(void); inline int Number(void) const { return n; } + inline int GetCount(void) const { return n; } // Append to end of list wxNode *Append(wxObject *object); @@ -102,17 +98,17 @@ class WXDLLEXPORT wxList: public wxObject bool DeleteObject(wxObject *object); // Finds object pointer and // deletes node (and object if // DeleteContents is on) - void Clear(void); // Delete all nodes + virtual void Clear(void); // Delete all nodes inline wxNode *First(void) const { return first_node; } inline wxNode *Last(void) const { return last_node; } wxNode *Nth(int i) const; // nth node counting from 0 // Keyed search - wxNode *Find(long key) const; - wxNode *Find(const char *key) const; + virtual wxNode *Find(long key) const; + virtual wxNode *Find(const char *key) const; - wxNode *Member(wxObject *object) const; + virtual wxNode *Member(wxObject *object) const; inline void DeleteContents(int destroy) { destroy_data = destroy; } // Instruct it to destroy user data @@ -134,6 +130,7 @@ class WXDLLEXPORT wxStringList: public wxList public: wxStringList(void); + wxStringList(const wxStringList& list); wxStringList(const char *first ...); ~wxStringList(void); @@ -142,7 +139,10 @@ class WXDLLEXPORT wxStringList: public wxList virtual char **ListToArray(bool new_copies = FALSE) const; virtual void Sort(void); virtual bool Member(const char *s) const; + virtual void Clear(void); + void operator= (const wxStringList& list); + char* operator[] (int i) const; }; #endif - // __LISTH__ + // _WX_LISTH__