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 <kiway_holder.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> // COMPONENT_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 
56 class LIB_PART;
57 class LIB_PIN;
58 class SCH_COMPONENT;
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 private:
96 
97  wxString m_fileName; // File used to load the screen.
99  int m_refCount; // Number of sheets referencing this screen.
100  // Delete when it goes to zero.
108  std::vector<SCH_SHEET_PATH> m_clientSheetPathList;
109 
110 
111  PAGE_INFO m_paper; // The size of the paper to print or plot on
113  wxPoint m_aux_origin; // Origin used for drill & place files by PCBNew
115 
116  int m_modification_sync; // inequality with PART_LIBS::GetModificationHash()
117  // will trigger ResolveAll().
118 
119  bool m_zoomInitialized; // Set to true once the zoom value is initialized with
120  // `InitZoom()`.
121 
123  std::unordered_set< std::shared_ptr< BUS_ALIAS > > m_aliases;
124 
126  std::map<wxString, LIB_PART*> m_libSymbols;
127 
142  std::vector<SYMBOL_INSTANCE_REFERENCE> m_symbolInstances;
143  std::vector<SCH_SHEET_INSTANCE> m_sheetInstances;
144 
145  friend SCH_EDIT_FRAME; // Only to populate m_symbolInstances.
146  friend SCH_SEXPR_PARSER; // Only to load instance information from schematic file.
147  friend SCH_SEXPR_PLUGIN; // Only to save the loaded instance information to schematic file.
148 
149  void clearLibSymbols();
150 
151 public:
152 
156  SCH_SCREEN( EDA_ITEM* aParent = nullptr );
157 
158  ~SCH_SCREEN();
159 
160  SCHEMATIC* Schematic() const;
161 
162  EE_RTREE& Items() { return m_rtree; }
163  const EE_RTREE& Items() const { return m_rtree; }
164 
165  bool IsEmpty()
166  {
167  return m_rtree.empty();
168  }
169 
170  bool HasItems( KICAD_T aItemType ) const;
171 
172  bool HasSheets() const { return HasItems( SCH_SHEET_T ); }
173 
174  static inline bool ClassOf( const EDA_ITEM* aItem )
175  {
176  return aItem && SCH_SCREEN_T == aItem->Type();
177  }
178 
179  virtual wxString GetClass() const override
180  {
181  return wxT( "SCH_SCREEN" );
182  }
183 
184  void SetFileFormatVersionAtLoad( int aVersion ) { m_fileFormatVersionAtLoad = aVersion; }
186 
187  const PAGE_INFO& GetPageSettings() const { return m_paper; }
188  void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
189 
190  void SetFileName( const wxString& aFileName ) { m_fileName = aFileName; }
191 
192  const wxString& GetFileName() const { return m_fileName; }
193 
194  const wxPoint& GetAuxOrigin() const { return m_aux_origin; }
195  void SetAuxOrigin( const wxPoint& aPosition ) { m_aux_origin = aPosition; }
196 
197  const TITLE_BLOCK& GetTitleBlock() const { return m_titles; }
198 
199  void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
200 
201  void DecRefCount();
202  void IncRefCount();
203  int GetRefCount() const { return m_refCount; }
204 
212  std::vector<SCH_SHEET_PATH>& GetClientSheetPaths()
213  {
214  return m_clientSheetPathList;
215  }
216 
217  void Append( SCH_ITEM* aItem );
218 
229  void Append( SCH_SCREEN* aScreen );
230 
234  void Clear( bool aFree = true );
235 
241  void FreeDrawList();
242 
251  SCH_ITEM* GetItem( const wxPoint& aPosition, int aAccuracy = 0,
252  KICAD_T aType = SCH_LOCATE_ANY_T );
253 
254  void Place( SCH_EDIT_FRAME* frame, wxDC* DC ) { };
255 
271  void UpdateSymbolLinks( REPORTER* aReporter = nullptr );
272 
278 
279  void SwapSymbolLinks( const SCH_COMPONENT* aOriginalSymbol, const SCH_COMPONENT* aNewSymbol );
280 
287  void Print( const RENDER_SETTINGS* aSettings );
288 
297  void Plot( PLOTTER* aPlotter );
298 
306  bool Remove( SCH_ITEM* aItem );
307 
313  void Update( SCH_ITEM* aItem );
314 
323  void DeleteItem( SCH_ITEM* aItem );
324 
325  bool CheckIfOnDrawList( SCH_ITEM* st );
326 
332  void TestDanglingEnds( const SCH_SHEET_PATH* aPath = nullptr,
333  std::function<void( SCH_ITEM* )>* aChangedHandler = nullptr );
334 
341  std::set<SCH_ITEM*> MarkConnections( SCH_LINE* aSegment );
342 
346  void ClearDrawingState();
347 
348  size_t CountConnectedItems( const wxPoint& aPos, bool aTestJunctions );
349 
365  bool IsJunctionNeeded( const wxPoint& aPosition, bool aNew = false );
366 
375  bool IsTerminalPoint( const wxPoint& aPosition, int aLayer );
376 
386  LIB_PIN* GetPin( const wxPoint& aPosition, SCH_COMPONENT** aSymbol = NULL,
387  bool aEndPointOnly = false );
388 
395  SCH_SHEET_PIN* GetSheetPin( const wxPoint& aPosition );
396 
403  void ClearAnnotation( SCH_SHEET_PATH* aSheetPath );
404 
415 
421  void GetHierarchicalItems( std::vector<SCH_ITEM*>* aItems );
422 
428  void GetSheets( std::vector<SCH_ITEM*>* aItems );
429 
440  SCH_LINE* GetLine( const wxPoint& aPosition, int aAccuracy = 0, int aLayer = LAYER_NOTES,
441  SCH_LINE_TEST_T aSearchType = ENTIRE_LENGTH_T );
442 
443  SCH_LINE* GetWire( const wxPoint& aPosition, int aAccuracy = 0,
444  SCH_LINE_TEST_T aSearchType = ENTIRE_LENGTH_T )
445  {
446  return GetLine( aPosition, aAccuracy, LAYER_WIRE, aSearchType );
447  }
448 
449  SCH_LINE* GetBus( const wxPoint& aPosition, int aAccuracy = 0,
450  SCH_LINE_TEST_T aSearchType = ENTIRE_LENGTH_T )
451  {
452  return GetLine( aPosition, aAccuracy, LAYER_BUS, aSearchType );
453  }
454 
463  SCH_TEXT* GetLabel( const wxPoint& aPosition, int aAccuracy = 0 );
464 
471  std::map<wxString, LIB_PART*>& GetLibSymbols() { return m_libSymbols; }
472 
482  void AddLibSymbol( LIB_PART* aLibSymbol );
483 
487  void AddBusAlias( std::shared_ptr<BUS_ALIAS> aAlias );
488 
493  {
494  m_aliases.clear();
495  }
496 
500  std::unordered_set< std::shared_ptr<BUS_ALIAS> > GetBusAliases()
501  {
502  return m_aliases;
503  }
504 
505  const std::vector<SYMBOL_INSTANCE_REFERENCE>& GetSymbolInstances() const
506  {
507  return m_symbolInstances;
508  }
509 
510  const std::vector<SCH_SHEET_INSTANCE>& GetSheetInstances() const
511  {
512  return m_sheetInstances;
513  }
514 
515 #if defined(DEBUG)
516  void Show( int nestLevel, std::ostream& os ) const override;
517 #endif
518 
524 };
525 
526 
537 {
538 private:
539  std::vector< SCH_SCREEN* > m_screens;
540  std::vector< SCH_SHEET* > m_sheets;
541  unsigned int m_index;
542 
543 public:
544  SCH_SCREENS( SCH_SHEET* aSheet );
545  SCH_SCREENS( SCH_SHEET& aSheet ) : SCH_SCREENS( &aSheet ) {}
546  ~SCH_SCREENS();
547  size_t GetCount() const { return m_screens.size(); }
548  SCH_SCREEN* GetFirst();
549  SCH_SCREEN* GetNext();
550  SCH_SCREEN* GetScreen( unsigned int aIndex ) const;
551  SCH_SHEET* GetSheet( unsigned int aIndex ) const;
552 
561  void ClearAnnotationOfNewSheetPaths( SCH_SHEET_LIST& aInitialSheetPathList );
562 
571 
577  void DeleteAllMarkers( enum MARKER_BASE::TYPEMARKER aMarkerType, bool aIncludeExclusions );
578 
582  void DeleteMarkers( enum MARKER_BASE::TYPEMARKER aMarkerTyp, int aErrorCode,
583  bool aIncludeExclusions = true );
584 
588  void DeleteMarker( SCH_MARKER* aMarker );
589 
601  void UpdateSymbolLinks( REPORTER* aReporter = nullptr );
602 
614 
621  size_t GetLibNicknames( wxArrayString& aLibNicknames );
622 
630  int ChangeSymbolLibNickname( const wxString& aFrom, const wxString& aTo );
631 
641  bool HasSchematic( const wxString& aSchematicFileName );
642 
647 
659  bool CanCauseCaseSensitivityIssue( const wxString& aSchematicFileName ) const;
660 
661 private:
662  void addScreenToList( SCH_SCREEN* aScreen, SCH_SHEET* aSheet );
663  void buildScreenList( SCH_SHEET* aSheet);
664 };
665 
666 #endif /* SCREEN_H */
bool empty() const
Definition: sch_rtree.h:166
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
const wxString & GetFileName() const
Definition: sch_screen.h:192
bool Remove(SCH_ITEM *aItem)
Remove aItem from the schematic associated with this screen.
Definition: sch_screen.cpp:243
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:142
Holds all the data relating to one schematic A schematic may consist of one or more sheets (and one r...
Definition: schematic.h:58
bool IsJunctionNeeded(const wxPoint &aPosition, bool aNew=false)
Test if a junction is required for the items at aPosition on the screen.
Definition: sch_screen.cpp:373
void clearLibSymbols()
Definition: sch_screen.cpp:96
const std::vector< SYMBOL_INSTANCE_REFERENCE > & GetSymbolInstances() const
Definition: sch_screen.h:505
double m_LastZoomLevel
last value for the zoom level, usefull in Eeschema when changing the current displayed sheet to reuse...
Definition: sch_screen.h:523
bool IsEmpty()
Definition: sch_screen.h:165
int GetFileFormatVersionAtLoad() const
Definition: sch_screen.h:185
void addScreenToList(SCH_SCREEN *aScreen, SCH_SHEET *aSheet)
int m_refCount
Definition: sch_screen.h:99
int ChangeSymbolLibNickname(const wxString &aFrom, const wxString &aTo)
Change all of the symbol library nicknames.
void GetSheets(std::vector< SCH_ITEM * > *aItems)
Similar to Items().OfType( SCH_SHEET_T ), but return the sheets in a deterministic order (L-R,...
Definition: sch_screen.cpp:979
const TITLE_BLOCK & GetTitleBlock() const
Definition: sch_screen.h:197
void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: sch_screen.h:188
Schematic editor (Eeschema) main window.
EE_RTREE - Implements an R-tree for fast spatial and type indexing of schematic items.
Definition: sch_rtree.h:41
void EnsureAlternateReferencesExist()
For screens shared by many sheetpaths (complex hierarchies): to be able to clear or modify any refere...
Definition: sch_screen.cpp:951
wxPoint m_aux_origin
Definition: sch_screen.h:113
wxString m_fileName
Definition: sch_screen.h:97
void SetAuxOrigin(const wxPoint &aPosition)
Definition: sch_screen.h:195
friend SCH_EDIT_FRAME
Definition: sch_screen.h:145
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:116
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:187
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:471
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:545
void Clear(bool aFree=true)
Delete all draw items and clears the project settings.
Definition: sch_screen.cpp:198
std::vector< SCH_SHEET_PATH > m_clientSheetPathList
The list of sheet paths sharing this screen.
Definition: sch_screen.h:108
void Place(SCH_EDIT_FRAME *frame, wxDC *DC)
Definition: sch_screen.h:254
SCH_LINE * GetLine(const wxPoint &aPosition, int aAccuracy=0, int aLayer=LAYER_NOTES, SCH_LINE_TEST_T aSearchType=ENTIRE_LENGTH_T)
Return a line item located at aPosition.
SCH_SCREEN(EDA_ITEM *aParent=nullptr)
Constructor.
Definition: sch_screen.cpp:63
unsigned int m_index
Definition: sch_screen.h:541
bool HasItems(KICAD_T aItemType) const
Definition: sch_screen.cpp:119
void UpdateLocalLibSymbolLinks()
Initialize the LIB_PART reference for each SCH_COMPONENT found in this schematic with the local proje...
Definition: sch_screen.cpp:715
std::vector< SCH_SHEET * > m_sheets
Definition: sch_screen.h:540
TITLE_BLOCK m_titles
Definition: sch_screen.h:112
int m_fileFormatVersionAtLoad
Definition: sch_screen.h:98
PAGE_INFO m_paper
Definition: sch_screen.h:111
#define NULL
bool HasSheets() const
Definition: sch_screen.h:172
static bool ClassOf(const EDA_ITEM *aItem)
Definition: sch_screen.h:174
void DeleteItem(SCH_ITEM *aItem)
Removes aItem from the linked list and deletes the object.
Definition: sch_screen.cpp:281
std::vector< SCH_SHEET_INSTANCE > m_sheetInstances
Definition: sch_screen.h:143
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
const std::vector< SCH_SHEET_INSTANCE > & GetSheetInstances() const
Definition: sch_screen.h:510
EE_RTREE m_rtree
Definition: sch_screen.h:114
void DeleteAllMarkers(enum MARKER_BASE::TYPEMARKER aMarkerType, bool aIncludeExclusions)
Delete all electronic rules check markers of aMarkerType from all the screens in the list.
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:547
void GetHierarchicalItems(std::vector< SCH_ITEM * > *aItems)
Add all schematic sheet and component objects in the screen to aItems.
Definition: sch_screen.cpp:967
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Definition: sch_sheet.h:85
bool HasNoFullyDefinedLibIds()
Test all of the schematic symbols to see if all LIB_ID objects library nickname is not set.
SCH_LINE * GetWire(const wxPoint &aPosition, int aAccuracy=0, SCH_LINE_TEST_T aSearchType=ENTIRE_LENGTH_T)
Definition: sch_screen.h:443
Object to parser s-expression symbol library and schematic file formats.
const EE_RTREE & Items() const
Definition: sch_screen.h:163
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
void TestDanglingEnds(const SCH_SHEET_PATH *aPath=nullptr, std::function< void(SCH_ITEM *)> *aChangedHandler=nullptr)
Test all of the connectable objects in the schematic for unused connection points.
Definition: sch_screen.cpp:995
void SetFileFormatVersionAtLoad(int aVersion)
Definition: sch_screen.h:184
void DeleteMarker(SCH_MARKER *aMarker)
Delete a specific marker.
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
Definition: sch_screen.h:199
void ClearBusAliases()
Removes all bus alias definitions.
Definition: sch_screen.h:492
size_t CountConnectedItems(const wxPoint &aPos, bool aTestJunctions)
Definition: sch_screen.cpp:925
void FreeDrawList()
Free all the items from the schematic associated with the screen.
Definition: sch_screen.cpp:217
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:219
void Plot(PLOTTER *aPlotter)
Plot all the schematic objects to aPlotter.
Definition: sch_screen.cpp:793
void buildScreenList(SCH_SHEET *aSheet)
void DecRefCount()
Definition: sch_screen.cpp:111
Base plotter engine class.
Definition: plotter.h:121
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:556
bool IsTerminalPoint(const wxPoint &aPosition, int aLayer)
Test if aPosition is a connection point on aLayer.
Definition: sch_screen.cpp:483
Board layer functions and definitions.
void Print(const RENDER_SETTINGS *aSettings)
Print all the items in the screen to aDC.
Definition: sch_screen.cpp:752
void AddLibSymbol(LIB_PART *aLibSymbol)
Add aLibSymbol to the the library symbol map.
SCH_TEXT * GetLabel(const wxPoint &aPosition, int aAccuracy=0)
Return a label item located at aPosition.
void AddBusAlias(std::shared_ptr< BUS_ALIAS > aAlias)
Adds 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:119
std::vector< SCH_SCREEN * > m_screens
Definition: sch_screen.h:539
void Append(SCH_ITEM *aItem)
Definition: sch_screen.cpp:127
SCHEMATIC * Schematic() const
Definition: sch_screen.cpp:87
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:123
EE_RTREE & Items()
Definition: sch_screen.h:162
SCH_SHEET * GetSheet(unsigned int aIndex) const
Schematic symbol object.
Definition: sch_symbol.h:79
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:149
friend SCH_SEXPR_PLUGIN
Definition: sch_screen.h:147
void ClearAnnotation(SCH_SHEET_PATH *aSheetPath)
Clear the annotation for the components in aSheetPath on the screen.
Definition: sch_screen.cpp:939
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()
Definition: sch_screen.h:212
SCH_ITEM * GetItem(const wxPoint &aPosition, int aAccuracy=0, KICAD_T aType=SCH_LOCATE_ANY_T)
Check aPosition within a distance of aAccuracy for items of type aFilter.
Definition: sch_screen.cpp:312
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:848
void Update(SCH_ITEM *aItem)
Updates aItem's bounding box in the tree.
Definition: sch_screen.cpp:236
void SetFileName(const wxString &aFileName)
Definition: sch_screen.h:190
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.
SCH_SHEET_PIN * GetSheetPin(const wxPoint &aPosition)
Test the screen if aPosition is a sheet label object.
Definition: sch_screen.cpp:907
bool CheckIfOnDrawList(SCH_ITEM *st)
Definition: sch_screen.cpp:306
LIB_ID LibId
Definition: sch_screen.h:82
const wxPoint & GetAuxOrigin() const
Definition: sch_screen.h:194
friend SCH_SEXPR_PARSER
Definition: sch_screen.h:146
size_t GetLibNicknames(wxArrayString &aLibNicknames)
Fetch all of the symbol library nickames 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:196
std::unordered_set< std::shared_ptr< BUS_ALIAS > > GetBusAliases()
Returns a list of bus aliases defined in this screen.
Definition: sch_screen.h:500
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
Definition: sch_screen.h:536
LIB_PIN * GetPin(const wxPoint &aPosition, SCH_COMPONENT **aSymbol=NULL, bool aEndPointOnly=false)
Test the screen for a component pin item at aPosition.
Definition: sch_screen.cpp:855
void SwapSymbolLinks(const SCH_COMPONENT *aOriginalSymbol, const SCH_COMPONENT *aNewSymbol)
Definition: sch_screen.cpp:741
void IncRefCount()
Definition: sch_screen.cpp:105
int GetRefCount() const
Definition: sch_screen.h:203
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:162
virtual wxString GetClass() const override
Return the class name.
Definition: sch_screen.h:179
std::map< wxString, LIB_PART * > m_libSymbols
Library symbols required for this schematic.
Definition: sch_screen.h:126
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:328
SCH_LINE * GetBus(const wxPoint &aPosition, int aAccuracy=0, SCH_LINE_TEST_T aSearchType=ENTIRE_LENGTH_T)
Definition: sch_screen.h:449