21#ifndef KICAD_GRID_TEXT_HELPERS_H
22#define KICAD_GRID_TEXT_HELPERS_H
25#include <wx/generic/gridctrl.h>
28class wxStyledTextCtrl;
29class wxStyledTextEvent;
41 void Draw( wxGrid& aGrid, wxGridCellAttr& aAttr, wxDC& aDC,
const wxRect& aRect,
int aRow,
42 int aCol,
bool isSelected )
override;
44 wxSize
GetBestSize( wxGrid&
grid, wxGridCellAttr& attr, wxDC& dc,
int row,
int col )
override;
54 void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler )
override;
56 wxGridCellEditor*
Clone()
const override
63 void Show(
bool aShow, wxGridCellAttr *aAttr =
nullptr )
override;
64 void BeginEdit(
int aRow,
int aCol, wxGrid* aGrid )
override;
65 bool EndEdit(
int aRow,
int aCol,
const wxGrid*,
const wxString&, wxString* aNewVal )
override;
66 void ApplyEdit(
int aRow,
int aCol, wxGrid* aGrid )
override;
A text renderer that can unescape text for display This is useful where it's desired to keep the unde...
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 ApplyEdit(int aRow, int aCol, wxGrid *aGrid) override
void onFocusLoss(wxFocusEvent &aEvent)
bool EndEdit(int aRow, int aCol, const wxGrid *, const wxString &, wxString *aNewVal) override
void BeginEdit(int aRow, int aCol, wxGrid *aGrid) override
wxString GetValue() const override
wxGridCellEditor * Clone() const override
void Create(wxWindow *aParent, wxWindowID aId, wxEvtHandler *aEventHandler) override
void Show(bool aShow, wxGridCellAttr *aAttr=nullptr) override
wxStyledTextCtrl * stc_ctrl() const
std::function< void(wxStyledTextEvent &, SCINTILLA_TRICKS *)> m_onChar
SCINTILLA_TRICKS * m_scintillaTricks
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance.