]> git.saurik.com Git - wxWidgets.git/commitdiff
fixes for ambiquity in wxComboBox (is it correct this time?)
authorVáclav Slavík <vslavik@fastmail.fm>
Tue, 20 Nov 2001 23:59:24 +0000 (23:59 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Tue, 20 Nov 2001 23:59:24 +0000 (23:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/univ/choice.h
include/wx/univ/combobox.h

index 0c98707ea069fcfb68d0b86075b4269348964bf0..134192b4a3af468cd6e17c85e1e8e610a8beb611 100644 (file)
@@ -43,8 +43,6 @@ public:
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxChoiceNameStr);
     
-    void *GetClientData(int n) const { return wxItemContainer::GetClientData(n); }
-    
 private:
     void OnComboBox(wxCommandEvent &event);
     
index 581ffdc0851b9794ca3deb577739cdf1793d6873..bd472fea0577daf9d34cd6caf8843bed9f2ee0da 100644 (file)
@@ -273,6 +273,52 @@ public:
     
     void SetStringSelection(const wxString& s) {  }
 
+    // we have to redefine these functions here to avoid ambiguities in classes
+    // deriving from us which would arise otherwise because both base classses
+    // have the methods with the same names - hopefully, a smart compiler can
+    // optimize away these simple inline wrappers so we don't suffer much from
+    // this
+
+    void SetClientData(void *data)
+    {
+        wxControl::SetClientData(data);
+    }
+
+    void *GetClientData() const
+    {
+        return wxControl::GetClientData();
+    }
+
+    void SetClientObject(wxClientData *data)
+    {
+        wxControl::SetClientObject(data);
+    }
+
+    wxClientData *GetClientObject() const
+    {
+        return wxControl::GetClientObject();
+    }
+
+    void SetClientData(int n, void* clientData)
+    {
+        wxItemContainer::SetClientData(n, clientData);
+    }
+
+    void* GetClientData(int n) const
+    {
+        return wxItemContainer::GetClientData(n);
+    }
+
+    void SetClientObject(int n, wxClientData* clientData)
+    {
+        wxItemContainer::SetClientObject(n, clientData);
+    }
+
+    wxClientData* GetClientObject(int n) const
+    {
+        return wxItemContainer::GetClientObject(n);
+    }
+
 protected:
     virtual int DoAppend(const wxString& item);
     virtual void DoSetItemClientData(int n, void* clientData);