24 #ifndef GRID_ICON_TEXT_HELPERS_H 25 #define GRID_ICON_TEXT_HELPERS_H 27 #include <wx/bmpcbox.h> 28 #include <wx/generic/gridctrl.h> 29 #include <wx/generic/grideditors.h> 33 enum class BITMAPS : unsigned int;
43 void Draw( wxGrid& aGrid, wxGridCellAttr& aAttr, wxDC& aDC,
44 const wxRect& aRect,
int aRow,
int aCol,
bool isSelected )
override;
45 wxSize
GetBestSize( wxGrid &
grid, wxGridCellAttr & attr, wxDC & dc,
int row,
int col )
override;
61 void Draw( wxGrid& aGrid, wxGridCellAttr& aAttr, wxDC& aDC,
62 const wxRect& aRect,
int aRow,
int aCol,
bool isSelected )
override;
63 wxSize
GetBestSize( wxGrid &
grid, wxGridCellAttr & attr, wxDC & dc,
int row,
int col )
override;
64 wxGridCellRenderer*
Clone()
const override;
79 wxGridCellEditor*
Clone()
const override;
80 void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler )
override;
84 void SetSize(
const wxRect& aRect )
override;
86 void BeginEdit(
int aRow,
int aCol, wxGrid* aGrid )
override;
87 bool EndEdit(
int ,
int ,
const wxGrid* ,
const wxString& , wxString *aNewVal )
override;
88 void ApplyEdit(
int aRow,
int aCol, wxGrid* aGrid )
override;
89 void Reset()
override;
92 wxBitmapComboBox*
Combo()
const {
return static_cast<wxBitmapComboBox*>( m_control ); }
103 #endif // GRID_ICON_TEXT_HELPERS_H
wxGridCellRenderer * Clone() const override
void Draw(wxGrid &aGrid, wxGridCellAttr &aAttr, wxDC &aDC, const wxRect &aRect, int aRow, int aCol, bool isSelected) override
GRID_CELL_ICON_TEXT_RENDERER(const std::vector< BITMAPS > &icons, const wxArrayString &names)
std::vector< BITMAPS > m_icons
GRID_CELL_ICON_RENDERER(const wxBitmap &icon)
BITMAPS
A list of all bitmap identifiers.
wxSize GetBestSize(wxGrid &grid, wxGridCellAttr &attr, wxDC &dc, int row, int col) override
void Draw(wxGrid &aGrid, wxGridCellAttr &aAttr, wxDC &aDC, const wxRect &aRect, int aRow, int aCol, bool isSelected) override
wxSize GetBestSize(wxGrid &grid, wxGridCellAttr &attr, wxDC &dc, int row, int col) override