+ // OnMeasureItemWidth will be called on next GetAdjustedSize.
+ void ItemWidthChanged(unsigned int item)
+ {
+ m_widths[item] = -1;
+ m_widthsDirty = true;
+ }
+
+ // Callbacks for drawing and measuring items. Override in a derived class for
+ // owner-drawnness. Font, background and text colour have been prepared according
+ // to selection, focus and such.
+ //
+ // item: item index to be drawn, may be wxNOT_FOUND when painting combo control itself
+ // and there is no valid selection
+ // flags: wxODCB_PAINTING_CONTROL is set if painting to combo control instead of list
+ // NOTE: If wxVListBoxComboPopup is used with wxComboCtrl class not derived from
+ // wxOwnerDrawnComboBox, this method must be overridden.
+ virtual void OnDrawItem( wxDC& dc, const wxRect& rect, int item, int flags ) const;
+
+ // This is same as in wxVListBox
+ virtual wxCoord OnMeasureItem( size_t item ) const;
+
+ // Return item width, or -1 for calculating from text extent (default)
+ virtual wxCoord OnMeasureItemWidth( size_t item ) const;
+
+ // Draw item and combo control background. Flags are same as with OnDrawItem.
+ // NB: Can't use name OnDrawBackground because of virtual function hiding warnings.
+ virtual void OnDrawBg(wxDC& dc, const wxRect& rect, int item, int flags) const;
+
+ // Additional wxVListBox implementation (no need to override in derived classes)