20#ifndef GRID_ICON_TEXT_HELPERS_H
21#define GRID_ICON_TEXT_HELPERS_H
24#include <wx/bmpcbox.h>
25#include <wx/generic/gridctrl.h>
26#include <wx/generic/grideditors.h>
31enum class BITMAPS :
unsigned int;
52 wxSize aPreferredIconSize = wxDefaultSize );
54 void Draw( wxGrid& aGrid, wxGridCellAttr& aAttr, wxDC& aDC,
55 const wxRect& aRect,
int aRow,
int aCol,
bool isSelected )
override;
56 wxSize
GetBestSize( wxGrid &
grid, wxGridCellAttr & attr, wxDC & dc,
int row,
77 void Draw( wxGrid& aGrid, wxGridCellAttr& aAttr, wxDC& aDC,
78 const wxRect& aRect,
int aRow,
int aCol,
bool isSelected )
override;
79 wxSize
GetBestSize( wxGrid &
grid, wxGridCellAttr & attr, wxDC & dc,
int row,
81 wxGridCellRenderer*
Clone()
const override;
96 void Draw( wxGrid& aGrid, wxGridCellAttr& aAttr, wxDC& aDC,
97 const wxRect& aRect,
int aRow,
int aCol,
bool isSelected )
override;
98 wxSize
GetBestSize( wxGrid &
grid, wxGridCellAttr & attr, wxDC & dc,
int row,
100 wxGridCellRenderer*
Clone()
const override;
118 wxGridCellEditor*
Clone()
const override;
119 void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler )
override;
123 void SetSize(
const wxRect& aRect )
override;
125 void BeginEdit(
int aRow,
int aCol, wxGrid* aGrid )
override;
126 bool EndEdit(
int ,
int ,
const wxGrid* ,
const wxString& , wxString *aNewVal )
override;
127 void ApplyEdit(
int aRow,
int aCol, wxGrid* aGrid )
override;
128 void Reset()
override;
131 wxBitmapComboBox*
Combo()
const {
return static_cast<wxBitmapComboBox*
>( m_control ); }
BITMAPS
A list of all bitmap identifiers.
wxGridCellRenderer * Clone() const 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
GRID_CELL_ICON_RENDERER(const wxBitmapBundle &aIcon)
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)
Construct a renderer that maps a list of icons from the bitmap system to a list of strings.
std::vector< BITMAPS > m_icons
wxSize GetBestSize(wxGrid &grid, wxGridCellAttr &attr, wxDC &dc, int row, int col) override
wxSize GetBestSize(wxGrid &grid, wxGridCellAttr &attr, wxDC &dc, int row, int col) override
wxGridCellRenderer * Clone() const override
GRID_CELL_STATUS_ICON_RENDERER(int aStatus)
void Draw(wxGrid &aGrid, wxGridCellAttr &aAttr, wxDC &aDC, const wxRect &aRect, int aRow, int aCol, bool isSelected) override