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 <eda_item.h>
39 #include <core/typeinfo.h>
40 #include <kiid.h>
41 #include <kiway_holder.h>
43 #include <marker_base.h>
44 #include <page_info.h>
45 #include <template_fieldnames.h>
46 #include <title_block.h>
47 
48 #include <lib_id.h>
49 #include <sch_symbol.h> // COMPONENT_INSTANCE_REFERENCE
50 #include <sch_reference_list.h>
51 #include <sch_rtree.h>
52 #include <sch_sheet.h>
53 #include <sch_sheet_path.h>
54 
55 class BUS_ALIAS;
56 
57 class LIB_PART;
58 class LIB_PIN;
59 class SCH_COMPONENT;
60 class SCH_LINE;
61 class SCH_TEXT;
62 class PLOTTER;
63 class REPORTER;
64 class SCH_EDIT_FRAME;
65 class SCH_SHEET;
66 class SCH_SHEET_LIST;
67 class SCH_SEXPR_PARSER;
68 class SCH_SEXPR_PLUGIN;
69 
71 {
75 };
76 
77 
79 #define NB_MAX_SHEET 500
80 
82 {
84  int Unit;
85  int Convert;
86 
87  std::vector<std::pair<int, wxString>> Fields;
88 
89  PICKED_SYMBOL() : Unit( 1 ), Convert( 1 )
90  {
91  }
92 };
93 
94 class SCH_SCREEN : public BASE_SCREEN
95 {
96 public:
97  SCH_SCREEN( EDA_ITEM* aParent = nullptr );
98 
99  ~SCH_SCREEN();
100 
101  SCHEMATIC* Schematic() const;
102 
103  EE_RTREE& Items() { return m_rtree; }
104  const EE_RTREE& Items() const { return m_rtree; }
105 
106  bool IsEmpty() const
107  {
108  return m_rtree.empty();
109  }
110 
111  bool HasItems( KICAD_T aItemType ) const;
112 
113  bool HasSheets() const { return HasItems( SCH_SHEET_T ); }
114 
115  static inline bool ClassOf( const EDA_ITEM* aItem )
116  {
117  return aItem && SCH_SCREEN_T == aItem->Type();
118  }
119 
120  virtual wxString GetClass() const override
121  {
122  return wxT( "SCH_SCREEN" );
123  }
124 
125  void SetFileFormatVersionAtLoad( int aVersion ) { m_fileFormatVersionAtLoad = aVersion; }
127 
128  const PAGE_INFO& GetPageSettings() const { return m_paper; }
129  void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
130 
131  void SetFileName( const wxString& aFileName ) { m_fileName = aFileName; }
132 
133  const wxString& GetFileName() const { return m_fileName; }
134 
135  const wxPoint& GetAuxOrigin() const { return m_aux_origin; }
136  void SetAuxOrigin( const wxPoint& aPosition ) { m_aux_origin = aPosition; }
137 
138  const TITLE_BLOCK& GetTitleBlock() const { return m_titles; }
139 
140  void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
141 
142  void DecRefCount();
143  void IncRefCount();
144  int GetRefCount() const { return m_refCount; }
145 
159  std::vector<SCH_SHEET_PATH>& GetClientSheetPaths()
160  {
161  return m_clientSheetPathList;
162  }
163 
164  void Append( SCH_ITEM* aItem );
165 
176  void Append( SCH_SCREEN* aScreen );
177 
181  void Clear( bool aFree = true );
182 
188  void FreeDrawList();
189 
198  SCH_ITEM* GetItem( const wxPoint& aPosition, int aAccuracy = 0,
199  KICAD_T aType = SCH_LOCATE_ANY_T ) const;
200 
201  void Place( SCH_EDIT_FRAME* frame, wxDC* DC ) { };
202 
218  void UpdateSymbolLinks( REPORTER* aReporter = nullptr );
219 
225 
226  void SwapSymbolLinks( const SCH_COMPONENT* aOriginalSymbol, const SCH_COMPONENT* aNewSymbol );
227 
234  void Print( const RENDER_SETTINGS* aSettings );
235 
244  void Plot( PLOTTER* aPlotter ) const;
245 
253  bool Remove( SCH_ITEM* aItem );
254 
260  void Update( SCH_ITEM* aItem );
261 
270  void DeleteItem( SCH_ITEM* aItem );
271 
272  bool CheckIfOnDrawList( const SCH_ITEM* aItem ) const;
273 
280  void TestDanglingEnds( const SCH_SHEET_PATH* aPath = nullptr,
281  std::function<void( SCH_ITEM* )>* aChangedHandler = nullptr ) const;
282 
289  std::set<SCH_ITEM*> MarkConnections( SCH_LINE* aSegment );
290 
294  void ClearDrawingState();
295 
296  size_t CountConnectedItems( const wxPoint& aPos, bool aTestJunctions ) const;
297 
311  bool IsJunctionNeeded( const wxPoint& aPosition, bool aNew = false ) const;
312 
321  bool IsTerminalPoint( const wxPoint& aPosition, int aLayer ) const;
322 
332  LIB_PIN* GetPin( const wxPoint& aPosition, SCH_COMPONENT** aSymbol = NULL,
333  bool aEndPointOnly = false ) const;
334 
341  SCH_SHEET_PIN* GetSheetPin( const wxPoint& aPosition ) const;
342 
349  void ClearAnnotation( SCH_SHEET_PATH* aSheetPath );
350 
361 
367  void GetHierarchicalItems( std::vector<SCH_ITEM*>* aItems ) const;
368 
373  void GetSheets( std::vector<SCH_ITEM*>* aItems ) const;
374 
385  SCH_LINE* GetLine( const wxPoint& aPosition, int aAccuracy = 0, int aLayer = LAYER_NOTES,
386  SCH_LINE_TEST_T aSearchType = ENTIRE_LENGTH_T ) const;
387 
388  SCH_LINE* GetWire( const wxPoint& aPosition, int aAccuracy = 0,
389  SCH_LINE_TEST_T aSearchType = ENTIRE_LENGTH_T ) const
390  {
391  return GetLine( aPosition, aAccuracy, LAYER_WIRE, aSearchType );
392  }
393 
394  SCH_LINE* GetBus( const wxPoint& aPosition, int aAccuracy = 0,
395  SCH_LINE_TEST_T aSearchType = ENTIRE_LENGTH_T ) const
396  {
397  return GetLine( aPosition, aAccuracy, LAYER_BUS, aSearchType );
398  }
399 
408  SCH_TEXT* GetLabel( const wxPoint& aPosition, int aAccuracy = 0 ) const;
409 
416  std::map<wxString, LIB_PART*>& GetLibSymbols() { return m_libSymbols; }
417  const std::map<wxString, LIB_PART*>& GetLibSymbols() const { return m_libSymbols; }
418 
428  void AddLibSymbol( LIB_PART* aLibSymbol );
429 
433  void AddBusAlias( std::shared_ptr<BUS_ALIAS> aAlias );
434 
439  {
440  m_aliases.clear();
441  }
442 
446  std::unordered_set< std::shared_ptr<BUS_ALIAS> > GetBusAliases() const
447  {
448  return m_aliases;
449  }
450 
451  const std::vector<SYMBOL_INSTANCE_REFERENCE>& GetSymbolInstances() const
452  {
453  return m_symbolInstances;
454  }
455 
456  const std::vector<SCH_SHEET_INSTANCE>& GetSheetInstances() const
457  {
458  return m_sheetInstances;
459  }
460 
461  const KIID& GetUuid() const { return m_uuid; }
462 
463  void AssignNewUuid() { m_uuid = KIID(); }
464 
465 #if defined(DEBUG)
466  void Show( int nestLevel, std::ostream& os ) const override;
467 #endif
468 
474 
475 private:
476  friend SCH_EDIT_FRAME; // Only to populate m_symbolInstances.
477  friend SCH_SEXPR_PARSER; // Only to load instance information from schematic file.
478  friend SCH_SEXPR_PLUGIN; // Only to save the loaded instance information to schematic file.
479 
480  void clearLibSymbols();
481 
482  wxString m_fileName; // File used to load the screen.
484  int m_refCount; // Number of sheets referencing this screen.
485  // Delete when it goes to zero.
493  std::vector<SCH_SHEET_PATH> m_clientSheetPathList;
494 
495 
496  PAGE_INFO m_paper; // The size of the paper to print or plot on.
498  wxPoint m_aux_origin; // Origin used for drill & place files by Pcbnew.
500 
501  int m_modification_sync; // Inequality with PART_LIBS::GetModificationHash()
502  // will trigger ResolveAll().
503 
504  bool m_zoomInitialized; // Set to true once the zoom value is initialized with
505  // `InitZoom()`.
506 
508  std::unordered_set< std::shared_ptr< BUS_ALIAS > > m_aliases;
509 
511  std::map<wxString, LIB_PART*> m_libSymbols;
512 
527  std::vector<SYMBOL_INSTANCE_REFERENCE> m_symbolInstances;
528  std::vector<SCH_SHEET_INSTANCE> m_sheetInstances;
529 
537 };
538 
539 
550 {
551 public:
552  SCH_SCREENS( SCH_SHEET* aSheet );
553  SCH_SCREENS( SCH_SHEET& aSheet ) : SCH_SCREENS( &aSheet ) {}
554  ~SCH_SCREENS();
555  size_t GetCount() const { return m_screens.size(); }
556  SCH_SCREEN* GetFirst();
557  SCH_SCREEN* GetNext();
558  SCH_SCREEN* GetScreen( unsigned int aIndex ) const;
559  SCH_SHEET* GetSheet( unsigned int aIndex ) const;
560 
569  void ClearAnnotationOfNewSheetPaths( SCH_SHEET_LIST& aInitialSheetPathList );
570 
581 
588  void DeleteAllMarkers( enum MARKER_BASE::TYPEMARKER aMarkerType, bool aIncludeExclusions );
589 
593  void DeleteMarkers( enum MARKER_BASE::TYPEMARKER aMarkerTyp, int aErrorCode,
594  bool aIncludeExclusions = true );
595 
599  void DeleteMarker( SCH_MARKER* aMarker );
600 
612  void UpdateSymbolLinks( REPORTER* aReporter = nullptr );
613 
625 
632  size_t GetLibNicknames( wxArrayString& aLibNicknames );
633 
641  int ChangeSymbolLibNickname( const wxString& aFrom, const wxString& aTo );
642 
652  bool HasSchematic( const wxString& aSchematicFileName );
653 
658 
670  bool CanCauseCaseSensitivityIssue( const wxString& aSchematicFileName ) const;
671 
672 private:
673  void addScreenToList( SCH_SCREEN* aScreen, SCH_SHEET* aSheet );
674  void buildScreenList( SCH_SHEET* aSheet);
675 
676  std::vector< SCH_SCREEN* > m_screens;
677  std::vector< SCH_SHEET* > m_sheets;
678  unsigned int m_index;
679 };
680 
681 #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:755
const wxString & GetFileName() const
Definition: sch_screen.h:133
bool Remove(SCH_ITEM *aItem)
Remove aItem from the schematic associated with this screen.
Definition: sch_screen.cpp:244
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:527
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:941
bool IsTerminalPoint(const wxPoint &aPosition, int aLayer) const
Test if aPosition is a connection point on aLayer.
Definition: sch_screen.cpp:457
void clearLibSymbols()
Definition: sch_screen.cpp:97
const std::vector< SYMBOL_INSTANCE_REFERENCE > & GetSymbolInstances() const
Definition: sch_screen.h:451
double m_LastZoomLevel
last value for the zoom level, useful in Eeschema when changing the current displayed sheet to reuse ...
Definition: sch_screen.h:473
int GetFileFormatVersionAtLoad() const
Definition: sch_screen.h:126
void addScreenToList(SCH_SCREEN *aScreen, SCH_SHEET *aSheet)
int m_refCount
Definition: sch_screen.h:484
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:957
const TITLE_BLOCK & GetTitleBlock() const
Definition: sch_screen.h:138
void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: sch_screen.h:129
Schematic editor (Eeschema) main window.
void AssignNewUuid()
Definition: sch_screen.h:463
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:913
wxPoint m_aux_origin
Definition: sch_screen.h:498
wxString m_fileName
Definition: sch_screen.h:482
void SetAuxOrigin(const wxPoint &aPosition)
Definition: sch_screen.h:136
LIB_PIN * GetPin(const wxPoint &aPosition, SCH_COMPONENT **aSymbol=NULL, bool aEndPointOnly=false) const
Test the screen for a component pin item at aPosition.
Definition: sch_screen.cpp:817
friend SCH_EDIT_FRAME
Definition: sch_screen.h:476
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:64
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:501
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:128
std::map< wxString, LIB_PART * > & GetLibSymbols()
Fetch a list of unique LIB_PART object pointers required to properly render each SCH_COMPONENT in thi...
Definition: sch_screen.h:416
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:553
void Clear(bool aFree=true)
Delete all draw items and clears the project settings.
Definition: sch_screen.cpp:199
std::vector< SCH_SHEET_PATH > m_clientSheetPathList
The list of sheet paths sharing this screen.
Definition: sch_screen.h:493
void Place(SCH_EDIT_FRAME *frame, wxDC *DC)
Definition: sch_screen.h:201
SCH_SCREEN(EDA_ITEM *aParent=nullptr)
Definition: sch_screen.cpp:64
unsigned int m_index
Definition: sch_screen.h:678
Definition: kiid.h:44
bool HasItems(KICAD_T aItemType) const
Definition: sch_screen.cpp:120
void UpdateLocalLibSymbolLinks()
Initialize the LIB_PART reference for each SCH_COMPONENT found in this schematic with the local proje...
Definition: sch_screen.cpp:677
std::vector< SCH_SHEET * > m_sheets
Definition: sch_screen.h:677
TITLE_BLOCK m_titles
Definition: sch_screen.h:497
int m_fileFormatVersionAtLoad
Definition: sch_screen.h:483
PAGE_INFO m_paper
Definition: sch_screen.h:496
#define NULL
bool HasSheets() const
Definition: sch_screen.h:113
SCH_LINE * GetBus(const wxPoint &aPosition, int aAccuracy=0, SCH_LINE_TEST_T aSearchType=ENTIRE_LENGTH_T) const
Definition: sch_screen.h:394
static bool ClassOf(const EDA_ITEM *aItem)
Definition: sch_screen.h:115
void DeleteItem(SCH_ITEM *aItem)
Removes aItem from the linked list and deletes the object.
Definition: sch_screen.cpp:282
std::vector< SCH_SHEET_INSTANCE > m_sheetInstances
Definition: sch_screen.h:528
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:70
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:869
const std::vector< SCH_SHEET_INSTANCE > & GetSheetInstances() const
Definition: sch_screen.h:456
EE_RTREE m_rtree
Definition: sch_screen.h:499
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:313
Define a library symbol object.
Definition: lib_symbol.h:93
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.
size_t GetCount() const
Definition: sch_screen.h:555
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:104
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:125
void DeleteMarker(SCH_MARKER *aMarker)
Delete a specific marker.
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
Definition: sch_screen.h:140
void ClearBusAliases()
Remove all bus alias definitions.
Definition: sch_screen.h:438
void FreeDrawList()
Free all the items from the schematic associated with the screen.
Definition: sch_screen.cpp:218
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:461
size_t CountConnectedItems(const wxPoint &aPos, bool aTestJunctions) const
Definition: sch_screen.cpp:887
void buildScreenList(SCH_SHEET *aSheet)
void DecRefCount()
Definition: sch_screen.cpp:112
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:446
void UpdateSymbolLinks(REPORTER *aReporter=nullptr)
Initialize the LIB_PART reference for each SCH_COMPONENT found in this schematic from the project SYM...
Definition: sch_screen.cpp:522
Board layer functions and definitions.
void Print(const RENDER_SETTINGS *aSettings)
Print all the items in the screen to aDC.
Definition: sch_screen.cpp:714
void AddLibSymbol(LIB_PART *aLibSymbol)
Add aLibSymbol to the the library symbol map.
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:504
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:976
std::vector< SCH_SCREEN * > m_screens
Definition: sch_screen.h:676
void Append(SCH_ITEM *aItem)
Definition: sch_screen.cpp:128
SCH_LINE * GetWire(const wxPoint &aPosition, int aAccuracy=0, SCH_LINE_TEST_T aSearchType=ENTIRE_LENGTH_T) const
Definition: sch_screen.h:388
SCHEMATIC * Schematic() const
Definition: sch_screen.cpp:88
KIID m_uuid
A unique identifier for each schematic file.
Definition: sch_screen.h:536
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:508
EE_RTREE & Items()
Definition: sch_screen.h:103
SCH_SHEET * GetSheet(unsigned int aIndex) const
Schematic symbol object.
Definition: sch_symbol.h:78
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:150
friend SCH_SEXPR_PLUGIN
Definition: sch_screen.h:478
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:374
const std::map< wxString, LIB_PART * > & GetLibSymbols() const
Definition: sch_screen.h:417
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 components in aSheetPath on the screen.
Definition: sch_screen.cpp:901
int ReplaceDuplicateTimeStamps()
Test all sheet and component objects in the schematic for duplicate time stamps and replaces them as ...
std::vector< SCH_SHEET_PATH > & GetClientSheetPaths()
Return the number of times this screen is used.
Definition: sch_screen.h:159
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:810
void Update(SCH_ITEM *aItem)
Update aItem's bounding box in the tree.
Definition: sch_screen.cpp:237
void SetFileName(const wxString &aFileName)
Definition: sch_screen.h:131
void ClearAnnotationOfNewSheetPaths(SCH_SHEET_LIST &aInitialSheetPathList)
Clear the annotation for the components inside new sheetpaths when a complex hierarchy is modified an...
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
BASE_SCREEN class implementation.
void UpdateSymbolLinks(REPORTER *aReporter=nullptr)
Initialize the LIB_PART reference for each SCH_COMPONENT found in the full schematic.
LIB_ID LibId
Definition: sch_screen.h:83
const wxPoint & GetAuxOrigin() const
Definition: sch_screen.h:135
friend SCH_SEXPR_PARSER
Definition: sch_screen.h:477
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:87
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:197
void GetHierarchicalItems(std::vector< SCH_ITEM * > *aItems) const
Add all schematic sheet and component objects in the screen to aItems.
Definition: sch_screen.cpp:929
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
Definition: sch_screen.h:549
void SwapSymbolLinks(const SCH_COMPONENT *aOriginalSymbol, const SCH_COMPONENT *aNewSymbol)
Definition: sch_screen.cpp:703
void IncRefCount()
Definition: sch_screen.cpp:106
int GetRefCount() const
Definition: sch_screen.h:144
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:163
bool CheckIfOnDrawList(const SCH_ITEM *aItem) const
Definition: sch_screen.cpp:307
virtual wxString GetClass() const override
Return the class name.
Definition: sch_screen.h:120
std::map< wxString, LIB_PART * > m_libSymbols
Library symbols required for this schematic.
Definition: sch_screen.h:511
bool IsEmpty() const
Definition: sch_screen.h:106
std::set< SCH_ITEM * > MarkConnections(SCH_LINE *aSegment)
Return all wires and junctions connected to aSegment which are not connected any component pin.
Definition: sch_screen.cpp:329