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, [email protected]
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  void SetFileReadOnly( bool aIsReadOnly ) { m_isReadOnly = aIsReadOnly; }
148  bool IsReadOnly() const { return m_isReadOnly; }
149 
150  void SetFileExists( bool aFileExists ) { m_fileExists = aFileExists; }
151  bool FileExists() const { return m_fileExists; }
152 
153  const wxPoint& GetAuxOrigin() const { return m_aux_origin; }
154  void SetAuxOrigin( const wxPoint& aPosition ) { m_aux_origin = aPosition; }
155 
156  const TITLE_BLOCK& GetTitleBlock() const { return m_titles; }
157 
158  void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
159 
160  void DecRefCount();
161  void IncRefCount();
162  int GetRefCount() const { return m_refCount; }
163 
164  void SetConnectivityDirty();
165 
179  std::vector<SCH_SHEET_PATH>& GetClientSheetPaths()
180  {
181  return m_clientSheetPathList;
182  }
183 
184  void Append( SCH_ITEM* aItem );
185 
196  void Append( SCH_SCREEN* aScreen );
197 
201  void Clear( bool aFree = true );
202 
208  void FreeDrawList();
209 
218  SCH_ITEM* GetItem( const wxPoint& aPosition, int aAccuracy = 0,
219  KICAD_T aType = SCH_LOCATE_ANY_T ) const;
220 
236  void UpdateSymbolLinks( REPORTER* aReporter = nullptr );
237 
243 
250  void Print( const RENDER_SETTINGS* aSettings );
251 
260  void Plot( PLOTTER* aPlotter ) const;
261 
269  bool Remove( SCH_ITEM* aItem );
270 
276  void Update( SCH_ITEM* aItem );
277 
286  void DeleteItem( SCH_ITEM* aItem );
287 
288  bool CheckIfOnDrawList( const SCH_ITEM* aItem ) const;
289 
296  void TestDanglingEnds( const SCH_SHEET_PATH* aPath = nullptr,
297  std::function<void( SCH_ITEM* )>* aChangedHandler = nullptr ) const;
298 
305  std::set<SCH_ITEM*> MarkConnections( SCH_LINE* aSegment );
306 
310  void ClearDrawingState();
311 
312  size_t CountConnectedItems( const wxPoint& aPos, bool aTestJunctions ) const;
313 
328  bool IsJunction( const wxPoint& aPosition ) const;
329 
334  bool IsExplicitJunction( const wxPoint& aPosition ) const;
335 
340  bool IsExplicitJunctionNeeded( const wxPoint& aPosition ) const;
341 
346  bool IsExplicitJunctionAllowed( const wxPoint& aPosition ) const;
347 
356  bool IsTerminalPoint( const wxPoint& aPosition, int aLayer ) const;
357 
367  LIB_PIN* GetPin( const wxPoint& aPosition, SCH_SYMBOL** aSymbol = nullptr,
368  bool aEndPointOnly = false ) const;
369 
376  SCH_SHEET_PIN* GetSheetPin( const wxPoint& aPosition ) const;
377 
384  void ClearAnnotation( SCH_SHEET_PATH* aSheetPath );
385 
396 
402  void GetHierarchicalItems( std::vector<SCH_ITEM*>* aItems ) const;
403 
408  void GetSheets( std::vector<SCH_ITEM*>* aItems ) const;
409 
420  SCH_LINE* GetLine( const wxPoint& aPosition, int aAccuracy = 0, int aLayer = LAYER_NOTES,
421  SCH_LINE_TEST_T aSearchType = ENTIRE_LENGTH_T ) const;
422 
423  SCH_LINE* GetWire( const wxPoint& aPosition, int aAccuracy = 0,
424  SCH_LINE_TEST_T aSearchType = ENTIRE_LENGTH_T ) const
425  {
426  return GetLine( aPosition, aAccuracy, LAYER_WIRE, aSearchType );
427  }
428 
429  SCH_LINE* GetBus( const wxPoint& aPosition, int aAccuracy = 0,
430  SCH_LINE_TEST_T aSearchType = ENTIRE_LENGTH_T ) const
431  {
432  return GetLine( aPosition, aAccuracy, LAYER_BUS, aSearchType );
433  }
434 
443  SCH_TEXT* GetLabel( const wxPoint& aPosition, int aAccuracy = 0 ) const;
444 
451  std::map<wxString, LIB_SYMBOL*>& GetLibSymbols() { return m_libSymbols; }
452  const std::map<wxString, LIB_SYMBOL*>& GetLibSymbols() const { return m_libSymbols; }
453 
463  void AddLibSymbol( LIB_SYMBOL* aLibSymbol );
464 
468  void AddBusAlias( std::shared_ptr<BUS_ALIAS> aAlias );
469 
474  {
475  m_aliases.clear();
476  }
477 
481  std::unordered_set< std::shared_ptr<BUS_ALIAS> > GetBusAliases() const
482  {
483  return m_aliases;
484  }
485 
486  const std::vector<SYMBOL_INSTANCE_REFERENCE>& GetSymbolInstances() const
487  {
488  return m_symbolInstances;
489  }
490 
491  const std::vector<SCH_SHEET_INSTANCE>& GetSheetInstances() const
492  {
493  return m_sheetInstances;
494  }
495 
496  const KIID& GetUuid() const { return m_uuid; }
497 
498  void AssignNewUuid() { m_uuid = KIID(); }
499 
500 #if defined(DEBUG)
501  void Show( int nestLevel, std::ostream& os ) const override;
502 #endif
503 
509 
510 private:
511  bool doIsJunction( const wxPoint& aPosition, bool aBreakCrossings,
512  bool* aHasExplicitJunctionDot, bool* aHasBusEntry ) const;
513 
514 private:
515  friend SCH_EDIT_FRAME; // Only to populate m_symbolInstances.
516  friend SCH_SEXPR_PARSER; // Only to load instance information from schematic file.
517  friend SCH_SEXPR_PLUGIN; // Only to save the loaded instance information to schematic file.
518 
519  void clearLibSymbols();
520 
521  wxString m_fileName; // File used to load the screen.
523  int m_refCount; // Number of sheets referencing this screen.
524  // Delete when it goes to zero.
532  std::vector<SCH_SHEET_PATH> m_clientSheetPathList;
533 
534 
535  PAGE_INFO m_paper; // The size of the paper to print or plot on.
537  wxPoint m_aux_origin; // Origin used for drill & place files by Pcbnew.
539 
540  int m_modification_sync; // Inequality with SYMBOL_LIBS::GetModificationHash()
541  // will trigger ResolveAll().
542 
543  bool m_zoomInitialized; // Set to true once the zoom value is initialized with
544  // `InitZoom()`.
545 
547 
550 
552  std::unordered_set< std::shared_ptr< BUS_ALIAS > > m_aliases;
553 
555  std::map<wxString, LIB_SYMBOL*> m_libSymbols;
556 
571  std::vector<SYMBOL_INSTANCE_REFERENCE> m_symbolInstances;
572  std::vector<SCH_SHEET_INSTANCE> m_sheetInstances;
573 
581 };
582 
583 
594 {
595 public:
596  SCH_SCREENS( SCH_SHEET* aSheet );
597  SCH_SCREENS( SCH_SHEET& aSheet ) : SCH_SCREENS( &aSheet ) {}
598  ~SCH_SCREENS();
599  size_t GetCount() const { return m_screens.size(); }
600  SCH_SCREEN* GetFirst();
601  SCH_SCREEN* GetNext();
602  SCH_SCREEN* GetScreen( unsigned int aIndex ) const;
603  SCH_SHEET* GetSheet( unsigned int aIndex ) const;
604 
613  void ClearAnnotationOfNewSheetPaths( SCH_SHEET_LIST& aInitialSheetPathList );
614 
625 
632  void DeleteAllMarkers( enum MARKER_BASE::TYPEMARKER aMarkerType, bool aIncludeExclusions );
633 
637  void DeleteMarkers( enum MARKER_BASE::TYPEMARKER aMarkerTyp, int aErrorCode,
638  bool aIncludeExclusions = true );
639 
643  void DeleteMarker( SCH_MARKER* aMarker );
644 
656  void UpdateSymbolLinks( REPORTER* aReporter = nullptr );
657 
658  void ClearEditFlags();
659 
671 
678  size_t GetLibNicknames( wxArrayString& aLibNicknames );
679 
687  int ChangeSymbolLibNickname( const wxString& aFrom, const wxString& aTo );
688 
698  bool HasSchematic( const wxString& aSchematicFileName );
699 
704 
716  bool CanCauseCaseSensitivityIssue( const wxString& aSchematicFileName ) const;
717 
718 private:
719  void addScreenToList( SCH_SCREEN* aScreen, SCH_SHEET* aSheet );
720  void buildScreenList( SCH_SHEET* aSheet);
721 
722  std::vector< SCH_SCREEN* > m_screens;
723  std::vector< SCH_SHEET* > m_sheets;
724  unsigned int m_index;
725 };
726 
727 #endif /* SCREEN_H */
bool empty() const
Definition: sch_rtree.h:177
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:838
const wxString & GetFileName() const
Definition: sch_screen.h:145
bool IsExplicitJunction(const wxPoint &aPosition) const
Indicates that a junction dot is necessary at the given location.
Definition: sch_screen.cpp:413
bool Remove(SCH_ITEM *aItem)
Remove aItem from the schematic associated with this screen.
Definition: sch_screen.cpp:273
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:571
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,...
bool IsTerminalPoint(const wxPoint &aPosition, int aLayer) const
Test if aPosition is a connection point on aLayer.
Definition: sch_screen.cpp:545
bool IsReadOnly() const
Definition: sch_screen.h:148
void clearLibSymbols()
Definition: sch_screen.cpp:101
const std::vector< SYMBOL_INSTANCE_REFERENCE > & GetSymbolInstances() const
Definition: sch_screen.h:486
double m_LastZoomLevel
last value for the zoom level, useful in Eeschema when changing the current displayed sheet to reuse ...
Definition: sch_screen.h:508
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:523
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.
void SetConnectivityDirty()
Definition: sch_screen.cpp:790
const std::map< wxString, LIB_SYMBOL * > & GetLibSymbols() const
Definition: sch_screen.h:452
const TITLE_BLOCK & GetTitleBlock() const
Definition: sch_screen.h:156
void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: sch_screen.h:133
Schematic editor (Eeschema) main window.
void AssignNewUuid()
Definition: sch_screen.h:498
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:996
void SetFileExists(bool aFileExists)
Definition: sch_screen.h:150
wxPoint m_aux_origin
Definition: sch_screen.h:537
wxString m_fileName
Definition: sch_screen.h:521
void SetAuxOrigin(const wxPoint &aPosition)
Definition: sch_screen.h:154
friend SCH_EDIT_FRAME
Definition: sch_screen.h:515
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:540
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:597
void Clear(bool aFree=true)
Delete all draw items and clears the project settings.
Definition: sch_screen.cpp:228
std::vector< SCH_SHEET_PATH > m_clientSheetPathList
The list of sheet paths sharing this screen.
Definition: sch_screen.h:532
bool m_fileExists
Definition: sch_screen.h:549
void SetFileReadOnly(bool aIsReadOnly)
Definition: sch_screen.h:147
SCH_SCREEN(EDA_ITEM *aParent=nullptr)
Definition: sch_screen.cpp:66
bool m_isReadOnly
Read only status of the screen file.
Definition: sch_screen.h:546
unsigned int m_index
Definition: sch_screen.h:724
Definition: kiid.h:44
bool HasItems(KICAD_T aItemType) const
Definition: sch_screen.cpp:132
void UpdateLocalLibSymbolLinks()
Initialize the LIB_SYMBOL reference for each SCH_SYMBOL found in this schematic with the local projec...
Definition: sch_screen.cpp:764
std::vector< SCH_SHEET * > m_sheets
Definition: sch_screen.h:723
TITLE_BLOCK m_titles
Definition: sch_screen.h:536
int m_fileFormatVersionAtLoad
Definition: sch_screen.h:522
PAGE_INFO m_paper
Definition: sch_screen.h:535
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:429
void DeleteItem(SCH_ITEM *aItem)
Removes aItem from the linked list and deletes the object.
Definition: sch_screen.cpp:311
std::vector< SCH_SHEET_INSTANCE > m_sheetInstances
Definition: sch_screen.h:572
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
bool FileExists() const
Definition: sch_screen.h:151
SCH_SHEET_PIN * GetSheetPin(const wxPoint &aPosition) const
Test the screen if aPosition is a sheet label object.
Definition: sch_screen.cpp:952
const std::vector< SCH_SHEET_INSTANCE > & GetSheetInstances() const
Definition: sch_screen.h:491
EE_RTREE m_rtree
Definition: sch_screen.h:538
void DeleteAllMarkers(enum MARKER_BASE::TYPEMARKER aMarkerType, bool aIncludeExclusions)
Delete all electronic rules check markers of aMarkerType from all the screens in the list.
bool IsJunction(const wxPoint &aPosition) const
Test if a junction is required for the items at aPosition on the screen.
Definition: sch_screen.cpp:403
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:342
void BuildClientSheetPathList()
built the list of sheet paths sharing a screen for each screen in use
bool doIsJunction(const wxPoint &aPosition, bool aBreakCrossings, bool *aHasExplicitJunctionDot, bool *aHasBusEntry) const
Definition: sch_screen.cpp:444
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:451
size_t GetCount() const
Definition: sch_screen.h:599
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:158
void ClearBusAliases()
Remove all bus alias definitions.
Definition: sch_screen.h:473
static bool ClassOf(const EDA_ITEM *aItem)
Definition: sch_screen.cpp:140
void FreeDrawList()
Free all the items from the schematic associated with the screen.
Definition: sch_screen.cpp:247
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
bool IsExplicitJunctionNeeded(const wxPoint &aPosition) const
Indicates that a junction dot is necessary at the given location, and does not yet exist.
Definition: sch_screen.cpp:423
const KIID & GetUuid() const
Definition: sch_screen.h:496
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:970
void buildScreenList(SCH_SHEET *aSheet)
void DecRefCount()
Definition: sch_screen.cpp:124
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:481
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:610
Schematic symbol object.
Definition: sch_symbol.h:78
bool IsExplicitJunctionAllowed(const wxPoint &aPosition) const
Indicates that a juction dot may be placed at the given location.
Definition: sch_screen.cpp:433
void Print(const RENDER_SETTINGS *aSettings)
Print all the items in the screen to aDC.
Definition: sch_screen.cpp:797
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:543
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.
std::vector< SCH_SCREEN * > m_screens
Definition: sch_screen.h:722
void Append(SCH_ITEM *aItem)
Definition: sch_screen.cpp:146
SCH_LINE * GetWire(const wxPoint &aPosition, int aAccuracy=0, SCH_LINE_TEST_T aSearchType=ENTIRE_LENGTH_T) const
Definition: sch_screen.h:423
SCHEMATIC * Schematic() const
Definition: sch_screen.cpp:92
KIID m_uuid
A unique identifier for each schematic file.
Definition: sch_screen.h:580
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:552
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:99
friend SCH_SEXPR_PLUGIN
Definition: sch_screen.h:517
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:984
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:179
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:893
void Update(SCH_ITEM *aItem)
Update aItem's bounding box in the tree.
Definition: sch_screen.cpp:266
void SetFileName(const wxString &aFileName)
Set the file name for this screen to aFileName.
Definition: sch_screen.cpp:110
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:555
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:900
const wxPoint & GetAuxOrigin() const
Definition: sch_screen.h:153
friend SCH_SEXPR_PARSER
Definition: sch_screen.h:516
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:182
void GetHierarchicalItems(std::vector< SCH_ITEM * > *aItems) const
Add all schematic sheet and symbol objects in the screen to aItems.
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
Definition: sch_screen.h:593
void IncRefCount()
Definition: sch_screen.cpp:118
int GetRefCount() const
Definition: sch_screen.h:162
bool CheckIfOnDrawList(const SCH_ITEM *aItem) const
Definition: sch_screen.cpp:336
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:358