28#include <api/board/board_types.pb.h>
42 return wxString::Format(
_(
"Stackup Table (%d rows)" ),
GetRowCount() );
58 auto content = std::make_unique<GENERATED_TABLE_CONTENT>();
74 kiapi::board::types::StackupTable
table;
78 if( !aContainer.PackFrom(
table ) )
79 wxFAIL_MSG( wxT(
"Failed to pack PCB_STACKUP_TABLE" ) );
85 kiapi::board::types::StackupTable
table;
87 if( !aContainer.UnpackTo( &
table ) )
void PackGeneratedTable(const PCB_GENERATED_TABLE &aTable, MSG &aMsg)
Pack what every generated table shares into its message.
bool UnpackGeneratedTable(const MSG &aMsg, PCB_GENERATED_TABLE &aTable)
The reverse of PackGeneratedTable.
constexpr EDA_IU_SCALE pcbIUScale
#define DEFAULT_LINE_WIDTH
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.
KICAD_T Type() const
Returns the type of object.
One pass of rebuilding tables.
std::vector< GENERATED_TABLE_COLUMN > Defaults() const
GENERATED_TABLE_UNITS DefaultUnits() const
int DefaultPrecision() const
A table whose cell text is derived from the board and rebuilt whenever it goes stale.
std::vector< GENERATED_TABLE_COLUMN > m_columns
GENERATED_TABLE_UNITS m_units
bool generatedEquals(const PCB_GENERATED_TABLE &aOther) const
Equality of the members this class owns and of the underlying PCB_TABLE.
PCB_GENERATED_TABLE(BOARD_ITEM *aParent, KICAD_T aType, int aLineWidth)
A board stackup table placed on the board, kept in step with the stackup.
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
PCB_STACKUP_TABLE(BOARD_ITEM *aParent)
bool operator==(const BOARD_ITEM &aOther) const override
void styleNewCell(PCB_TABLECELL *aCell, bool aIsHeading) override
The text style of the one-shot stackup table this replaces, so a placed table looks the same.
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
std::unique_ptr< GENERATED_TABLE_CONTENT > generate(const BOARD &aBoard, GENERATED_TABLE_REFRESH *aRefresh) const override
The rows this table reports.
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
void SetTextThickness(int aWidth) override
The TextThickness is that set by the user.
void SetTextSize(VECTOR2I aNewSize, bool aEnforceMinTextSize=true) override
void InheritsAfter(TYPE_ID aDerived, TYPE_ID aBase)
Declare an inheritance relationship between types.
static PROPERTY_MANAGER & Instance()
void AddTypeCast(TYPE_CAST_BASE *aCast)
Register a type converter.
static struct PCB_STACKUP_TABLE_DESC _PCB_STACKUP_TABLE_DESC
#define TYPE_HASH(x)
Macro to generate unique identifier for a type.
#define REGISTER_TYPE(x)
Helper macro to map type hashes to names.
std::vector< GENERATED_TABLE_ROW > BuildStackupTableRows(const BOARD &aBoard, const std::vector< GENERATED_TABLE_COLUMN > &aColumns, GENERATED_TABLE_UNITS aUnits, int aPrecision)
One row per stackup layer, and per sublayer of a split dielectric, top to bottom.
const GENERATED_TABLE_SCHEMA & StackupTableSchema()
Every column a stackup table can show, all of them by default.
@ PCB_STACKUP_TABLE_T
class PCB_STACKUP_TABLE, a live stackup table derived from PCB_TABLE
VECTOR2< int32_t > VECTOR2I