24#include <wx/odcombo.h>
35 WX_COMBOBOX( wxWindow* aParent,
int aId = wxID_ANY,
const wxString& aValue = wxEmptyString,
36 const wxPoint& aPos = wxDefaultPosition,
const wxSize& aSize = wxDefaultSize,
37 int n = 0,
const wxString choices[] =
nullptr,
long style = 0 );
41 void Append(
const wxString& aText,
const wxString& aMenuText = wxEmptyString );
47 virtual void OnDrawItem( wxDC& aDC,
const wxRect& aRect,
int aItem,
int aFlags )
const override;
Fix some issues with wxCombobox:
virtual wxCoord OnMeasureItemWidth(size_t aItem) const override
void Append(const wxString &aText, const wxString &aMenuText=wxEmptyString)
virtual void DoSetPopupControl(wxComboPopup *aPopup) override
void TryVetoSelect(wxCommandEvent &aEvent, bool aInner)
Veto a select event for the separator.
void SetSelectionEither(bool aInner, int aSel)
Safely set selection for either the outer (combo box) or inner (popup) list, doing nothing for invali...
virtual wxCoord OnMeasureItem(size_t aItem) const override
std::map< int, wxString > m_menuText
void TryVetoMouse(wxMouseEvent &aEvent)
Veto a mouseover event if in the separator.
int GetSelectionEither(bool aInner) const
Get selection from either the outer (combo box) or inner (popup) list.
wxString GetMenuText(int aItem) const
Safely get a string for an item, returning wxEmptyString if the item doesn't exist.
virtual void OnDrawItem(wxDC &aDC, const wxRect &aRect, int aItem, int aFlags) const override
int GetCharHeight() const override