KiCad PCB EDA Suite
sch_screen.h
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
5  * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
25 #ifndef SCREEN_H
26 #define SCREEN_H
27 
28 #include <memory>
29 #include <stddef.h>
30 #include <unordered_set>
31 #include <vector>
32 #include <wx/arrstr.h>
33 #include <wx/chartype.h>
34 #include <wx/gdicmn.h>
35 #include <wx/string.h>
36 
37 #include <base_screen.h>
38 #include <core/typeinfo.h>
39 #include <kiid.h>
40 #include <kiway_holder.h>
41 #include <layer_ids.h>
42 #include <marker_base.h>
43 #include <page_info.h>
44 #include <template_fieldnames.h>
45 #include <title_block.h>
46 
47 #include <lib_id.h>
48 #include <sch_symbol.h> // SYMBOL_INSTANCE_REFERENCE
49 #include <sch_reference_list.h>
50 #include <sch_rtree.h>
51 #include <sch_sheet.h>
52 #include <sch_sheet_path.h>
53 
54 class BUS_ALIAS;
55 class EDA_ITEM;
56 class LIB_SYMBOL;
57 class LIB_PIN;
58 class SCH_SYMBOL;
59 class SCH_LINE;
60 class SCH_TEXT;
61 class PLOTTER;
62 class REPORTER;
63 class SCH_EDIT_FRAME;
64 class SCH_SHEET;
65 class SCH_SHEET_LIST;
66 class SCH_SEXPR_PARSER;
67 class SCH_SEXPR_PLUGIN;
68 
70 {
74 };
75 
76 
78 #define NB_MAX_SHEET 500
79 
81 {
83  int Unit;
84  int Convert;
85 
86  std::vector<std::pair<int, wxString>> Fields;
87 
88  PICKED_SYMBOL() : Unit( 1 ), Convert( 1 )
89  {
90  }
91 };
92 
93 class SCH_SCREEN : public BASE_SCREEN
94 {
95 public:
96  SCH_SCREEN( EDA_ITEM* aParent = nullptr );
97 
98  ~SCH_SCREEN();
99 
100  SCHEMATIC* Schematic() const;
101 
110  EE_RTREE& Items() { return m_rtree; }
111  const EE_RTREE& Items() const { return m_rtree; }
112 
113  bool IsEmpty() const
114  {
115  return m_rtree.empty();
116  }
117 
118  bool HasItems( KICAD_T aItemType ) const;
119 
120  bool HasSheets() const { return HasItems( SCH_SHEET_T ); }
121 
122  static bool ClassOf( const EDA_ITEM* aItem );
123 
124  virtual wxString GetClass() const override
125  {
126  return wxT( "SCH_SCREEN" );
127  }
128 
129  void SetFileFormatVersionAtLoad( int aVersion ) { m_fileFormatVersionAtLoad = aVersion; }
131 
132  const PAGE_INFO& GetPageSettings() const { return m_paper; }
133  void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
134 
143  void SetFileName( const wxString& aFileName );
144 
145  const wxString& GetFileName() const { return m_fileName; }
146 
147  const wxPoint& GetAuxOrigin() const { return m_aux_origin; }
148  void SetAuxOrigin( const wxPoint& aPosition ) { m_aux_origin = aPosition; }
149 
150  const TITLE_BLOCK& GetTitleBlock() const { return m_titles; }
151 
152  void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
153 
154  void DecRefCount();
155  void IncRefCount();
156  int GetRefCount() const { return m_refCount; }
157 
171  std::vector<SCH_SHEET_PATH>& GetClientSheetPaths()
172  {
173  return m_clientSheetPathList;
174  }
175 
176  void Append( SCH_ITEM* aItem );
177 
188  void Append( SCH_SCREEN* aScreen );
189 
193  void Clear( bool aFree = true );
194 
200  void FreeDrawList();
201 
210  SCH_ITEM* GetItem( const wxPoint& aPosition, int aAccuracy = 0,
211  KICAD_T aType = SCH_LOCATE_ANY_T ) const;
212 
228  void UpdateSymbolLinks( REPORTER* aReporter = nullptr );
229 
235 
242  void Print( const RENDER_SETTINGS* aSettings );
243 
252  void Plot( PLOTTER* aPlotter ) const;
253 
261  bool Remove( SCH_ITEM* aItem );
262 
268  void Update( SCH_ITEM* aItem );
269 
278  void DeleteItem( SCH_ITEM* aItem );
279 
280  bool CheckIfOnDrawList( const SCH_ITEM* aItem ) const;
281 
288  void TestDanglingEnds( const SCH_SHEET_PATH* aPath = nullptr,
289  std::function<void( SCH_ITEM* )>* aChangedHandler = nullptr ) const;
290 
297  std::set<SCH_ITEM*> MarkConnections( SCH_LINE* aSegment );
298 
302  void ClearDrawingState();
303 
304  size_t CountConnectedItems( const wxPoint& aPos, bool aTestJunctions ) const;
305 
319  bool IsJunctionNeeded( const wxPoint& aPosition, bool aNew = false ) const;
320 
329  bool IsTerminalPoint( const wxPoint& aPosition, int aLayer ) const;
330 
340  LIB_PIN* GetPin( const wxPoint& aPosition, SCH_SYMBOL** aSymbol = nullptr,
341  bool aEndPointOnly = false ) const;
342 
349  SCH_SHEET_PIN* GetSheetPin( const wxPoint& aPosition ) const;
350 
357  void ClearAnnotation( SCH_SHEET_PATH* aSheetPath );
358 
369 
375  void GetHierarchicalItems( std::vector<SCH_ITEM*>* aItems ) const;
376 
381  void GetSheets( std::vector<SCH_ITEM*>* aItems ) const;
382 
393  SCH_LINE* GetLine( const wxPoint& aPosition, int aAccuracy = 0, int aLayer = LAYER_NOTES,
394  SCH_LINE_TEST_T aSearchType = ENTIRE_LENGTH_T ) const;
395 
396  SCH_LINE* GetWire( const wxPoint& aPosition, int aAccuracy = 0,
397  SCH_LINE_TEST_T aSearchType = ENTIRE_LENGTH_T ) const
398  {
399  return GetLine( aPosition, aAccuracy, LAYER_WIRE, aSearchType );
400  }
401 
402  SCH_LINE* GetBus( const wxPoint& aPosition, int aAccuracy = 0,
403  SCH_LINE_TEST_T aSearchType = ENTIRE_LENGTH_T ) const
404  {
405  return GetLine( aPosition, aAccuracy, LAYER_BUS, aSearchType );
406  }
407 
416  SCH_TEXT* GetLabel( const wxPoint& aPosition, int aAccuracy = 0 ) const;
417 
424  std::map<wxString, LIB_SYMBOL*>& GetLibSymbols() { return m_libSymbols; }
425  const std::map<wxString, LIB_SYMBOL*>& GetLibSymbols() const { return m_libSymbols; }
426 
436  void AddLibSymbol( LIB_SYMBOL* aLibSymbol );
437 
441  void AddBusAlias( std::shared_ptr<BUS_ALIAS> aAlias );
442 
447  {
448  m_aliases.clear();
449  }
450 
454  std::unordered_set< std::shared_ptr<BUS_ALIAS> > GetBusAliases() const
455  {
456  return m_aliases;
457  }
458 
459  const std::vector<SYMBOL_INSTANCE_REFERENCE>& GetSymbolInstances() const
460  {
461  return m_symbolInstances;
462  }
463 
464  const std::vector<SCH_SHEET_INSTANCE>& GetSheetInstances() const
465  {
466  return m_sheetInstances;
467  }
468 
469  const KIID& GetUuid() const { return m_uuid; }
470 
471  void AssignNewUuid() { m_uuid = KIID(); }
472 
473 #if defined(DEBUG)
474  void Show( int nestLevel, std::ostream& os ) const override;
475 #endif
476 
482 
483 private:
484  friend SCH_EDIT_FRAME; // Only to populate m_symbolInstances.
485  friend SCH_SEXPR_PARSER; // Only to load instance information from schematic file.
486  friend SCH_SEXPR_PLUGIN; // Only to save the loaded instance information to schematic file.
487 
488  void clearLibSymbols();
489 
490  wxString m_fileName; // File used to load the screen.
492  int m_refCount; // Number of sheets referencing this screen.
493  // Delete when it goes to zero.
501  std::vector<SCH_SHEET_PATH> m_clientSheetPathList;
502 
503 
504  PAGE_INFO m_paper; // The size of the paper to print or plot on.
506  wxPoint m_aux_origin; // Origin used for drill & place files by Pcbnew.
508 
509  int m_modification_sync; // Inequality with SYMBOL_LIBS::GetModificationHash()
510  // will trigger ResolveAll().
511 
512  bool m_zoomInitialized; // Set to true once the zoom value is initialized with
513  // `InitZoom()`.
514 
516  std::unordered_set< std::shared_ptr< BUS_ALIAS > > m_aliases;
517 
519  std::map<wxString, LIB_SYMBOL*> m_libSymbols;
520 
535  std::vector<SYMBOL_INSTANCE_REFERENCE> m_symbolInstances;
536  std::vector<SCH_SHEET_INSTANCE> m_sheetInstances;
537 
545 };
546 
547 
558 {
559 public:
560  SCH_SCREENS( SCH_SHEET* aSheet );
561  SCH_SCREENS( SCH_SHEET& aSheet ) : SCH_SCREENS( &aSheet ) {}
562  ~SCH_SCREENS();
563  size_t GetCount() const { return m_screens.size(); }
564  SCH_SCREEN* GetFirst();
565  SCH_SCREEN* GetNext();
566  SCH_SCREEN* GetScreen( unsigned int aIndex ) const;
567  SCH_SHEET* GetSheet( unsigned int aIndex ) const;
568 
577  void ClearAnnotationOfNewSheetPaths( SCH_SHEET_LIST& aInitialSheetPathList );
578 
589 
596  void DeleteAllMarkers( enum MARKER_BASE::TYPEMARKER aMarkerType, bool aIncludeExclusions );
597 
601  void DeleteMarkers( enum MARKER_BASE::TYPEMARKER aMarkerTyp, int aErrorCode,
602  bool aIncludeExclusions = true );
603 
607  void DeleteMarker( SCH_MARKER* aMarker );
608 
620  void UpdateSymbolLinks( REPORTER* aReporter = nullptr );
621 
622  void ClearEditFlags();
623 
635 
642  size_t GetLibNicknames( wxArrayString& aLibNicknames );
643 
651  int ChangeSymbolLibNickname( const wxString& aFrom, const wxString& aTo );
652 
662  bool HasSchematic( const wxString& aSchematicFileName );
663 
668 
680  bool CanCauseCaseSensitivityIssue( const wxString& aSchematicFileName ) const;
681 
682 private:
683  void addScreenToList( SCH_SCREEN* aScreen, SCH_SHEET* aSheet );
684  void buildScreenList( SCH_SHEET* aSheet);
685 
686  std::vector< SCH_SCREEN* > m_screens;
687  std::vector< SCH_SHEET* > m_sheets;
688  unsigned int m_index;
689 };
690 
691 #endif /* SCREEN_H */
bool empty() const
Definition: sch_rtree.h:163
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
void Plot(PLOTTER *aPlotter) const
Plot all the schematic objects to aPlotter.
Definition: sch_screen.cpp:770
const wxString & GetFileName() const
Definition: sch_screen.h:145
bool Remove(SCH_ITEM *aItem)
Remove aItem from the schematic associated with this screen.
Definition: sch_screen.cpp:271
SCH_SCREEN * GetNext()
void DeleteMarkers(enum MARKER_BASE::TYPEMARKER aMarkerTyp, int aErrorCode, bool aIncludeExclusions=true)
Delete all markers of a particular type and error code.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
std::vector< SYMBOL_INSTANCE_REFERENCE > m_symbolInstances
The list of symbol instances loaded from the schematic file.
Definition: sch_screen.h:535
Holds all the data relating to one schematic.
Definition: schematic.h:59
void GetSheets(std::vector< SCH_ITEM * > *aItems) const
Similar to Items().OfType( SCH_SHEET_T ), but return the sheets in a deterministic order (L-R,...
Definition: sch_screen.cpp:956
bool IsTerminalPoint(const wxPoint &aPosition, int aLayer) const
Test if aPosition is a connection point on aLayer.
Definition: sch_screen.cpp:484
void clearLibSymbols()
Definition: sch_screen.cpp:99
const std::vector< SYMBOL_INSTANCE_REFERENCE > & GetSymbolInstances() const
Definition: sch_screen.h:459
double m_LastZoomLevel
last value for the zoom level, useful in Eeschema when changing the current displayed sheet to reuse ...
Definition: sch_screen.h:481
void ClearEditFlags()
int GetFileFormatVersionAtLoad() const
Definition: sch_screen.h:130
void addScreenToList(SCH_SCREEN *aScreen, SCH_SHEET *aSheet)
int m_refCount
Definition: sch_screen.h:492
int ChangeSymbolLibNickname(const wxString &aFrom, const wxString &aTo)
Change all of the symbol library nicknames.
void TestDanglingEnds(const SCH_SHEET_PATH *aPath=nullptr, std::function< void(SCH_ITEM *)> *aChangedHandler=nullptr) const
Test all of the connectable objects in the schematic for unused connection points.
Definition: sch_screen.cpp:978
const std::map< wxString, LIB_SYMBOL * > & GetLibSymbols() const
Definition: sch_screen.h:425
const TITLE_BLOCK & GetTitleBlock() const
Definition: sch_screen.h:150
void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: sch_screen.h:133
Schematic editor (Eeschema) main window.
void AssignNewUuid()
Definition: sch_screen.h:471
Implements an R-tree for fast spatial and type indexing of schematic items.
Definition: sch_rtree.h:40
void EnsureAlternateReferencesExist()
For screens shared by many sheetpaths (complex hierarchies): to be able to clear or modify any refere...
Definition: sch_screen.cpp:928
wxPoint m_aux_origin
Definition: sch_screen.h:506
wxString m_fileName
Definition: sch_screen.h:490
void SetAuxOrigin(const wxPoint &aPosition)
Definition: sch_screen.h:148
friend SCH_EDIT_FRAME
Definition: sch_screen.h:484
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:70
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:51
int m_modification_sync
Definition: sch_screen.h:509
Define a library symbol object.
Definition: lib_symbol.h:96
Hold the information shown in the lower right corner of a plot, printout, or editing view.
Definition: title_block.h:40
const PAGE_INFO & GetPageSettings() const
Definition: sch_screen.h:132
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition: typeinfo.h:77
SCH_SCREENS(SCH_SHEET &aSheet)
Definition: sch_screen.h:561
void Clear(bool aFree=true)
Delete all draw items and clears the project settings.
Definition: sch_screen.cpp:226
std::vector< SCH_SHEET_PATH > m_clientSheetPathList
The list of sheet paths sharing this screen.
Definition: sch_screen.h:501
SCH_SCREEN(EDA_ITEM *aParent=nullptr)
Definition: sch_screen.cpp:66
unsigned int m_index
Definition: sch_screen.h:688
Definition: kiid.h:44
bool HasItems(KICAD_T aItemType) const
Definition: sch_screen.cpp:130
void UpdateLocalLibSymbolLinks()
Initialize the LIB_SYMBOL reference for each SCH_SYMBOL found in this schematic with the local projec...
Definition: sch_screen.cpp:703
std::vector< SCH_SHEET * > m_sheets
Definition: sch_screen.h:687
TITLE_BLOCK m_titles
Definition: sch_screen.h:505
int m_fileFormatVersionAtLoad
Definition: sch_screen.h:491
PAGE_INFO m_paper
Definition: sch_screen.h:504
bool HasSheets() const
Definition: sch_screen.h:120
SCH_LINE * GetBus(const wxPoint &aPosition, int aAccuracy=0, SCH_LINE_TEST_T aSearchType=ENTIRE_LENGTH_T) const
Definition: sch_screen.h:402
void DeleteItem(SCH_ITEM *aItem)
Removes aItem from the linked list and deletes the object.
Definition: sch_screen.cpp:309
std::vector< SCH_SHEET_INSTANCE > m_sheetInstances
Definition: sch_screen.h:536
Describe the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:53
SCH_LINE_TEST_T
Definition: sch_screen.h:69
Handles how to draw a screen (a board, a schematic ...)
Definition: base_screen.h:40
SCH_SHEET_PIN * GetSheetPin(const wxPoint &aPosition) const
Test the screen if aPosition is a sheet label object.
Definition: sch_screen.cpp:884
const std::vector< SCH_SHEET_INSTANCE > & GetSheetInstances() const
Definition: sch_screen.h:464
EE_RTREE m_rtree
Definition: sch_screen.h:507
void DeleteAllMarkers(enum MARKER_BASE::TYPEMARKER aMarkerType, bool aIncludeExclusions)
Delete all electronic rules check markers of aMarkerType from all the screens in the list.
SCH_ITEM * GetItem(const wxPoint &aPosition, int aAccuracy=0, KICAD_T aType=SCH_LOCATE_ANY_T) const
Check aPosition within a distance of aAccuracy for items of type aFilter.
Definition: sch_screen.cpp:340
void BuildClientSheetPathList()
built the list of sheet paths sharing a screen for each screen in use
bool HasSchematic(const wxString &aSchematicFileName)
Check if one of the schematics in the list of screens is aSchematicFileName.
std::map< wxString, LIB_SYMBOL * > & GetLibSymbols()
Fetch a list of unique LIB_SYMBOL object pointers required to properly render each SCH_SYMBOL in this...
Definition: sch_screen.h:424
size_t GetCount() const
Definition: sch_screen.h:563
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Definition: sch_sheet_pin.h:65
bool HasNoFullyDefinedLibIds()
Test all of the schematic symbols to see if all LIB_ID objects library nickname is not set.
Object to parser s-expression symbol library and schematic file formats.
const EE_RTREE & Items() const
Definition: sch_screen.h:111
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
void SetFileFormatVersionAtLoad(int aVersion)
Definition: sch_screen.h:129
void DeleteMarker(SCH_MARKER *aMarker)
Delete a specific marker.
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
Definition: sch_screen.h:152
void ClearBusAliases()
Remove all bus alias definitions.
Definition: sch_screen.h:446
static bool ClassOf(const EDA_ITEM *aItem)
Definition: sch_screen.cpp:138
void FreeDrawList()
Free all the items from the schematic associated with the screen.
Definition: sch_screen.cpp:245
A SCH_PLUGIN derivation for loading schematic files using the new s-expression file format.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:54
const KIID & GetUuid() const
Definition: sch_screen.h:469
void AddLibSymbol(LIB_SYMBOL *aLibSymbol)
Add aLibSymbol to the library symbol map.
size_t CountConnectedItems(const wxPoint &aPos, bool aTestJunctions) const
Definition: sch_screen.cpp:902
void buildScreenList(SCH_SHEET *aSheet)
void DecRefCount()
Definition: sch_screen.cpp:122
Base plotter engine class.
Definition: plotter.h:121
std::unordered_set< std::shared_ptr< BUS_ALIAS > > GetBusAliases() const
Return a list of bus aliases defined in this screen.
Definition: sch_screen.h:454
void UpdateSymbolLinks(REPORTER *aReporter=nullptr)
Initialize the LIB_SYMBOL reference for each SCH_SYMBOL found in this schematic from the project SYMB...
Definition: sch_screen.cpp:549
Schematic symbol object.
Definition: sch_symbol.h:78
void Print(const RENDER_SETTINGS *aSettings)
Print all the items in the screen to aDC.
Definition: sch_screen.cpp:729
void AddBusAlias(std::shared_ptr< BUS_ALIAS > aAlias)
Add a bus alias definition (and transfers ownership of the pointer).
Segment description base class to describe items which have 2 end points (track, wire,...
Definition: sch_line.h:37
bool m_zoomInitialized
Definition: sch_screen.h:512
SCH_LINE * GetLine(const wxPoint &aPosition, int aAccuracy=0, int aLayer=LAYER_NOTES, SCH_LINE_TEST_T aSearchType=ENTIRE_LENGTH_T) const
Return a line item located at aPosition.
Definition: sch_screen.cpp:997
std::vector< SCH_SCREEN * > m_screens
Definition: sch_screen.h:686
void Append(SCH_ITEM *aItem)
Definition: sch_screen.cpp:144
SCH_LINE * GetWire(const wxPoint &aPosition, int aAccuracy=0, SCH_LINE_TEST_T aSearchType=ENTIRE_LENGTH_T) const
Definition: sch_screen.h:396
SCHEMATIC * Schematic() const
Definition: sch_screen.cpp:90
KIID m_uuid
A unique identifier for each schematic file.
Definition: sch_screen.h:544
SCH_SCREENS(SCH_SHEET *aSheet)
std::unordered_set< std::shared_ptr< BUS_ALIAS > > m_aliases
List of bus aliases stored in this screen.
Definition: sch_screen.h:516
EE_RTREE & Items()
Gets the full RTree, usually for iterating.
Definition: sch_screen.h:110
SCH_SHEET * GetSheet(unsigned int aIndex) const
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:100
friend SCH_SEXPR_PLUGIN
Definition: sch_screen.h:486
bool IsJunctionNeeded(const wxPoint &aPosition, bool aNew=false) const
Test if a junction is required for the items at aPosition on the screen.
Definition: sch_screen.cpp:401
SCH_TEXT * GetLabel(const wxPoint &aPosition, int aAccuracy=0) const
Return a label item located at aPosition.
void ClearAnnotation(SCH_SHEET_PATH *aSheetPath)
Clear the annotation for the symbols in aSheetPath on the screen.
Definition: sch_screen.cpp:916
int ReplaceDuplicateTimeStamps()
Test all sheet and symbol objects in the schematic for duplicate time stamps and replaces them as nec...
std::vector< SCH_SHEET_PATH > & GetClientSheetPaths()
Return the number of times this screen is used.
Definition: sch_screen.h:171
bool CanCauseCaseSensitivityIssue(const wxString &aSchematicFileName) const
Check aSchematicFileName for a potential file name case sensitivity issue.
SCH_SCREEN * GetFirst()
SCH_SCREEN * GetScreen(unsigned int aIndex) const
void ClearDrawingState()
Clear the state flags of all the items in the screen.
Definition: sch_screen.cpp:825
void Update(SCH_ITEM *aItem)
Update aItem's bounding box in the tree.
Definition: sch_screen.cpp:264
void SetFileName(const wxString &aFileName)
Set the file name for this screen to aFileName.
Definition: sch_screen.cpp:108
void ClearAnnotationOfNewSheetPaths(SCH_SHEET_LIST &aInitialSheetPathList)
Clear the annotation for the symbols inside new sheetpaths when a complex hierarchy is modified and n...
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
BASE_SCREEN class implementation.
std::map< wxString, LIB_SYMBOL * > m_libSymbols
Library symbols required for this schematic.
Definition: sch_screen.h:519
void UpdateSymbolLinks(REPORTER *aReporter=nullptr)
Initialize the LIB_SYMBOL reference for each SCH_SYMBOL found in the full schematic.
LIB_ID LibId
Definition: sch_screen.h:82
LIB_PIN * GetPin(const wxPoint &aPosition, SCH_SYMBOL **aSymbol=nullptr, bool aEndPointOnly=false) const
Test the screen for a symbol pin item at aPosition.
Definition: sch_screen.cpp:832
const wxPoint & GetAuxOrigin() const
Definition: sch_screen.h:147
friend SCH_SEXPR_PARSER
Definition: sch_screen.h:485
size_t GetLibNicknames(wxArrayString &aLibNicknames)
Fetch all of the symbol library nicknames into aLibNicknames.
std::vector< std::pair< int, wxString > > Fields
Definition: sch_screen.h:86
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:193
void GetHierarchicalItems(std::vector< SCH_ITEM * > *aItems) const
Add all schematic sheet and symbol objects in the screen to aItems.
Definition: sch_screen.cpp:944
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
Definition: sch_screen.h:557
void IncRefCount()
Definition: sch_screen.cpp:116
int GetRefCount() const
Definition: sch_screen.h:156
bool CheckIfOnDrawList(const SCH_ITEM *aItem) const
Definition: sch_screen.cpp:334
virtual wxString GetClass() const override
Return the class name.
Definition: sch_screen.h:124
bool IsEmpty() const
Definition: sch_screen.h:113
std::set< SCH_ITEM * > MarkConnections(SCH_LINE *aSegment)
Return all wires and junctions connected to aSegment which are not connected any symbol pin.
Definition: sch_screen.cpp:356