+
+private:
+ void Init() {}
+
+#else // wxBITMAPCOMBOBOX_OWNERDRAWN_BASED
+
+ // Returns the image of the item with the given index.
+ virtual wxBitmap GetItemBitmap(unsigned int n) const;
+
+ // Returns size of the image used in list
+ virtual wxSize GetBitmapSize() const
+ {
+ return m_usedImgSize;
+ }
+
+protected:
+
+ // Returns pointer to the combobox item container
+ virtual wxItemContainer* GetItemContainer() = 0;
+
+ // Return pointer to the owner-drawn combobox control
+ virtual wxWindow* GetControl() = 0;
+
+ // wxItemContainer functions
+ void BCBDoClear();
+ void BCBDoDeleteOneItem(unsigned int n);
+
+ void DoSetItemBitmap(unsigned int n, const wxBitmap& bitmap);
+
+ void DrawBackground(wxDC& dc, const wxRect& rect, int item, int flags) const;
+ void DrawItem(wxDC& dc, const wxRect& rect, int item, const wxString& text,
+ int flags) const;
+ wxCoord MeasureItem(size_t item) const;
+
+ // Returns true if image size was affected
+ virtual bool OnAddBitmap(const wxBitmap& bitmap);
+
+ // Recalculates amount of empty space needed in front of text
+ // in control itself. Returns number that can be passed to
+ // wxOwnerDrawnComboBox::SetCustomPaintWidth() and similar
+ // functions.
+ virtual int DetermineIndent();
+
+ void UpdateInternals();
+
+ wxArrayPtrVoid m_bitmaps; // Images associated with items
+ wxSize m_usedImgSize; // Size of bitmaps
+
+ int m_imgAreaWidth; // Width and height of area next to text field
+ int m_fontHeight;
+ int m_indent;
+
+private:
+ void Init();
+#endif // !wxBITMAPCOMBOBOX_OWNERDRAWN_BASED/wxBITMAPCOMBOBOX_OWNERDRAWN_BASED