20#ifndef GRID_COMBOBOX_H
21#define GRID_COMBOBOX_H
24#include <wx/combobox.h>
25#include <wx/generic/gridctrl.h>
26#include <wx/generic/grideditors.h>
37 wxGridCellRenderer*
Clone()
const override;
39 void Draw( wxGrid& aGrid, wxGridCellAttr& aAttr, wxDC& aDC,
const wxRect& aRect,
int aRow,
int aCol,
40 bool isSelected )
override;
42 wxSize
GetBestSize( wxGrid& aGrid, wxGridCellAttr& aAttr, wxDC& aDC,
int aRow,
int aCol )
override;
52 wxGridCellEditor*
Clone()
const override;
53 void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler )
override;
57 void SetSize(
const wxRect& aRect )
override;
59 void BeginEdit(
int aRow,
int aCol, wxGrid* aGrid )
override;
60 bool EndEdit(
int aRow,
int aCol,
const wxGrid*,
const wxString&, wxString* aNewVal )
override;
61 void ApplyEdit(
int aRow,
int aCol, wxGrid* aGrid )
override;
62 void Reset()
override;
65 wxComboBox*
Combo()
const {
return static_cast<wxComboBox*
>( m_control ); }
67 void onComboCloseUp( wxCommandEvent& aEvent );
68 void onComboDropDown( wxCommandEvent& aEvent );
Renders a combobox cell's text with an always-visible dropdown arrow, so it reads as a dropdown even ...
void Draw(wxGrid &aGrid, wxGridCellAttr &aAttr, wxDC &aDC, const wxRect &aRect, int aRow, int aCol, bool isSelected) override
wxSize GetBestSize(wxGrid &aGrid, wxGridCellAttr &aAttr, wxDC &aDC, int aRow, int aCol) override
wxGridCellRenderer * Clone() const override
bool EndEdit(int aRow, int aCol, const wxGrid *, const wxString &, wxString *aNewVal) override
GRID_CELL_COMBOBOX(const wxArrayString &names)
~GRID_CELL_COMBOBOX() override
void Create(wxWindow *aParent, wxWindowID aId, wxEvtHandler *aEventHandler) override
wxString GetValue() const override
void BeginEdit(int aRow, int aCol, wxGrid *aGrid) override
wxDECLARE_NO_COPY_CLASS(GRID_CELL_COMBOBOX)
wxComboBox * Combo() const
void SetSize(const wxRect &aRect) override
void ApplyEdit(int aRow, int aCol, wxGrid *aGrid) override
wxGridCellEditor * Clone() const override