]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/odcombo.h
Fix menu event handlers calling order.
[wxWidgets.git] / include / wx / odcombo.h
index 4879c2bbfc217fb627abf855a2f03cc7074c347a..2d5439f1861bc6aea48bdada9cccb79a94fe5147 100644 (file)
@@ -233,15 +233,15 @@ private:
 // the wxComboCtrl.
 // ----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_ADV wxOwnerDrawnComboBox : public wxComboCtrl,
-                                             public wxItemContainer
+class WXDLLIMPEXP_ADV wxOwnerDrawnComboBox :
+    public wxWindowWithItems<wxComboCtrl, wxItemContainer>
 {
     //friend class wxComboPopupWindow;
     friend class wxVListBoxComboPopup;
 public:
 
     // ctors and such
-    wxOwnerDrawnComboBox() : wxComboCtrl() { Init(); }
+    wxOwnerDrawnComboBox() { Init(); }
 
     wxOwnerDrawnComboBox(wxWindow *parent,
                          wxWindowID id,
@@ -253,7 +253,6 @@ public:
                          long style = 0,
                          const wxValidator& validator = wxDefaultValidator,
                          const wxString& name = wxComboBoxNameStr)
-        : wxComboCtrl()
     {
         Init();
 
@@ -339,8 +338,6 @@ public:
 
     virtual bool IsSorted() const { return HasFlag(wxCB_SORT); }
 
-    wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
-
 protected:
     virtual void DoClear();
     virtual void DoDeleteOneItem(unsigned int n);
@@ -358,6 +355,10 @@ protected:
     // Callback for item width, or -1 for default/undetermined
     virtual wxCoord OnMeasureItemWidth( size_t item ) const;
 
+    // override base implementation so we can return the size for the
+    // largest item
+    virtual wxSize DoGetBestSize() const;
+
     // Callback for background drawing. Flags are same as with
     // OnDrawItem.
     virtual void OnDrawBackground( wxDC& dc, const wxRect& rect, int item, int flags ) const;