X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1777b9bbf4573dabecf4a3256d0d3c2c0c2a3fdf..efba2b89f15ba8757a722fc56c67f434cf960482:/include/wx/choice.h diff --git a/include/wx/choice.h b/include/wx/choice.h index bfe28e0ed1..81d2e29ad9 100644 --- a/include/wx/choice.h +++ b/include/wx/choice.h @@ -43,10 +43,10 @@ public: 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 @@ -95,7 +95,7 @@ public: 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; @@ -104,6 +104,11 @@ private: // 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()); }; }; // ----------------------------------------------------------------------------