24 #ifndef KICAD_WX_GRID_H 25 #define KICAD_WX_GRID_H 29 #include <wx/version.h> 36 WX_GRID( wxWindow *parent, wxWindowID
id,
37 const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
38 long style = wxWANTS_CHARS,
const wxString&
name = wxGridNameStr );
64 void SetTable( wxGridTableBase* table,
bool aTakeOwnership =
false );
88 int GetVisibleWidth(
int aCol,
bool aHeader =
true,
bool aContents =
false,
bool aKeep =
true );
111 if( GetNumberRows() )
112 DeleteRows( 0, GetNumberRows() );
125 #if wxCHECK_VERSION( 3, 1, 0 ) 126 void onDPIChanged(wxDPIChangedEvent& event);
132 #endif //KICAD_WX_GRID_H
void DrawColLabel(wxDC &dc, int col) override
A re-implementation of wxGrid::DrawColLabel which left-aligns the first column when there are no row ...
WX_GRID(wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxWANTS_CHARS, const wxString &name=wxGridNameStr)
void ShowHideColumns(const wxString &shownColumns)
Show/hide the grid columns based on a tokenized string of shown column indexes.
void SetTable(wxGridTableBase *table, bool aTakeOwnership=false)
Hide wxGrid's SetTable() method with one which doesn't mess up the grid column widths when setting th...
int GetVisibleWidth(int aCol, bool aHeader=true, bool aContents=false, bool aKeep=true)
Calculates the specified column based on the actual size of the text on screen.
void DestroyTable(wxGridTableBase *aTable)
Work-around for a bug in wxGrid which crashes when deleting the table if the cell edit control was no...
void onGridColMove(wxGridEvent &aEvent)
void EnsureColLabelsVisible()
Ensure the height of the row displaying the column labels is enough, even if labels are multiline tex...
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
wxString GetShownColumns()
Get a tokenized string containing the shown column indexes.
void ClearRows()
wxWidgets recently added an ASSERT which fires if the position is greater than or equal to the number...
void onGridCellSelect(wxGridEvent &aEvent)
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
void ShowEditorOnMouseUp()
WxWidgets has a bunch of bugs in its handling of wxGrid mouse events which close cell editors right a...