44 std::unique_ptr<SCHEMATIC> schematic;
51 label->Move(
VECTOR2I( 100000000, 100000000 ) );
53 for(
const wxString& previous : { wxString(
"old_net" ), wxString(
"another_net" ) } )
55 label->SetText( previous );
56 schematic->RebuildConnectivity();
57 const auto previousName = label->GetConnectionName( &
path,
false,
true );
61 for(
const wxString& token : { wxString(
"NET_NAME" ), wxString(
"SHORT_NET_NAME" ), wxString(
"NET_CLASS" ) } )
63 const wxString expression = wxS(
"${" ) + token + wxS(
"}" );
64 schematic->Project().GetTextVars()[wxS(
"S0_OUTPUT" )] = expression;
66 for(
const wxString& input : { expression, wxString(
"${S0_OUTPUT}" ) } )
68 label->SetText( wxS(
"input_" ) + input );
70 auto text = std::find_if( instance.
items.begin(), instance.
items.end(),
73 return aText.id == label->m_Uuid;
82 label->SetText( wxS(
"${SHORT_NET_NAME}" ) );
91 std::unique_ptr<SCHEMATIC> schematic;
93 BOOST_REQUIRE_GT( schematic->Hierarchy().size(), 1 );
104 if( label->GetFields().empty() )
107 SCH_FIELD& field = label->GetFields().front();
108 field.
SetText( wxS(
"scope_${SHEETNAME}" ) );
109 label->SetText( wxS(
"${" ) + field.
GetName() + wxS(
"}" ) );
115 schematic->SetCurrentSheet( current );
117 auto text = std::find_if( instance.
items.begin(), instance.
items.end(),
120 return aText.id == label->m_Uuid;
129 BOOST_CHECK_GT( checked, 0 );
EE_TYPE OfType(KICAD_T aType) const
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Keep the last publication readable while a batch stages edits before its single commit.
wxString GetShownText(const SCH_SHEET_PATH *aPath, RESOLUTION_CONTEXT aContext, const wxString &aVariantName=wxEmptyString, int aDepth=0) const
wxString GetName(bool aUseDefaultName=true) const
Return the field name (not translated).
void SetText(const wxString &aText) override
Base class for any item which can be embedded within the SCHEMATIC container class,...
EE_RTREE & Items()
Get the full RTree, usually for iterating.
SCH_ITEM * GetConnectivityItem(const KIID &aId) const
Resolve a drawing item or a connectable child on this screen; ambiguous IDs return null.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
void LoadSchematic(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< SCHEMATIC > &aSchematic)
Value keys and the key session of the schematic connectivity engine.
INSTANCE_FACTS ExtractInstanceFacts(const SCREEN_FACTS &aFacts, const SCH_SCREEN &aScreen, const SCH_SHEET_PATH &aPath)
SCREEN_FACTS ExtractScreenFacts(const SCH_SCREEN &aScreen, std::shared_ptr< const LIBRARY_SYMBOL_FACTS > aLibrarySymbols, const SCREEN_FACTS *aUnchangedNonLines)
Main-thread snapshots; no derived connectivity or model pointers survive extraction.
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
wxString EscapeString(const wxString &aSource, ESCAPE_CONTEXT aContext)
The Escape/Unescape routines use HTML-entity-reference-style encoding to handle characters which are:...
The text and unit data that one sheet instance resolves for the items of its screen.
std::vector< ITEM_TEXT_FACT > items
The value copy of one screen.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_CASE(InputTextDoesNotReadThePreviousNet)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
VECTOR3I expected(15, 30, 45)
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I