void Append(const wxString& item) { DoAppend(item); }
// with client data which belongs to the caller
void Append(const wxString &item, void* clientData)
- { DoAppend(item); SetClientData(GetCount() - 1, clientData); }
+ { int n = DoAppend(item); SetClientData(n, clientData); }
// with client data which will be deleted by the control
void Append(const wxString &item, wxClientData* clientData)
- { DoAppend(item); SetClientObject(GetCount() - 1, clientData); }
+ { int n = DoAppend(item); SetClientObject(n, clientData); }
// delete items from the list
// one item
private:
// pure virtuals to implement in the derived classes
- virtual void DoAppend(const wxString& item) = 0;
+ virtual int DoAppend(const wxString& item) = 0;
virtual void DoSetClientData( int n, void* clientData ) = 0;
virtual void* DoGetClientData( int n ) const = 0;
// the type of the client data for the items
wxClientDataType m_clientDataItemsType;
+ // the above pure virtuals hide these virtuals in wxWindowBase
+ virtual void DoSetClientData(void* clientData ) { wxWindowBase::DoSetClientData(clientData); };
+ virtual void* DoGetClientData() const { return(wxWindowBase::DoGetClientData()); };
+ virtual void DoSetClientObject( wxClientData* clientData ) { wxWindowBase::DoSetClientObject(clientData); };
+ virtual wxClientData* DoGetClientObject() const { return(wxWindowBase::DoGetClientObject()); };
};
// ----------------------------------------------------------------------------