37 [
this](
EDA_ITEM* aItem ) -> std::vector<TEXT_VAR_REF_KEY>
51 for(
SCH_FIELD& field : sym->GetFields() )
62 for(
SCH_FIELD& field : sheet->GetFields() )
86 for(
SCH_FIELD& field : sym->GetFields() )
91 for(
SCH_FIELD& field : sheet->GetFields() )
107 for(
SCH_FIELD& field : sym->GetFields() )
109 std::vector<TEXT_VAR_REF_KEY> refs =
FilterTrackable( field.GetTextVarReferences() );
113 m_tracker.HandleItemChanged( aItem, {} );
119 for(
SCH_FIELD& field : sheet->GetFields() )
121 std::vector<TEXT_VAR_REF_KEY> refs =
FilterTrackable( field.GetTextVarReferences() );
131 m_tracker.HandleItemChanged( aItem, updated );
137 std::vector<SCH_ITEM*>& aItems )
145 std::vector<SCH_ITEM*>& aItems )
153 std::vector<SCH_ITEM*>& aItems )
182 std::vector<TEXT_VAR_REF_KEY> out;
196 std::vector<wxString> refdesList;
199 if( hierarchy.empty() )
205 if( !refdes.IsEmpty() )
206 refdesList.push_back( refdes );
220 if(
path.LastScreen() != parentScreen )
223 const wxString refdes = sym->
GetRef( &
path,
false );
225 if( refdes.IsEmpty() )
228 if( std::find( refdesList.begin(), refdesList.end(), refdes ) == refdesList.end() )
229 refdesList.push_back( refdes );
233 if( refdesList.empty() )
236 out.reserve( refdesList.size() * sym->
GetFields().size() );
238 for(
const wxString& refdes : refdesList )
245 key.
secondary = field.GetCanonicalName();
246 out.push_back( key );
A base class for most all the KiCad significant classes used in schematics and boards.
EDA_ITEM * GetParent() const
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
std::vector< TEXT_VAR_REF_KEY > ExtractSourceKeys(EDA_ITEM *aItem) const
Return the keys aItem could source as a cross-reference target.
void OnSchItemsChanged(SCHEMATIC &aSch, std::vector< SCH_ITEM * > &aItems) override
void registerItem(SCH_ITEM *aItem)
void handleItemChanged(SCH_ITEM *aItem)
SCHEMATIC_TEXT_VAR_ADAPTER(SCHEMATIC &aSchematic)
void OnSchItemsRemoved(SCHEMATIC &aSch, std::vector< SCH_ITEM * > &aItems) override
void unregisterItem(SCH_ITEM *aItem)
TEXT_VAR_TRACKER m_tracker
void RebuildIndex()
Walk every sheet in the hierarchy and register text-bearing items.
void OnSchItemsAdded(SCHEMATIC &aSch, std::vector< SCH_ITEM * > &aItems) override
Holds all the data relating to one schematic.
Base class for any item which can be embedded within the SCHEMATIC container class,...
EE_RTREE & Items()
Get the full RTree, usually for iterating.
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
void GetFields(std::vector< SCH_FIELD * > &aVector, bool aVisibleOnly) const override
Populate a std::vector with SCH_FIELDs, sorted in ordinal order.
const wxString GetRef(const SCH_SHEET_PATH *aSheet, bool aIncludeUnit=false) const override
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
Identifies a single resolvable source that a text item's ${...} reference depends on.
std::vector< TEXT_VAR_REF_KEY > FilterTrackable(const std::vector< TEXT_VAR_REF_KEY > &aRefs)
Filter aRefs down to the subset that should be registered in the index (drops OP and any future non-t...