KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_sheet.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) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright (C) 1992-2024 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 SCH_SHEEET_H
26#define SCH_SHEEET_H
27
28#include <sch_field.h>
29
30class KIID_PATH;
31class SCH_SCREEN;
33class SCH_SHEET_LIST;
34class SCH_SHEET_PIN;
35class SCH_SHEET_PATH;
36class EDA_DRAW_FRAME;
37
38
39#define MIN_SHEET_WIDTH 500 // Units are mils.
40#define MIN_SHEET_HEIGHT 150 // Units are mils.
41
42
44{
47
50};
51
52
56class SCH_SHEET : public SCH_ITEM
57{
58public:
59 SCH_SHEET( EDA_ITEM* aParent = nullptr, const VECTOR2I& aPos = VECTOR2I( 0, 0 ),
62 FIELDS_AUTOPLACED aAutoplaceFields = FIELDS_AUTOPLACED_AUTO );
63
68 SCH_SHEET( const SCH_SHEET& aSheet );
69
70 ~SCH_SHEET();
71
72 static inline bool ClassOf( const EDA_ITEM* aItem )
73 {
74 return aItem && SCH_SHEET_T == aItem->Type();
75 }
76
77 wxString GetClass() const override
78 {
79 return wxT( "SCH_SHEET" );
80 }
81
91 bool IsMovableFromAnchorPoint() const override { return false; }
92
93 std::vector<SCH_FIELD>& GetFields() { return m_fields; }
94 const std::vector<SCH_FIELD>& GetFields() const { return m_fields; }
95
101 void SetFields( const std::vector<SCH_FIELD>& aFields );
102
103 wxString GetShownName( bool aAllowExtraText ) const
104 {
105 return m_fields[SHEETNAME].GetShownText( aAllowExtraText );
106 }
107 wxString GetName() const { return m_fields[ SHEETNAME ].GetText(); }
108 void SetName( const wxString& aName ) { m_fields[ SHEETNAME ].SetText( aName ); }
109
110 SCH_SCREEN* GetScreen() const { return m_screen; }
111
112 VECTOR2I GetSize() const { return m_size; }
113 void SetSize( const VECTOR2I& aSize ) { m_size = aSize; }
114
115 int GetBorderWidth() const { return m_borderWidth; }
116 void SetBorderWidth( int aWidth ) { m_borderWidth = aWidth; }
117
119 void SetBorderColor( KIGFX::COLOR4D aColor ) { m_borderColor = aColor; }
120
123
127 bool IsRootSheet() const;
128
140 void SetScreen( SCH_SCREEN* aScreen );
141
147 int GetScreenCount() const;
148
152 void GetContextualTextVars( wxArrayString* aVars ) const;
153
159 bool ResolveTextVar( const SCH_SHEET_PATH* aPath, wxString* token, int aDepth = 0 ) const;
160
161 void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
162
163 /* there is no member for orientation in sch_sheet, to preserve file
164 * format, we detect orientation based on pin edges
165 */
166 bool IsVerticalOrientation() const;
167
168 void SetPositionIgnoringPins( const VECTOR2I& aPosition );
169
179 void AddPin( SCH_SHEET_PIN* aSheetPin );
180
181 std::vector<SCH_SHEET_PIN*>& GetPins() { return m_pins; }
182 const std::vector<SCH_SHEET_PIN*>& GetPins() const { return m_pins; }
183
189 void RemovePin( const SCH_SHEET_PIN* aSheetPin );
190
197 void CleanupSheet();
198
206 SCH_SHEET_PIN* GetPin( const VECTOR2I& aPosition );
207
214 bool HasPin( const wxString& aName ) const;
215
216 bool HasPins() const { return !m_pins.empty(); }
217
223 bool HasUndefinedPins() const;
224
236 int GetMinWidth( bool aFromLeft ) const;
237
248 int GetMinHeight( bool aFromTop ) const;
249
250 int GetPenWidth() const override;
251
252 void Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset ) override;
253
257 const BOX2I GetBodyBoundingBox() const;
258
259 const BOX2I GetBoundingBox() const override;
260
267
268 void SwapData( SCH_ITEM* aItem ) override;
269
273 int SymbolCount() const;
274
282 bool SearchHierarchy( const wxString& aFilename, SCH_SCREEN** aScreen );
283
294 bool LocatePathOfScreen( SCH_SCREEN* aScreen, SCH_SHEET_PATH* aList );
295
301 int CountSheets() const;
302
308 wxString GetFileName() const
309 {
310 return m_fields[ SHEETFILENAME ].GetText();
311 }
312
313 // Set a new filename without changing anything else
314 void SetFileName( const wxString& aFilename )
315 {
316 // Filenames are stored using unix notation
317 wxString tmp = aFilename;
318 tmp.Replace( wxT( "\\" ), wxT( "/" ) );
319 m_fields[ SHEETFILENAME ].SetText( tmp );
320 }
321
322 // Geometric transforms (used in block operations):
323
324 void Move( const VECTOR2I& aMoveVector ) override;
325 void MirrorHorizontally( int aCenter ) override;
326 void MirrorVertically( int aCenter ) override;
327 void Rotate( const VECTOR2I& aCenter ) override;
328
329 bool Matches( const EDA_SEARCH_DATA& aSearchData, void* aAuxData ) const override;
330
331 bool IsReplaceable() const override { return true; }
332
338 void Resize( const VECTOR2I& aSize );
339
340 void AutoplaceFields( SCH_SCREEN* aScreen, bool aManual ) override;
341
342 void GetEndPoints( std::vector <DANGLING_END_ITEM>& aItemList ) override;
343
344 bool UpdateDanglingState( std::vector<DANGLING_END_ITEM>& aItemListByType,
345 std::vector<DANGLING_END_ITEM>& aItemListByPos,
346 const SCH_SHEET_PATH* aPath = nullptr ) override;
347
348 bool IsConnectable() const override { return true; }
349
350 bool HasConnectivityChanges( const SCH_ITEM* aItem,
351 const SCH_SHEET_PATH* aInstance = nullptr ) const override;
352
353 bool CanConnect( const SCH_ITEM* aItem ) const override
354 {
355 return ( aItem->Type() == SCH_LINE_T && aItem->GetLayer() == LAYER_WIRE )
356 || ( aItem->Type() == SCH_LINE_T && aItem->GetLayer() == LAYER_BUS )
357 || ( aItem->Type() == SCH_NO_CONNECT_T )
358 || ( aItem->Type() == SCH_SYMBOL_T );
359 }
360
361 std::vector<VECTOR2I> GetConnectionPoints() const override;
362
363 INSPECT_RESULT Visit( INSPECTOR inspector, void* testData,
364 const std::vector<KICAD_T>& aScanTypes ) override;
365
366 void RunOnChildren( const std::function<void( SCH_ITEM* )>& aFunction ) override;
367
368 wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
369
370 BITMAPS GetMenuImage() const override;
371
372 SCH_SHEET& operator=( const SCH_ITEM& aSheet );
373
374 bool operator <( const SCH_ITEM& aItem ) const override;
375
376 void ViewGetLayers( int aLayers[], int& aCount ) const override;
377
378 VECTOR2I GetPosition() const override { return m_pos; }
379 void SetPosition( const VECTOR2I& aPosition ) override;
380
381 bool HitTest( const VECTOR2I& aPosition, int aAccuracy ) const override;
382 bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
383
384 void Plot( PLOTTER* aPlotter, bool aBackground,
385 const SCH_PLOT_SETTINGS& aPlotSettings ) const override;
386
387 EDA_ITEM* Clone() const override;
388
392 const std::vector<SCH_SHEET_INSTANCE>& GetInstances() const { return m_instances; }
393
403 bool HasRootInstance() const;
404
413 const SCH_SHEET_INSTANCE& GetRootInstance() const;
414
415 void RemoveInstance( const KIID_PATH& aInstancePath );
416
417 void AddInstance( const SCH_SHEET_INSTANCE& aInstance );
418
424 static int ComparePageNum( const wxString& aPageNumberA, const wxString& aPageNumberB );
425
426 double Similarity( const SCH_ITEM& aOther ) const override;
427
428 bool operator==( const SCH_ITEM& aOther ) const override;
429
430#if defined(DEBUG)
431 void Show( int nestLevel, std::ostream& os ) const override;
432#endif
433
434 static const wxString GetDefaultFieldName( int aFieldNdx, bool aTranslated = true );
435
436protected:
439
440 void setInstances( const std::vector<SCH_SHEET_INSTANCE>& aInstances )
441 {
442 m_instances = aInstances;
443 }
444
460 bool addInstance( const SCH_SHEET_PATH& aInstance );
461
472 wxString getPageNumber( const SCH_SHEET_PATH& aInstance ) const;
473
485 void setPageNumber( const SCH_SHEET_PATH& aInstance, const wxString& aPageNumber );
486
487 bool getInstance( SCH_SHEET_INSTANCE& aInstance, const KIID_PATH& aSheetPath,
488 bool aTestFromEnd = false ) const;
489
497 void renumberPins();
498
503 SCH_SHEET_PATH findSelf() const;
504
505private:
506 bool doIsConnected( const VECTOR2I& aPosition ) const override;
507
508 friend class SCH_SHEET_PIN;
509 friend class SCH_SHEET_LIST;
510
511private:
512 SCH_SCREEN* m_screen; // Screen that contains the physical data for the
513 // sheet. In complex hierarchies multiple sheets
514 // can share a common screen.
515
516 std::vector<SCH_SHEET_PIN*> m_pins; // The list of sheet connection points.
517 std::vector<SCH_FIELD> m_fields;
518
519 VECTOR2I m_pos; // The position of the sheet.
520 VECTOR2I m_size; // The size of the sheet.
524
525 std::vector<SCH_SHEET_INSTANCE> m_instances;
526};
527
528
529#endif // SCH_SHEEET_H
constexpr EDA_IU_SCALE schIUScale
Definition: base_units.h:111
BITMAPS
A list of all bitmap identifiers.
Definition: bitmaps_list.h:33
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:85
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:97
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
Base plotter engine class.
Definition: plotter.h:104
Object to parser s-expression symbol library and schematic file formats.
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:165
SCH_LAYER_ID GetLayer() const
Return the layer this item is on.
Definition: sch_item.h:272
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:57
void GetEndPoints(std::vector< DANGLING_END_ITEM > &aItemList) override
Add the schematic item end points to aItemList if the item has end points.
Definition: sch_sheet.cpp:991
void GetContextualTextVars(wxArrayString *aVars) const
Return the list of system text vars & fields for this sheet.
Definition: sch_sheet.cpp:202
friend SCH_SHEET_PATH
Definition: sch_sheet.h:437
void Rotate(const VECTOR2I &aCenter) override
Rotate the item around aCenter 90 degrees in the clockwise direction.
Definition: sch_sheet.cpp:845
void SetBorderColor(KIGFX::COLOR4D aColor)
Definition: sch_sheet.h:119
const std::vector< SCH_SHEET_PIN * > & GetPins() const
Definition: sch_sheet.h:182
VECTOR2I m_size
Definition: sch_sheet.h:520
void SetFileName(const wxString &aFilename)
Definition: sch_sheet.h:314
bool HasConnectivityChanges(const SCH_ITEM *aItem, const SCH_SHEET_PATH *aInstance=nullptr) const override
Check if aItem has connectivity changes against this object.
Definition: sch_sheet.cpp:1016
wxString GetFileName() const
Return the filename corresponding to this sheet.
Definition: sch_sheet.h:308
bool IsRootSheet() const
Definition: sch_sheet.cpp:194
bool getInstance(SCH_SHEET_INSTANCE &aInstance, const KIID_PATH &aSheetPath, bool aTestFromEnd=false) const
Definition: sch_sheet.cpp:1336
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
Definition: sch_sheet.cpp:1115
void SetSize(const VECTOR2I &aSize)
Definition: sch_sheet.h:113
void setPageNumber(const SCH_SHEET_PATH &aInstance, const wxString &aPageNumber)
Set the page number for the sheet instance aInstance.
Definition: sch_sheet.cpp:1409
void RemoveInstance(const KIID_PATH &aInstancePath)
Definition: sch_sheet.cpp:1277
static const wxString GetDefaultFieldName(int aFieldNdx, bool aTranslated=true)
Definition: sch_sheet.cpp:55
void AddPin(SCH_SHEET_PIN *aSheetPin)
Add aSheetPin to the sheet.
Definition: sch_sheet.cpp:372
bool HasRootInstance() const
Check to see if this sheet has a root sheet instance.
Definition: sch_sheet.cpp:1360
wxString GetClass() const override
Return the class name.
Definition: sch_sheet.h:77
void RunOnChildren(const std::function< void(SCH_ITEM *)> &aFunction) override
Definition: sch_sheet.cpp:1098
int GetPenWidth() const override
Definition: sch_sheet.cpp:597
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Definition: sch_sheet.cpp:156
bool IsConnectable() const override
Definition: sch_sheet.h:348
SCH_SHEET_PATH findSelf() const
Get the sheetpath of this sheet.
Definition: sch_sheet.cpp:971
bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const override
Compare the item against the search criteria in aSearchData.
Definition: sch_sheet.cpp:952
double Similarity(const SCH_ITEM &aOther) const override
Return a measure of how likely the other object is to represent the same object.
Definition: sch_sheet.cpp:1498
VECTOR2I m_pos
Definition: sch_sheet.h:519
std::vector< SCH_FIELD > & GetFields()
Definition: sch_sheet.h:93
KIGFX::COLOR4D m_borderColor
Definition: sch_sheet.h:522
wxString GetName() const
Definition: sch_sheet.h:107
void renumberPins()
Renumber the sheet pins in the sheet.
Definition: sch_sheet.cpp:959
VECTOR2I GetRotationCenter() const
Rotating around the boundingBox's center can cause walking when the sheetname or filename is longer t...
Definition: sch_sheet.cpp:699
SCH_SHEET_PIN * GetPin(const VECTOR2I &aPosition)
Return the sheet pin item found at aPosition in the sheet.
Definition: sch_sheet.cpp:585
bool operator<(const SCH_ITEM &aItem) const override
Definition: sch_sheet.cpp:1260
void CleanupSheet()
Delete sheet label which do not have a corresponding hierarchical label.
Definition: sch_sheet.cpp:559
void RemovePin(const SCH_SHEET_PIN *aSheetPin)
Remove aSheetPin from the sheet.
Definition: sch_sheet.cpp:383
void SetPositionIgnoringPins(const VECTOR2I &aPosition)
Definition: sch_sheet.cpp:822
bool SearchHierarchy(const wxString &aFilename, SCH_SCREEN **aScreen)
Search the existing hierarchy for an instance of screen loaded from aFileName.
Definition: sch_sheet.cpp:728
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
Definition: sch_sheet.cpp:1108
bool LocatePathOfScreen(SCH_SCREEN *aScreen, SCH_SHEET_PATH *aList)
Search the existing hierarchy for an instance of screen loaded from aFileName.
Definition: sch_sheet.cpp:764
std::vector< SCH_SHEET_INSTANCE > m_instances
Definition: sch_sheet.h:525
bool HasUndefinedPins() const
Check all sheet labels against schematic for undefined hierarchical labels.
Definition: sch_sheet.cpp:445
void SetPosition(const VECTOR2I &aPosition) override
Definition: sch_sheet.cpp:927
void SetBackgroundColor(KIGFX::COLOR4D aColor)
Definition: sch_sheet.h:122
int SymbolCount() const
Count our own symbols, without the power symbols.
Definition: sch_sheet.cpp:706
bool IsReplaceable() const override
Override this method in any derived object that supports test find and replace.
Definition: sch_sheet.h:331
void AddInstance(const SCH_SHEET_INSTANCE &aInstance)
Definition: sch_sheet.cpp:1298
int GetMinWidth(bool aFromLeft) const
Return the minimum width of the sheet based on the widths of the sheet pin text.
Definition: sch_sheet.cpp:491
bool operator==(const SCH_ITEM &aOther) const override
Definition: sch_sheet.cpp:1463
SCH_SCREEN * m_screen
Definition: sch_sheet.h:512
void ViewGetLayers(int aLayers[], int &aCount) const override
Return the layers the item is drawn on (which may be more than its "home" layer)
Definition: sch_sheet.cpp:652
std::vector< SCH_FIELD > m_fields
Definition: sch_sheet.h:517
VECTOR2I GetSize() const
Definition: sch_sheet.h:112
KIGFX::COLOR4D m_backgroundColor
Definition: sch_sheet.h:523
void SetName(const wxString &aName)
Definition: sch_sheet.h:108
int CountSheets() const
Count the number of sheets found in "this" sheet including all of the subsheets.
Definition: sch_sheet.cpp:788
SCH_SCREEN * GetScreen() const
Definition: sch_sheet.h:110
bool HasPins() const
Definition: sch_sheet.h:216
VECTOR2I GetPosition() const override
Definition: sch_sheet.h:378
const BOX2I GetBodyBoundingBox() const
Return a bounding box for the sheet body but not the fields.
Definition: sch_sheet.cpp:667
bool HasPin(const wxString &aName) const
Checks if the sheet already has a sheet pin named aName.
Definition: sch_sheet.cpp:400
static int ComparePageNum(const wxString &aPageNumberA, const wxString &aPageNumberB)
Compares page numbers of schematic sheets.
Definition: sch_sheet.cpp:1427
void MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
Definition: sch_sheet.cpp:907
wxString getPageNumber(const SCH_SHEET_PATH &aInstance) const
Return the sheet page number for aInstance.
Definition: sch_sheet.cpp:1388
void SetFields(const std::vector< SCH_FIELD > &aFields)
Set multiple schematic fields.
Definition: sch_sheet.cpp:352
int GetScreenCount() const
Return the number of times the associated screen for the sheet is being used.
Definition: sch_sheet.cpp:185
void SetScreen(SCH_SCREEN *aScreen)
Set the SCH_SCREEN associated with this sheet to aScreen.
Definition: sch_sheet.cpp:162
SCH_SHEET & operator=(const SCH_ITEM &aSheet)
Definition: sch_sheet.cpp:1230
const SCH_SHEET_INSTANCE & GetRootInstance() const
Return the root sheet instance data.
Definition: sch_sheet.cpp:1372
bool doIsConnected(const VECTOR2I &aPosition) const override
Provide the object specific test to see if it is connected to aPosition.
Definition: sch_sheet.cpp:412
void setInstances(const std::vector< SCH_SHEET_INSTANCE > &aInstances)
Definition: sch_sheet.h:440
void AutoplaceFields(SCH_SCREEN *aScreen, bool aManual) override
Definition: sch_sheet.cpp:609
void Plot(PLOTTER *aPlotter, bool aBackground, const SCH_PLOT_SETTINGS &aPlotSettings) const override
Plot the schematic item to aPlotter.
Definition: sch_sheet.cpp:1144
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
Definition: sch_sheet.cpp:688
const std::vector< SCH_FIELD > & GetFields() const
Definition: sch_sheet.h:94
std::vector< VECTOR2I > GetConnectionPoints() const override
Add all the connection points for this item to aPoints.
Definition: sch_sheet.cpp:1050
KIGFX::COLOR4D GetBorderColor() const
Definition: sch_sheet.h:118
std::vector< SCH_SHEET_PIN * > m_pins
Definition: sch_sheet.h:516
bool IsMovableFromAnchorPoint() const override
Return true for items which are moved with the anchor point at mouse cursor and false for items moved...
Definition: sch_sheet.h:91
bool CanConnect(const SCH_ITEM *aItem) const override
Definition: sch_sheet.h:353
INSPECT_RESULT Visit(INSPECTOR inspector, void *testData, const std::vector< KICAD_T > &aScanTypes) override
May be re-implemented for each derived class in order to handle all the types given by its member dat...
Definition: sch_sheet.cpp:1061
void SetBorderWidth(int aWidth)
Definition: sch_sheet.h:116
static bool ClassOf(const EDA_ITEM *aItem)
Definition: sch_sheet.h:72
bool addInstance(const SCH_SHEET_PATH &aInstance)
Add a new instance aSheetPath to the instance list.
Definition: sch_sheet.cpp:1310
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
Definition: sch_sheet.cpp:887
void SwapData(SCH_ITEM *aItem) override
Swap the internal data structures aItem with the schematic item.
Definition: sch_sheet.cpp:316
int GetMinHeight(bool aFromTop) const
Return the minimum height that the sheet can be resized based on the sheet pin positions.
Definition: sch_sheet.cpp:525
int m_borderWidth
Definition: sch_sheet.h:521
bool UpdateDanglingState(std::vector< DANGLING_END_ITEM > &aItemListByType, std::vector< DANGLING_END_ITEM > &aItemListByPos, const SCH_SHEET_PATH *aPath=nullptr) override
Test the schematic item to aItemList to check if it's dangling state has changed.
Definition: sch_sheet.cpp:1003
void Resize(const VECTOR2I &aSize)
Resize this sheet to aSize and adjust all of the labels accordingly.
Definition: sch_sheet.cpp:935
void Move(const VECTOR2I &aMoveVector) override
Move the item by aMoveVector to a new position.
Definition: sch_sheet.cpp:833
int GetBorderWidth() const
Definition: sch_sheet.h:115
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
Definition: sch_sheet.cpp:802
std::vector< SCH_SHEET_PIN * > & GetPins()
Definition: sch_sheet.h:181
wxString GetShownName(bool aAllowExtraText) const
Definition: sch_sheet.h:103
friend SCH_IO_KICAD_SEXPR_PARSER
Definition: sch_sheet.h:438
bool ResolveTextVar(const SCH_SHEET_PATH *aPath, wxString *token, int aDepth=0) const
Resolve any references to system tokens supported by the sheet.
Definition: sch_sheet.cpp:237
const std::vector< SCH_SHEET_INSTANCE > & GetInstances() const
Definition: sch_sheet.h:392
bool IsVerticalOrientation() const
Definition: sch_sheet.cpp:424
void Print(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset) override
Print a schematic item.
Definition: sch_sheet.cpp:1198
bool HitTest(const VECTOR2I &aPosition, int aAccuracy) const override
Test if aPosition is inside or on the boundary of this item.
Definition: sch_sheet.cpp:1121
KIGFX::COLOR4D GetBackgroundColor() const
Definition: sch_sheet.h:121
INSPECT_RESULT
Definition: eda_item.h:42
const INSPECTOR_FUNC & INSPECTOR
Definition: eda_item.h:78
@ LAYER_WIRE
Definition: layer_ids.h:355
@ LAYER_BUS
Definition: layer_ids.h:356
FIELDS_AUTOPLACED
Definition: sch_item.h:59
@ FIELDS_AUTOPLACED_AUTO
Definition: sch_item.h:61
SHEET_FIELD_TYPE
Definition: sch_sheet.h:44
@ SHEET_MANDATORY_FIELDS
The first 2 are mandatory, and must be instantiated in SCH_SHEET.
Definition: sch_sheet.h:49
@ SHEETNAME
Definition: sch_sheet.h:45
@ SHEETFILENAME
Definition: sch_sheet.h:46
#define MIN_SHEET_HEIGHT
Definition: sch_sheet.h:40
#define MIN_SHEET_WIDTH
Definition: sch_sheet.h:39
constexpr int MilsToIU(int mils) const
Definition: base_units.h:94
A simple container for sheet instance information.
@ SCH_LINE_T
Definition: typeinfo.h:148
@ SCH_NO_CONNECT_T
Definition: typeinfo.h:145
@ SCH_SYMBOL_T
Definition: typeinfo.h:160
@ SCH_SHEET_T
Definition: typeinfo.h:162
VECTOR2< int > VECTOR2I
Definition: vector2d.h:588