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-2022 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_text.h>
53#include <sch_sheet_path.h>
54
55class BUS_ALIAS;
56class EDA_ITEM;
57class LIB_SYMBOL;
58class LIB_PIN;
59class SCH_SYMBOL;
60class SCH_LINE;
61class SCH_LABEL_BASE;
62class PLOTTER;
63class REPORTER;
64class SCH_EDIT_FRAME;
65class SCH_SHEET_LIST;
68
70{
74};
75
76
78{
80 int Unit;
82
83 std::vector<std::pair<int, wxString>> Fields;
84
85 PICKED_SYMBOL() : Unit( 1 ), Convert( 1 )
86 {
87 }
88};
89
90class SCH_SCREEN : public BASE_SCREEN
91{
92public:
93 SCH_SCREEN( EDA_ITEM* aParent = nullptr );
94
96
97 SCHEMATIC* Schematic() const;
98
108 EE_RTREE& Items() { return m_rtree; }
109 const EE_RTREE& Items() const { return m_rtree; }
110
111 bool IsEmpty() const
112 {
113 return m_rtree.empty();
114 }
115
116 bool HasItems( KICAD_T aItemType ) const;
117
118 bool HasSheets() const { return HasItems( SCH_SHEET_T ); }
119
120 static bool ClassOf( const EDA_ITEM* aItem );
121
122 virtual wxString GetClass() const override
123 {
124 return wxT( "SCH_SCREEN" );
125 }
126
127 void SetFileFormatVersionAtLoad( int aVersion ) { m_fileFormatVersionAtLoad = aVersion; }
129
130 const PAGE_INFO& GetPageSettings() const { return m_paper; }
131 void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
132
141 void SetFileName( const wxString& aFileName );
142
143 const wxString& GetFileName() const { return m_fileName; }
144
145 void SetFileReadOnly( bool aIsReadOnly ) { m_isReadOnly = aIsReadOnly; }
146 bool IsReadOnly() const { return m_isReadOnly; }
147
148 void SetFileExists( bool aFileExists ) { m_fileExists = aFileExists; }
149 bool FileExists() const { return m_fileExists; }
150
151 const VECTOR2I& GetAuxOrigin() const { return m_aux_origin; }
152 void SetAuxOrigin( const VECTOR2I& aPosition ) { m_aux_origin = aPosition; }
153
154 const TITLE_BLOCK& GetTitleBlock() const { return m_titles; }
155
156 void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
157
158 void DecRefCount();
159 void IncRefCount();
160 int GetRefCount() const { return m_refCount; }
161
163
177 std::vector<SCH_SHEET_PATH>& GetClientSheetPaths()
178 {
180 }
181
182 void Append( SCH_ITEM* aItem );
183
194 void Append( SCH_SCREEN* aScreen );
195
199 void Clear( bool aFree = true );
200
206 void FreeDrawList();
207
216 SCH_ITEM* GetItem( const VECTOR2I& aPosition, int aAccuracy = 0,
217 KICAD_T aType = SCH_LOCATE_ANY_T ) const;
218
234 void UpdateSymbolLinks( REPORTER* aReporter = nullptr );
235
241
248 void Print( const RENDER_SETTINGS* aSettings );
249
258 void Plot( PLOTTER* aPlotter ) const;
259
267 bool Remove( SCH_ITEM* aItem );
268
274 void Update( SCH_ITEM* aItem );
275
284 void DeleteItem( SCH_ITEM* aItem );
285
286 bool CheckIfOnDrawList( const SCH_ITEM* aItem ) const;
287
294 void TestDanglingEnds( const SCH_SHEET_PATH* aPath = nullptr,
295 std::function<void( SCH_ITEM* )>* aChangedHandler = nullptr ) const;
296
303 std::set<SCH_ITEM*> MarkConnections( SCH_LINE* aSegment, bool aSecondPass );
304
308 void ClearDrawingState();
309
310 size_t CountConnectedItems( const VECTOR2I& aPos, bool aTestJunctions ) const;
311
326 bool IsJunction( const VECTOR2I& aPosition ) const;
327
332 bool IsExplicitJunction( const VECTOR2I& aPosition ) const;
333
338 bool IsExplicitJunctionNeeded( const VECTOR2I& aPosition ) const;
339
341 TEXT_SPIN_STYLE aDefaultOrientation,
342 const SCH_SHEET_PATH* aSheet ) const;
347 bool IsExplicitJunctionAllowed( const VECTOR2I& aPosition ) const;
348
357 bool IsTerminalPoint( const VECTOR2I& aPosition, int aLayer ) const;
358
368 LIB_PIN* GetPin( const VECTOR2I& aPosition, SCH_SYMBOL** aSymbol = nullptr,
369 bool aEndPointOnly = false ) const;
370
377 SCH_SHEET_PIN* GetSheetPin( const VECTOR2I& aPosition ) const;
378
387 void ClearAnnotation( SCH_SHEET_PATH* aSheetPath, bool aResetPrefix );
388
399
405 void GetHierarchicalItems( std::vector<SCH_ITEM*>* aItems ) const;
406
411 void GetSheets( std::vector<SCH_ITEM*>* aItems ) const;
412
423 SCH_LINE* GetLine( const VECTOR2I& aPosition, int aAccuracy = 0, int aLayer = LAYER_NOTES,
424 SCH_LINE_TEST_T aSearchType = ENTIRE_LENGTH_T ) const;
425
426 SCH_LINE* GetWire( const VECTOR2I& aPosition, int aAccuracy = 0,
427 SCH_LINE_TEST_T aSearchType = ENTIRE_LENGTH_T ) const
428 {
429 return GetLine( aPosition, aAccuracy, LAYER_WIRE, aSearchType );
430 }
431
432 SCH_LINE* GetBus( const VECTOR2I& aPosition, int aAccuracy = 0,
433 SCH_LINE_TEST_T aSearchType = ENTIRE_LENGTH_T ) const
434 {
435 return GetLine( aPosition, aAccuracy, LAYER_BUS, aSearchType );
436 }
437
445 SCH_LABEL_BASE* GetLabel( const VECTOR2I& aPosition, int aAccuracy = 0 ) const;
446
453 std::map<wxString, LIB_SYMBOL*>& GetLibSymbols() { return m_libSymbols; }
454 const std::map<wxString, LIB_SYMBOL*>& GetLibSymbols() const { return m_libSymbols; }
455
465 void AddLibSymbol( LIB_SYMBOL* aLibSymbol );
466
470 void AddBusAlias( std::shared_ptr<BUS_ALIAS> aAlias );
471
476 {
477 m_aliases.clear();
478 }
479
483 std::set< std::shared_ptr<BUS_ALIAS> > GetBusAliases() const
484 {
485 return m_aliases;
486 }
487
488 const std::vector<SYMBOL_INSTANCE_REFERENCE>& GetSymbolInstances() const
489 {
490 return m_symbolInstances;
491 }
492
493 const std::vector<SCH_SHEET_INSTANCE>& GetSheetInstances() const
494 {
495 return m_sheetInstances;
496 }
497
498 const KIID& GetUuid() const { return m_uuid; }
499
500 void AssignNewUuid() { m_uuid = KIID(); }
501
506
511
518
519#if defined(DEBUG)
520 void Show( int nestLevel, std::ostream& os ) const override;
521#endif
522
528
529private:
530 bool doIsJunction( const VECTOR2I& aPosition, bool aBreakCrossings,
531 bool* aHasExplicitJunctionDot, bool* aHasBusEntry ) const;
532
533private:
534 friend SCH_EDIT_FRAME; // Only to populate m_symbolInstances.
535 friend SCH_SEXPR_PARSER; // Only to load instance information from schematic file.
536 friend SCH_SEXPR_PLUGIN; // Only to save the loaded instance information to schematic file.
537
538 void clearLibSymbols();
539
540 wxString m_fileName; // File used to load the screen.
542 int m_refCount; // Number of sheets referencing this screen.
543 // Delete when it goes to zero.
551 std::vector<SCH_SHEET_PATH> m_clientSheetPathList;
552
553
554 PAGE_INFO m_paper; // The size of the paper to print or plot on.
556 VECTOR2I m_aux_origin; // Origin used for drill & place files by Pcbnew.
558
559 int m_modification_sync; // Inequality with SYMBOL_LIBS::GetModificationHash()
560 // will trigger ResolveAll().
561
562 bool m_zoomInitialized; // Set to true once the zoom value is initialized with
563 // `InitZoom()`.
564
566
569
571 std::set< std::shared_ptr< BUS_ALIAS > > m_aliases;
572
574 std::map<wxString, LIB_SYMBOL*> m_libSymbols;
575
590 std::vector<SYMBOL_INSTANCE_REFERENCE> m_symbolInstances;
591 std::vector<SCH_SHEET_INSTANCE> m_sheetInstances;
592
600};
601
602
613{
614public:
615 SCH_SCREENS( SCH_SHEET* aSheet );
616 SCH_SCREENS( SCH_SHEET& aSheet ) : SCH_SCREENS( &aSheet ) {}
617 ~SCH_SCREENS();
618 size_t GetCount() const { return m_screens.size(); }
621 SCH_SCREEN* GetScreen( unsigned int aIndex ) const;
622 SCH_SHEET* GetSheet( unsigned int aIndex ) const;
623
632 void ClearAnnotationOfNewSheetPaths( SCH_SHEET_LIST& aInitialSheetPathList );
633
644
651 void DeleteAllMarkers( enum MARKER_BASE::TYPEMARKER aMarkerType, bool aIncludeExclusions );
652
656 void DeleteMarkers( enum MARKER_BASE::TYPEMARKER aMarkerTyp, int aErrorCode,
657 bool aIncludeExclusions = true );
658
662 void DeleteMarker( SCH_MARKER* aMarker );
663
675 void UpdateSymbolLinks( REPORTER* aReporter = nullptr );
676
677 void ClearEditFlags();
678
690
697 size_t GetLibNicknames( wxArrayString& aLibNicknames );
698
706 int ChangeSymbolLibNickname( const wxString& aFrom, const wxString& aTo );
707
717 bool HasSchematic( const wxString& aSchematicFileName );
718
723
735 bool CanCauseCaseSensitivityIssue( const wxString& aSchematicFileName ) const;
736
741
742private:
743 void addScreenToList( SCH_SCREEN* aScreen, SCH_SHEET* aSheet );
744 void buildScreenList( SCH_SHEET* aSheet);
745
746 std::vector< SCH_SCREEN* > m_screens;
747 std::vector< SCH_SHEET* > m_sheets;
748 unsigned int m_index;
749};
750
751#endif /* SCREEN_H */
BASE_SCREEN class implementation.
Handles how to draw a screen (a board, a schematic ...)
Definition: base_screen.h:41
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:99
Implements an R-tree for fast spatial and type indexing of schematic items.
Definition: sch_rtree.h:40
bool empty() const
Definition: sch_rtree.h:176
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
Definition: kiid.h:47
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:49
Define a library symbol object.
Definition: lib_symbol.h:98
Describe the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:54
Base plotter engine class.
Definition: plotter.h:110
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:71
Holds all the data relating to one schematic.
Definition: schematic.h:60
Schematic editor (Eeschema) main window.
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:147
Segment description base class to describe items which have 2 end points (track, wire,...
Definition: sch_line.h:40
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
Definition: sch_screen.h:613
SCH_SCREEN * GetNext()
unsigned int m_index
Definition: sch_screen.h:748
std::vector< SCH_SHEET * > m_sheets
Definition: sch_screen.h:747
SCH_SCREEN * GetScreen(unsigned int aIndex) const
void UpdateSymbolLinks(REPORTER *aReporter=nullptr)
Initialize the LIB_SYMBOL reference for each SCH_SYMBOL found in the full schematic.
void DeleteMarker(SCH_MARKER *aMarker)
Delete a specific marker.
void buildScreenList(SCH_SHEET *aSheet)
void DeleteMarkers(enum MARKER_BASE::TYPEMARKER aMarkerTyp, int aErrorCode, bool aIncludeExclusions=true)
Delete all markers of a particular type and error code.
SCH_SCREEN * GetFirst()
int ChangeSymbolLibNickname(const wxString &aFrom, const wxString &aTo)
Change all of the symbol library nicknames.
SCH_SCREENS(SCH_SHEET *aSheet)
SCH_SCREENS(SCH_SHEET &aSheet)
Definition: sch_screen.h:616
void BuildClientSheetPathList()
built the list of sheet paths sharing a screen for each screen in use
size_t GetCount() const
Definition: sch_screen.h:618
void ClearAnnotationOfNewSheetPaths(SCH_SHEET_LIST &aInitialSheetPathList)
Clear the annotation for the symbols inside new sheetpaths when a complex hierarchy is modified and n...
bool CanCauseCaseSensitivityIssue(const wxString &aSchematicFileName) const
Check aSchematicFileName for a potential file name case sensitivity issue.
bool HasNoFullyDefinedLibIds()
Test all of the schematic symbols to see if all LIB_ID objects library nickname is not set.
void ClearEditFlags()
SCH_SHEET * GetSheet(unsigned int aIndex) const
int ReplaceDuplicateTimeStamps()
Test all sheet and symbol objects in the schematic for duplicate time stamps and replaces them as nec...
void DeleteAllMarkers(enum MARKER_BASE::TYPEMARKER aMarkerType, bool aIncludeExclusions)
Delete all electronic rules check markers of aMarkerType from all the screens in the list.
std::vector< SCH_SCREEN * > m_screens
Definition: sch_screen.h:746
bool HasSchematic(const wxString &aSchematicFileName)
Check if one of the schematics in the list of screens is aSchematicFileName.
size_t GetLibNicknames(wxArrayString &aLibNicknames)
Fetch all of the symbol library nicknames into aLibNicknames.
void SetLegacySymbolInstanceData()
Update the symbol value and footprint instance data for legacy designs.
void addScreenToList(SCH_SCREEN *aScreen, SCH_SHEET *aSheet)
void SetFileFormatVersionAtLoad(int aVersion)
Definition: sch_screen.h:127
const PAGE_INFO & GetPageSettings() const
Definition: sch_screen.h:130
std::map< wxString, LIB_SYMBOL * > m_libSymbols
Library symbols required for this schematic.
Definition: sch_screen.h:574
bool m_fileExists
Definition: sch_screen.h:568
void ClearDrawingState()
Clear the state flags of all the items in the screen.
std::vector< SCH_SHEET_INSTANCE > m_sheetInstances
Definition: sch_screen.h:591
SCH_LINE * GetLine(const VECTOR2I &aPosition, int aAccuracy=0, int aLayer=LAYER_NOTES, SCH_LINE_TEST_T aSearchType=ENTIRE_LENGTH_T) const
Return a line item located at aPosition.
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
Definition: sch_screen.h:156
void ClearBusAliases()
Remove all bus alias definitions.
Definition: sch_screen.h:475
void SetAllSymbolDefaultInstances()
Set symbol default instances to the first instance in the instance list.
void Update(SCH_ITEM *aItem)
Update aItem's bounding box in the tree.
Definition: sch_screen.cpp:259
void AddLibSymbol(LIB_SYMBOL *aLibSymbol)
Add aLibSymbol to the library symbol map.
void AddBusAlias(std::shared_ptr< BUS_ALIAS > aAlias)
Add a bus alias definition (and transfers ownership of the pointer).
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:453
bool HasItems(KICAD_T aItemType) const
Definition: sch_screen.cpp:125
void Clear(bool aFree=true)
Delete all draw items and clears the project settings.
Definition: sch_screen.cpp:221
LIB_PIN * GetPin(const VECTOR2I &aPosition, SCH_SYMBOL **aSymbol=nullptr, bool aEndPointOnly=false) const
Test the screen for a symbol pin item at aPosition.
bool Remove(SCH_ITEM *aItem)
Remove aItem from the schematic associated with this screen.
Definition: sch_screen.cpp:266
std::vector< SCH_SHEET_PATH > & GetClientSheetPaths()
Return the number of times this screen is used.
Definition: sch_screen.h:177
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:841
SCH_LINE * GetWire(const VECTOR2I &aPosition, int aAccuracy=0, SCH_LINE_TEST_T aSearchType=ENTIRE_LENGTH_T) const
Definition: sch_screen.h:426
int m_refCount
Definition: sch_screen.h:542
const EE_RTREE & Items() const
Definition: sch_screen.h:109
TITLE_BLOCK m_titles
Definition: sch_screen.h:555
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 EnsureAlternateReferencesExist()
For screens shared by many sheetpaths (complex hierarchies): to be able to clear or modify any refere...
void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: sch_screen.h:131
bool AllSymbolDefaultInstancesNotSet()
Check all symbol default instance to see if they are not set yet.
const std::map< wxString, LIB_SYMBOL * > & GetLibSymbols() const
Definition: sch_screen.h:454
std::vector< SYMBOL_INSTANCE_REFERENCE > m_symbolInstances
The list of symbol instances loaded from the schematic file.
Definition: sch_screen.h:590
int m_modification_sync
Definition: sch_screen.h:559
double m_LastZoomLevel
last value for the zoom level, useful in Eeschema when changing the current displayed sheet to reuse ...
Definition: sch_screen.h:527
const VECTOR2I & GetAuxOrigin() const
Definition: sch_screen.h:151
void SetAuxOrigin(const VECTOR2I &aPosition)
Definition: sch_screen.h:152
bool IsExplicitJunction(const VECTOR2I &aPosition) const
Indicates that a junction dot is necessary at the given location.
Definition: sch_screen.cpp:427
EE_RTREE & Items()
Gets the full RTree, usually for iterating.
Definition: sch_screen.h:108
int m_fileFormatVersionAtLoad
Definition: sch_screen.h:541
void Print(const RENDER_SETTINGS *aSettings)
Print all the items in the screen to aDC.
const wxString & GetFileName() const
Definition: sch_screen.h:143
void DecRefCount()
Definition: sch_screen.cpp:118
const KIID & GetUuid() const
Definition: sch_screen.h:498
std::set< SCH_ITEM * > MarkConnections(SCH_LINE *aSegment, bool aSecondPass)
Return all wires and junctions connected to aSegment which are not connected any symbol pin.
Definition: sch_screen.cpp:351
SCH_ITEM * GetItem(const VECTOR2I &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:335
bool IsExplicitJunctionAllowed(const VECTOR2I &aPosition) const
Indicates that a juction dot may be placed at the given location.
Definition: sch_screen.cpp:664
void clearLibSymbols()
Definition: sch_screen.cpp:95
wxString m_fileName
Definition: sch_screen.h:540
bool IsTerminalPoint(const VECTOR2I &aPosition, int aLayer) const
Test if aPosition is a connection point on aLayer.
Definition: sch_screen.cpp:776
bool IsReadOnly() const
Definition: sch_screen.h:146
void UpdateLocalLibSymbolLinks()
Initialize the LIB_SYMBOL reference for each SCH_SYMBOL found in this schematic with the local projec...
Definition: sch_screen.cpp:995
void IncRefCount()
Definition: sch_screen.cpp:112
std::set< std::shared_ptr< BUS_ALIAS > > m_aliases
List of bus aliases stored in this screen.
Definition: sch_screen.h:571
void SetFileName(const wxString &aFileName)
Set the file name for this screen to aFileName.
Definition: sch_screen.cpp:104
static bool ClassOf(const EDA_ITEM *aItem)
Definition: sch_screen.cpp:133
void SetLegacySymbolInstanceData()
Update the symbol value and footprint instance data for legacy designs.
SCH_LINE * GetBus(const VECTOR2I &aPosition, int aAccuracy=0, SCH_LINE_TEST_T aSearchType=ENTIRE_LENGTH_T) const
Definition: sch_screen.h:432
std::vector< SCH_SHEET_PATH > m_clientSheetPathList
The list of sheet paths sharing this screen.
Definition: sch_screen.h:551
SCH_SCREEN(EDA_ITEM *aParent=nullptr)
Definition: sch_screen.cpp:60
SCHEMATIC * Schematic() const
Definition: sch_screen.cpp:86
EE_RTREE m_rtree
Definition: sch_screen.h:557
friend SCH_SEXPR_PLUGIN
Definition: sch_screen.h:536
bool HasSheets() const
Definition: sch_screen.h:118
int GetFileFormatVersionAtLoad() const
Definition: sch_screen.h:128
VECTOR2I m_aux_origin
Definition: sch_screen.h:556
void GetHierarchicalItems(std::vector< SCH_ITEM * > *aItems) const
Add all schematic sheet and symbol objects in the screen to aItems.
bool IsExplicitJunctionNeeded(const VECTOR2I &aPosition) const
Indicates that a junction dot is necessary at the given location, and does not yet exist.
Definition: sch_screen.cpp:437
SCH_SHEET_PIN * GetSheetPin(const VECTOR2I &aPosition) const
Test the screen if aPosition is a sheet label object.
void Plot(PLOTTER *aPlotter) const
Plot all the schematic objects to aPlotter.
const std::vector< SYMBOL_INSTANCE_REFERENCE > & GetSymbolInstances() const
Definition: sch_screen.h:488
const TITLE_BLOCK & GetTitleBlock() const
Definition: sch_screen.h:154
void FreeDrawList()
Free all the items from the schematic associated with the screen.
Definition: sch_screen.cpp:240
virtual wxString GetClass() const override
Return the class name.
Definition: sch_screen.h:122
friend SCH_EDIT_FRAME
Definition: sch_screen.h:534
void SetConnectivityDirty()
bool m_zoomInitialized
Definition: sch_screen.h:562
bool FileExists() const
Definition: sch_screen.h:149
int GetRefCount() const
Definition: sch_screen.h:160
void AssignNewUuid()
Definition: sch_screen.h:500
PAGE_INFO m_paper
Definition: sch_screen.h:554
bool IsJunction(const VECTOR2I &aPosition) const
Test if a junction is required for the items at aPosition on the screen.
Definition: sch_screen.cpp:417
friend SCH_SEXPR_PARSER
Definition: sch_screen.h:535
const std::vector< SCH_SHEET_INSTANCE > & GetSheetInstances() const
Definition: sch_screen.h:493
bool m_isReadOnly
Read only status of the screen file.
Definition: sch_screen.h:565
TEXT_SPIN_STYLE GetLabelOrientationForPoint(const VECTOR2I &aPosition, TEXT_SPIN_STYLE aDefaultOrientation, const SCH_SHEET_PATH *aSheet) const
Definition: sch_screen.cpp:446
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 CheckIfOnDrawList(const SCH_ITEM *aItem) const
Definition: sch_screen.cpp:329
KIID m_uuid
A unique identifier for each schematic file.
Definition: sch_screen.h:599
void ClearAnnotation(SCH_SHEET_PATH *aSheetPath, bool aResetPrefix)
Clear the annotation for the symbols in aSheetPath on the screen.
void SetFileReadOnly(bool aIsReadOnly)
Definition: sch_screen.h:145
bool doIsJunction(const VECTOR2I &aPosition, bool aBreakCrossings, bool *aHasExplicitJunctionDot, bool *aHasBusEntry) const
Definition: sch_screen.cpp:675
size_t CountConnectedItems(const VECTOR2I &aPos, bool aTestJunctions) const
void Append(SCH_ITEM *aItem)
Definition: sch_screen.cpp:139
void DeleteItem(SCH_ITEM *aItem)
Removes aItem from the linked list and deletes the object.
Definition: sch_screen.cpp:304
std::set< std::shared_ptr< BUS_ALIAS > > GetBusAliases() const
Return a list of bus aliases defined in this screen.
Definition: sch_screen.h:483
bool IsEmpty() const
Definition: sch_screen.h:111
void SetFileExists(bool aFileExists)
Definition: sch_screen.h:148
SCH_LABEL_BASE * GetLabel(const VECTOR2I &aPosition, int aAccuracy=0) const
Return a label item located at aPosition.
Object to parser s-expression symbol library and schematic file formats.
A SCH_PLUGIN derivation for loading schematic files using the new s-expression file format.
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Definition: sch_sheet_pin.h:66
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:55
Schematic symbol object.
Definition: sch_symbol.h:79
Hold the information shown in the lower right corner of a plot, printout, or editing view.
Definition: title_block.h:41
@ LAYER_WIRE
Definition: layer_ids.h:344
@ LAYER_NOTES
Definition: layer_ids.h:358
@ LAYER_BUS
Definition: layer_ids.h:345
SCH_LINE_TEST_T
Definition: sch_screen.h:70
@ ENTIRE_LENGTH_T
Definition: sch_screen.h:71
@ EXCLUDE_END_POINTS_T
Definition: sch_screen.h:73
@ END_POINTS_ONLY_T
Definition: sch_screen.h:72
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
LIB_ID LibId
Definition: sch_screen.h:79
std::vector< std::pair< int, wxString > > Fields
Definition: sch_screen.h:83
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition: typeinfo.h:78
@ SCH_LOCATE_ANY_T
Definition: typeinfo.h:182
@ SCH_SHEET_T
Definition: typeinfo.h:157