26#include <wx/generic/gridctrl.h>
30class wxStyledTextCtrl;
31class wxStyledTextEvent;
44 void SetSize(
const wxRect& aRect )
override;
46 virtual void SetValidator(
const wxValidator& validator )
override;
47 virtual void StartingKey( wxKeyEvent& event )
override;
63 void Draw( wxGrid& aGrid, wxGridCellAttr& aAttr, wxDC& aDC,
const wxRect& aRect,
int aRow,
64 int aCol,
bool isSelected )
override;
66 wxSize
GetBestSize( wxGrid&
grid, wxGridCellAttr& attr, wxDC& dc,
int row,
int col )
override;
79 void Draw( wxGrid& aGrid, wxGridCellAttr& aAttr, wxDC& aDC,
const wxRect& aRect,
int aRow,
80 int aCol,
bool isSelected )
override;
82 wxSize
GetBestSize( wxGrid&
grid, wxGridCellAttr& attr, wxDC& dc,
int row,
int col )
override;
92 void SetSize(
const wxRect& aRect )
override;
93 void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler )
override;
95 wxGridCellEditor*
Clone()
const override
100 wxString GetValue()
const override;
102 void StartingKey( wxKeyEvent& event )
override;
103 void Show(
bool aShow, wxGridCellAttr *aAttr =
nullptr )
override;
104 void BeginEdit(
int aRow,
int aCol, wxGrid* aGrid )
override;
105 bool EndEdit(
int aRow,
int aCol,
const wxGrid*,
const wxString&, wxString* aNewVal )
override;
106 void ApplyEdit(
int aRow,
int aCol, wxGrid* aGrid )
override;
110 void onFocusLoss( wxFocusEvent& aEvent );
112 wxStyledTextCtrl* stc_ctrl()
const;
129 wxString GetValue()
const override;
131 void SetSize(
const wxRect& aRect )
override;
133 void StartingKey( wxKeyEvent& event )
override;
134 void BeginEdit(
int aRow,
int aCol, wxGrid* aGrid )
override;
135 bool EndEdit(
int ,
int ,
const wxGrid* ,
const wxString& , wxString *aNewVal )
override;
136 void ApplyEdit(
int aRow,
int aCol, wxGrid* aGrid )
override;
137 void Reset()
override;
140 void SetValidator(
const wxValidator& validator );
144 wxComboCtrl*
Combo()
const {
return static_cast<wxComboCtrl*
>( m_control ); }
147 std::unique_ptr< wxValidator > m_validator;
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
GRID_CELL_ESCAPED_TEXT_RENDERER()
void SetSize(const wxRect &aRect) override
std::function< void(wxStyledTextEvent &, SCINTILLA_TRICKS *)> m_onCharFn
GRID_CELL_STC_EDITOR(bool aIgnoreCase, bool aSingleLine, std::function< void(wxStyledTextEvent &, SCINTILLA_TRICKS *)> onCharFn)
wxGridCellEditor * Clone() const override
void Create(wxWindow *aParent, wxWindowID aId, wxEvtHandler *aEventHandler) override
SCINTILLA_TRICKS * m_scintillaTricks
wxDECLARE_NO_COPY_CLASS(GRID_CELL_TEXT_BUTTON)
wxComboCtrl * Combo() const
std::unique_ptr< wxValidator > m_validator
void SetSize(const wxRect &aRect) override
virtual void StartingKey(wxKeyEvent &event) override
virtual void SetValidator(const wxValidator &validator) override
void Draw(wxGrid &aGrid, wxGridCellAttr &aAttr, wxDC &aDC, const wxRect &aRect, int aRow, int aCol, bool isSelected) override
GRID_CELL_TEXT_RENDERER()
wxSize GetBestSize(wxGrid &grid, wxGridCellAttr &attr, wxDC &dc, int row, int col) override
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance.