]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/choice.h
HTML_xxxx constants changed to wxHTML_xxxx (with backward compatibility through WXWIN...
[wxWidgets.git] / include / wx / choice.h
index 9940c9f69fdbf938aa2f34e9d74a4b917d5f3ccd..81d2e29ad91cbc1bb05f1557c1bb73514a6f0ba3 100644 (file)
@@ -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()); };
 };
 
 // ----------------------------------------------------------------------------
@@ -120,6 +125,8 @@ private:
     #include "wx/qt/choice.h"
 #elif defined(__WXMAC__)
     #include "wx/mac/choice.h"
+#elif defined(__WXPM__)
+    #include "wx/os2/choice.h"
 #elif defined(__WXSTUBS__)
     #include "wx/stubs/choice.h"
 #endif