20#ifndef PCB_GENERATED_TABLE_H
21#define PCB_GENERATED_TABLE_H
52 std::vector<GENERATED_TABLE_ROW>
m_Rows;
125 virtual std::unique_ptr<GENERATED_TABLE_CONTENT>
generate(
const BOARD& aBoard,
159 void migrateRows(
int aRows,
int aCols,
const std::vector<std::string>& aNewRowKeys );
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Information pertinent to a Pcbnew printed circuit board.
One pass of rebuilding tables.
The columns one generator (the drill chart, a stackup table, ...) can produce, and the units and prec...
A table whose cell text is derived from the board and rebuilt whenever it goes stale.
void migrateRows(int aRows, int aCols, const std::vector< std::string > &aNewRowKeys)
Move each row's cells to the row that reports the same thing.
std::vector< GENERATED_TABLE_COLUMN > m_columns
virtual void onRebuilt(const BOARD &aBoard, const GENERATED_TABLE_CONTENT &aContent)
Called once the cells are laid out, with the content they were built from.
GENERATED_TABLE_UNITS m_units
PCB_GENERATED_TABLE(const PCB_GENERATED_TABLE &aOther)=default
const std::map< int, std::string > & RowKeys() const
What each generated row reports on, by table row.
void RebuildCells(const BOARD &aBoard, GENERATED_TABLE_REFRESH *aRefresh=nullptr)
Regenerate the cells from the board.
std::map< int, std::string > & RowKeys()
const std::vector< GENERATED_TABLE_COLUMN > & Columns() const
virtual std::unique_ptr< GENERATED_TABLE_CONTENT > generate(const BOARD &aBoard, GENERATED_TABLE_REFRESH *aRefresh) const =0
The rows this table reports.
virtual bool IsDataRow(int aRow) const
True for a row that reports on the board, false for the heading and trailer rows.
virtual bool IsStale(const BOARD &aBoard) const
True when the cells no longer say what the board says.
void SetPrecision(int aPrecision)
Clamped.
virtual void styleNewCell(PCB_TABLECELL *aCell, bool aIsHeading)
Called for each cell a rebuild creates, before its text is set.
std::vector< GENERATED_TABLE_COLUMN > & Columns()
bool generatedEquals(const PCB_GENERATED_TABLE &aOther) const
Equality of the members this class owns and of the underlying PCB_TABLE.
void swapData(BOARD_ITEM *aImage) override
virtual const GENERATED_TABLE_SCHEMA & Schema() const =0
INSPECT_RESULT Visit(INSPECTOR aInspector, void *aTestData, const std::vector< KICAD_T > &aScanTypes) override
May be re-implemented for each derived class in order to handle all the types given by its member dat...
PCB_GENERATED_TABLE(BOARD_ITEM *aParent, KICAD_T aType, int aLineWidth)
GENERATED_TABLE_UNITS GetUnits() const
void SetUnits(GENERATED_TABLE_UNITS aUnits)
std::map< int, std::string > m_rowKeys
PCB_TABLE(BOARD_ITEM *aParent, int aLineWidth)
const INSPECTOR_FUNC & INSPECTOR
std::function passed to nested users by ref, avoids copying std::function.
What a generated table reports, one entry per cell below the heading row.
virtual ~GENERATED_TABLE_CONTENT()=default
std::vector< std::vector< wxString > > m_Trailer
Unkeyed rows below the data, e.g. totals.
std::vector< GENERATED_TABLE_ROW > m_Rows
Keyed, below the heading row.
One data row of a generated table, and the identity its formatting follows across rebuilds.
std::vector< wxString > m_Cells
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.