62 text.SetText( wxT(
"${U1:Value}" ) );
64 std::vector<SCH_ITEM*> added{ &
text };
80 std::vector<SCH_ITEM*> added{ &sym };
92 text.SetText( wxT(
"${X}" ) );
94 std::vector<SCH_ITEM*> items{ &
text };
109 text.SetText( wxT(
"${OLD}" ) );
114 pin->SetText( wxT(
"${OLD}" ) );
118 table.AddCell( cell );
119 cell->
SetText( wxT(
"${OLD}" ) );
121 std::vector<SCH_ITEM*> items{ &
text, &sheet, &
table };
122 std::vector<SCH_ITEM*> just_text{ &
text };
123 std::vector<SCH_ITEM*> just_sheet{ &sheet };
124 std::vector<SCH_ITEM*> just_table{ &
table };
132 text.SetText( wxT(
"${NEW}" ) );
140 pin->SetText( wxT(
"${NEW}" ) );
148 cell->
SetText( wxT(
"${NEW}" ) );
160 text.SetText( wxT(
"${OP:port}" ) );
162 std::vector<SCH_ITEM*> items{ &
text };
174 + wxS(
"NoConnectOnLineWithGlobalLabel.kicad_sch" );
196 BOOST_REQUIRE_EQUAL(
index.DependentCount( key ), 6u );
204 if( sheet->
GetFileName().EndsWith( wxS(
"issue13212_subsheet_1.kicad_sch" ) ) )
213 std::vector<SCH_ITEM*> items{ subsheet };
214 sch->OnItemsRemoved( items );
215 sch->OnItemsAdded( items );
216 sch->RefreshHierarchy();
242 text.SetText( sch->ConvertRefsToKIIDs( wxS(
"${TP1:value}" ) ) );
246 std::vector<SCH_ITEM*> added{ &
text };
249 bool invalidated =
false;
254 invalidated |= aDep == &
text;
257 std::vector<SCH_ITEM*> changed{ tp1 };
261 BOOST_CHECK( invalidated );
A base class for most all the KiCad significant classes used in schematics and boards.
virtual void SetText(const wxString &aText)
static SCHEMATIC * LoadSchematic(const wxString &aFileName, bool aSetActive, bool aForceDefaultProject, PROJECT *aProject=nullptr, bool aCalculateConnectivity=true, REPORTER *aRootReporter=nullptr)
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Bridges SCHEMATIC's listener stream into the generic TEXT_VAR_TRACKER.
void OnSchItemsChanged(SCHEMATIC &aSch, std::vector< SCH_ITEM * > &aItems) override
void OnSchItemsRemoved(SCHEMATIC &aSch, std::vector< SCH_ITEM * > &aItems) override
TEXT_VAR_TRACKER & Tracker()
void OnSchItemsAdded(SCHEMATIC &aSch, std::vector< SCH_ITEM * > &aItems) override
Holds all the data relating to one schematic.
class SCHEMATIC_TEXT_VAR_ADAPTER * GetTextVarAdapter() const
void SetText(const wxString &aText) override
Base class for any item which can be embedded within the SCHEMATIC container class,...
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
wxString GetFileName() const
Return the filename corresponding to this sheet.
void AddPin(SCH_SHEET_PIN *aSheetPin)
Add aSheetPin to the sheet.
void SetScreen(SCH_SCREEN *aScreen)
Set the SCH_SCREEN associated with this sheet to aScreen.
SCH_FIELD * GetField(FIELD_T aFieldType)
Return a mandatory field in this symbol.
Bidirectional index mapping TEXT_VAR_REF_KEY → dependent items and item → keys.
std::size_t ItemCount() const
ListenerHandle AddInvalidateListener(InvalidateCallback aCallback)
Register a listener that fires for every invalidation.
std::size_t ListenerHandle
Opaque handle returned by AddInvalidateListener and consumed by RemoveInvalidateListener.
TEXT_VAR_DEPENDENCY_INDEX & Index()
void RemoveInvalidateListener(ListenerHandle aHandle)
Drop a previously-registered listener.
std::string GetEeschemaTestDataDir()
Get the configured location of Eeschema test data.
std::vector< FAB_LAYER_COLOR > dummy
Identifies a single resolvable source that a text item's ${...} reference depends on.
static TEXT_VAR_REF_KEY FromToken(const wxString &aToken)
Parse a raw token (the text between ${ and }) into a key using lexical classification only — no looku...
@ VALUE
Field Value of part, i.e. "3.3K".
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(AdapterInstalledOnSchematicConstruction)
SCHEMATIC_TEXT_VAR_ADAPTER exercised at the listener interface.
BOOST_CHECK_EQUAL(result, "25.4")