KiCad PCB EDA Suite
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-2020 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 <boost/ptr_container/ptr_vector.hpp>
29 #include <sch_text.h>
30 #include <sch_field.h>
31 
32 class LINE_READER;
33 class SCH_SCREEN;
34 class SCH_SHEET;
35 class SCH_SHEET_PIN;
36 class SCH_SHEET_PATH;
37 class DANGLING_END_ITEM;
38 class SCH_EDIT_FRAME;
40 
41 
42 #define MIN_SHEET_WIDTH 500 // Units are mils.
43 #define MIN_SHEET_HEIGHT 150 // Units are mils.
44 
45 
56 {
62 };
63 
64 
66  SHEETNAME = 0,
68 
71 };
72 
73 
85 {
86 private:
87  int m_number;
88 
93 
94 public:
95  SCH_SHEET_PIN( SCH_SHEET* parent,
96  const wxPoint& pos = wxPoint( 0, 0 ),
97  const wxString& text = wxEmptyString );
98 
99  // Do not create a copy constructor. The one generated by the compiler is adequate.
100 
102 
103  static inline bool ClassOf( const EDA_ITEM* aItem )
104  {
105  return aItem && SCH_SHEET_PIN_T == aItem->Type();
106  }
107 
108  wxString GetClass() const override
109  {
110  return wxT( "SCH_SHEET_PIN" );
111  }
112 
113  bool operator ==( const SCH_SHEET_PIN* aPin ) const;
114 
121  bool IsMovableFromAnchorPoint() override { return true; }
122 
123  void Print( wxDC* aDC, const wxPoint& aOffset ) override;
124 
131  void CreateGraphicShape( std::vector <wxPoint>& aPoints, const wxPoint& aPos ) override;
132 
133  void SwapData( SCH_ITEM* aItem ) override;
134 
135  int GetPenSize() const override;
136 
142  int GetNumber() const { return m_number; }
143 
149  void SetNumber( int aNumber );
150 
151  void SetEdge( SHEET_SIDE aEdge );
152 
153  SHEET_SIDE GetEdge() const;
154 
159  void ConstrainOnEdge( wxPoint Pos );
160 
167  SCH_SHEET* GetParent() const { return (SCH_SHEET*) m_Parent; }
168 
169 #if defined(DEBUG)
170  void Show( int nestLevel, std::ostream& os ) const override;
171 #endif
172 
173  // Geometric transforms (used in block operations):
174 
175  void Move( const wxPoint& aMoveVector ) override
176  {
177  Offset( aMoveVector );
178  }
179 
180  void MirrorX( int aXaxis_position ) override;
181  void MirrorY( int aYaxis_position ) override;
182  void Rotate( wxPoint aPosition ) override;
183 
184  bool Matches( wxFindReplaceData& aSearchData, void* aAuxData ) override
185  {
186  return SCH_ITEM::Matches( GetText(), aSearchData );
187  }
188 
189  bool Replace( wxFindReplaceData& aSearchData, void* aAuxData = NULL ) override
190  {
191  return EDA_TEXT::Replace( aSearchData );
192  }
193 
194  bool IsReplaceable() const override { return true; }
195 
196  void GetEndPoints( std::vector< DANGLING_END_ITEM >& aItemList ) override;
197 
198  bool IsConnectable() const override { return true; }
199 
200  wxString GetSelectMenuText( EDA_UNITS aUnits ) const override;
201 
202  BITMAP_DEF GetMenuImage() const override;
203 
204  void SetPosition( const wxPoint& aPosition ) override { ConstrainOnEdge( aPosition ); }
205 
206  bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override;
207 
208  EDA_ITEM* Clone() const override;
209 };
210 
211 
215 class SCH_SHEET : public SCH_ITEM
216 {
217  friend class SCH_SHEET_PIN;
218 
222 
224  std::vector<SCH_SHEET_PIN*> m_pins;
225 
226  std::vector<SCH_FIELD> m_fields;
227  FIELDS_AUTOPLACED m_fieldsAutoplaced; // indicates status of field autoplacement
228 
229  wxPoint m_pos; // The position of the sheet.
230  wxSize m_size; // The size of the sheet.
231 
235 
236 public:
237  SCH_SHEET( const wxPoint& pos = wxPoint( 0, 0 ) );
238 
243  SCH_SHEET( const SCH_SHEET& aSheet );
244 
245  ~SCH_SHEET();
246 
247  static inline bool ClassOf( const EDA_ITEM* aItem )
248  {
249  return aItem && SCH_SHEET_T == aItem->Type();
250  }
251 
252  wxString GetClass() const override
253  {
254  return wxT( "SCH_SHEET" );
255  }
256 
266  bool IsMovableFromAnchorPoint() override { return false; }
267 
268  std::vector<SCH_FIELD>& GetFields() { return m_fields; }
269 
275  void SetFields( const std::vector<SCH_FIELD>& aFields )
276  {
277  m_fields = aFields; // vector copying, length is changed possibly
278  }
279 
280  wxString GetName() const { return m_fields[ SHEETNAME ].GetText(); }
281 
283 
284  wxSize GetSize() { return m_size; }
285  void SetSize( const wxSize& aSize ) { m_size = aSize; }
286 
287  int GetBorderWidth() const { return m_borderWidth; }
288  void SetBorderWidth( int aWidth ) { m_borderWidth = aWidth; }
289 
291  void SetBorderColor( KIGFX::COLOR4D aColor ) { m_borderColor = aColor; }
292 
295 
306  bool UsesDefaultStroke() const;
307 
318 
330  void SetScreen( SCH_SCREEN* aScreen );
331 
337  int GetScreenCount() const;
338 
339  void GetMsgPanelInfo( EDA_UNITS aUnits, std::vector<MSG_PANEL_ITEM>& aList ) override;
340 
341  /* there is no member for orientation in sch_sheet, to preserve file
342  * format, we detect orientation based on pin edges
343  */
344  bool IsVerticalOrientation() const;
345 
355  void AddPin( SCH_SHEET_PIN* aSheetPin );
356 
357  std::vector<SCH_SHEET_PIN*>& GetPins() { return m_pins; }
358 
359  std::vector<SCH_SHEET_PIN*>& GetPins() const
360  {
361  return const_cast< std::vector<SCH_SHEET_PIN*>& >( m_pins );
362  }
363 
369  void RemovePin( SCH_SHEET_PIN* aSheetPin );
370 
377  void CleanupSheet();
378 
386  SCH_SHEET_PIN* GetPin( const wxPoint& aPosition );
387 
395  bool HasPin( const wxString& aName );
396 
397  bool HasPins() { return !m_pins.empty(); }
398 
404  bool HasUndefinedPins();
405 
417  int GetMinWidth() const;
418 
429  int GetMinHeight() const;
430 
431  int GetPenSize() const override;
432 
433  void Print( wxDC* aDC, const wxPoint& aOffset ) override;
434 
438  const EDA_RECT GetBodyBoundingBox() const;
439 
440  const EDA_RECT GetBoundingBox() const override;
441 
447  wxPoint GetRotationCenter() const;
448 
449  void SwapData( SCH_ITEM* aItem ) override;
450 
456  int ComponentCount() const;
457 
465  bool SearchHierarchy( const wxString& aFilename, SCH_SCREEN** aScreen );
466 
477  bool LocatePathOfScreen( SCH_SCREEN* aScreen, SCH_SHEET_PATH* aList );
478 
484  int CountSheets();
485 
491  wxString GetFileName() const
492  {
493  return m_fields[ SHEETFILENAME ].GetText();
494  }
495 
496  // Set a new filename without changing anything else
497  void SetFileName( wxString aFilename )
498  {
499  // Filenames are stored using unix notation
500  aFilename.Replace( wxT("\\"), wxT("/") );
501  m_fields[ SHEETFILENAME ].SetText( aFilename );
502  }
503 
504  // Geometric transforms (used in block operations):
505 
506  void Move( const wxPoint& aMoveVector ) override
507  {
508  m_pos += aMoveVector;
509 
510  for( SCH_SHEET_PIN* pin : m_pins )
511  pin->Move( aMoveVector );
512 
513  for( SCH_FIELD& field : m_fields )
514  field.Move( aMoveVector );
515  }
516 
517  void MirrorY( int aYaxis_position ) override;
518  void MirrorX( int aXaxis_position ) override;
519  void Rotate( wxPoint aPosition ) override;
520 
521  bool Matches( wxFindReplaceData& aSearchData, void* aAuxData ) override;
522 
523  bool IsReplaceable() const override { return true; }
524 
530  void Resize( const wxSize& aSize );
531 
532  void AutoplaceFields( SCH_SCREEN* aScreen, bool aManual ) override;
533 
534  void GetEndPoints( std::vector <DANGLING_END_ITEM>& aItemList ) override;
535 
536  bool UpdateDanglingState( std::vector<DANGLING_END_ITEM>& aItemList,
537  const SCH_SHEET_PATH* aPath = nullptr ) override;
538 
539  bool IsConnectable() const override { return true; }
540 
541  bool CanConnect( const SCH_ITEM* aItem ) const override
542  {
543  return ( aItem->Type() == SCH_LINE_T && aItem->GetLayer() == LAYER_WIRE ) ||
544  ( aItem->Type() == SCH_LINE_T && aItem->GetLayer() == LAYER_BUS ) ||
545  ( aItem->Type() == SCH_NO_CONNECT_T );
546  }
547 
548  void GetConnectionPoints( std::vector< wxPoint >& aPoints ) const override;
549 
550  SEARCH_RESULT Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] ) override;
551 
552  wxString GetSelectMenuText( EDA_UNITS aUnits ) const override;
553 
554  BITMAP_DEF GetMenuImage() const override;
555 
556  void GetNetListItem( NETLIST_OBJECT_LIST& aNetListItems,
557  SCH_SHEET_PATH* aSheetPath ) override;
558 
559  SCH_SHEET& operator=( const SCH_ITEM& aSheet );
560 
561  bool operator <( const SCH_ITEM& aItem ) const override;
562 
563  void ViewGetLayers( int aLayers[], int& aCount ) const override;
564 
565  wxPoint GetPosition() const override { return m_pos; }
566  void SetPosition( const wxPoint& aPosition ) override;
567 
568  bool HitTest( const wxPoint& aPosition, int aAccuracy ) const override;
569  bool HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy = 0 ) const override;
570 
571  void Plot( PLOTTER* aPlotter ) override;
572 
573  EDA_ITEM* Clone() const override;
574 
575 #if defined(DEBUG)
576  void Show( int nestLevel, std::ostream& os ) const override;
577 #endif
578 
579  static const wxString GetDefaultFieldName( int aFieldNdx );
580 
581 protected:
589  void renumberPins();
590 
591 private:
592  bool doIsConnected( const wxPoint& aPosition ) const override;
593 };
594 
595 
596 //typedef std::vector< SCH_SHEET* > SCH_SHEETS; // no ownership over contained SCH_SHEETs
597 
598 #endif // SCH_SHEEET_H
EDA_UNITS
Definition: common.h:184
SCH_FIELD instances are attached to a component and provide a place for the component's value,...
Definition: sch_field.h:52
void Offset(const wxPoint &aOffset)
Definition: eda_text.h:237
LINE_READER is an abstract class from which implementation specific LINE_READERs may be derived to re...
Definition: richio.h:81
SHEET_SIDE
Defines the edge of the sheet that the sheet pin is positioned SHEET_LEFT_SIDE = 0: pin on left side ...
Definition: sch_sheet.h:55
void ViewGetLayers(int aLayers[], int &aCount) const override
Function ViewGetLayers returns the layers the item is drawn on (which may be more than its "home" lay...
Definition: sch_sheet.cpp:495
EDA_ITEM * m_Parent
Linked list: Link (parent struct)
Definition: base_struct.h:183
bool SearchHierarchy(const wxString &aFilename, SCH_SCREEN **aScreen)
Search the existing hierarchy for an instance of screen loaded from aFileName.
Definition: sch_sheet.cpp:584
SCH_SHEET_PIN * GetPin(const wxPoint &aPosition)
Return the sheet pin item found at aPosition in the sheet.
Definition: sch_sheet.cpp:433
BITMAP_DEF GetMenuImage() const override
Function GetMenuImage returns a pointer to an image to be used in menus.
SCH_SHEET * GetParent() const
Get the parent sheet object of this sheet pin.
Definition: sch_sheet.h:167
PNG memory record (file in memory).
Definition: bitmap_def.h:29
KIGFX::COLOR4D m_borderColor
Definition: sch_sheet.h:233
EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
void SetFields(const std::vector< SCH_FIELD > &aFields)
Set multiple schematic fields.
Definition: sch_sheet.h:275
The first 2 are mandatory, and must be instantiated in SCH_SHEET.
Definition: sch_sheet.h:70
SCH_SHEET_PIN(SCH_SHEET *parent, const wxPoint &pos=wxPoint(0, 0), const wxString &text=wxEmptyString)
void MirrorY(int aYaxis_position) override
Function MirrorY mirrors item relative to the Y axis about aYaxis_position.
std::vector< SCH_SHEET_PIN * > & GetPins() const
Definition: sch_sheet.h:359
void GetEndPoints(std::vector< DANGLING_END_ITEM > &aItemList) override
Function GetEndPoints adds the schematic item end points to aItemList if the item has end points.
Definition: sch_sheet.cpp:783
bool Matches(wxFindReplaceData &aSearchData, void *aAuxData) override
Function Matches compares the item against the search criteria in aSearchData.
Definition: sch_sheet.cpp:762
int CountSheets()
Count the number of sheets found in "this" sheet includeing all of the subsheets.
Definition: sch_sheet.cpp:646
void SetScreen(SCH_SCREEN *aScreen)
Set the SCH_SCREEN associated with this sheet to aScreen.
Definition: sch_sheet.cpp:149
wxSize m_size
Definition: sch_sheet.h:230
wxString GetClass() const override
Function GetClass returns the class name.
Definition: sch_sheet.h:108
SCH_SHEET * GetRootSheet()
Return the root sheet of this SCH_SHEET object.
Definition: sch_sheet.cpp:181
bool doIsConnected(const wxPoint &aPosition) const override
Function doIsConnected provides the object specific test to see if it is connected to aPosition.
Definition: sch_sheet.cpp:272
bool IsConnectable() const override
Function IsConnectable returns true if the schematic item can connect to another schematic item.
Definition: sch_sheet.h:198
bool IsMovableFromAnchorPoint() override
Return true for items which are moved with the anchor point at mouse cursor and false for items moved...
Definition: sch_sheet.h:121
KIGFX::COLOR4D GetBorderColor() const
Definition: sch_sheet.h:290
SHEET_SIDE GetEdge() const
bool UsesDefaultStroke() const
Test this sheet to see if the default stroke is used to draw the outline.
Definition: sch_sheet.cpp:193
Schematic editor (Eeschema) main window.
bool IsReplaceable() const override
Function IsReplaceable.
Definition: sch_sheet.h:194
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Function HitTest tests if aPosition is contained within or on the bounding box of an item.
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
Definition: sch_sheet.cpp:852
void Print(wxDC *aDC, const wxPoint &aOffset) override
Function Print Print a schematic item.
Definition: sch_sheet.cpp:505
bool operator<(const SCH_ITEM &aItem) const override
Definition: sch_sheet.cpp:975
int GetPenSize() const override
Function GetPenSize virtual pure.
Definition: sch_sheet.cpp:445
void MirrorX(int aXaxis_position) override
Function MirrorX mirrors item relative to the X axis about aXaxis_position.
wxPoint m_pos
Definition: sch_sheet.h:229
SCH_SCREEN * GetScreen()
Definition: sch_sheet.h:282
void Print(wxDC *aDC, const wxPoint &aOffset) override
Function Print Print a schematic item.
void AddPin(SCH_SHEET_PIN *aSheetPin)
Add aSheetPin to the sheet.
Definition: sch_sheet.cpp:230
void CreateGraphicShape(std::vector< wxPoint > &aPoints, const wxPoint &aPos) override
Calculate the graphic shape (a polygon) associated to the text.
bool Replace(wxFindReplaceData &aSearchData, void *aAuxData=NULL) override
Function Replace performs a text replace using the find and replace criteria in aSearchData on items ...
Definition: sch_sheet.h:189
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:78
NETLIST_OBJECT_LIST is a container holding and owning NETLIST_OBJECTs, which are connected items in a...
KIGFX::COLOR4D GetBackgroundColor() const
Definition: sch_sheet.h:293
void SetBorderWidth(int aWidth)
Definition: sch_sheet.h:288
std::vector< SCH_FIELD > & GetFields()
Definition: sch_sheet.h:268
const INSPECTOR_FUNC & INSPECTOR
Definition: base_struct.h:108
int GetScreenCount() const
Return the number of times the associated screen for the sheet is being used.
Definition: sch_sheet.cpp:172
void renumberPins()
Renumber the sheet pins in the sheet.
Definition: sch_sheet.cpp:771
wxString GetClass() const override
Function GetClass returns the class name.
Definition: sch_sheet.h:252
void RemovePin(SCH_SHEET_PIN *aSheetPin)
Remove aSheetPin from the sheet.
Definition: sch_sheet.cpp:240
int GetBorderWidth() const
Definition: sch_sheet.h:287
void SetFileName(wxString aFilename)
Definition: sch_sheet.h:497
void SetBackgroundColor(KIGFX::COLOR4D aColor)
Definition: sch_sheet.h:294
bool IsConnectable() const override
Function IsConnectable returns true if the schematic item can connect to another schematic item.
Definition: sch_sheet.h:539
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes.
Definition: sch_sheet.cpp:544
wxString GetName() const
Definition: sch_sheet.h:280
#define NULL
void MirrorX(int aXaxis_position) override
Function MirrorX mirrors item relative to the X axis about aXaxis_position.
Definition: sch_sheet.cpp:717
bool IsReplaceable() const override
Function IsReplaceable.
Definition: sch_sheet.h:523
bool HasPins()
Definition: sch_sheet.h:397
int m_borderWidth
Definition: sch_sheet.h:232
bool IsMovableFromAnchorPoint() override
Return true for items which are moved with the anchor point at mouse cursor and false for items moved...
Definition: sch_sheet.h:266
std::vector< SCH_SHEET_PIN * > m_pins
The list of sheet connection points.
Definition: sch_sheet.h:224
int GetMinHeight() const
Return the minimum height that the sheet can be resized based on the sheet pin positions.
Definition: sch_sheet.cpp:368
void SetEdge(SHEET_SIDE aEdge)
SEARCH_RESULT Visit(INSPECTOR inspector, void *testData, const KICAD_T scanTypes[]) override
Function Visit may be re-implemented for each derived class in order to handle all the types given by...
Definition: sch_sheet.cpp:814
void SetBorderColor(KIGFX::COLOR4D aColor)
Definition: sch_sheet.h:291
const EDA_RECT GetBodyBoundingBox() const
Return a bounding box for the sheet body but not the fields.
Definition: sch_sheet.cpp:523
void Move(const wxPoint &aMoveVector) override
Function Move moves the item by aMoveVector to a new position.
Definition: sch_sheet.h:175
static const wxString GetDefaultFieldName(int aFieldNdx)
Definition: sch_sheet.cpp:43
SHEET_FIELD_TYPE
Definition: sch_sheet.h:65
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Definition: sch_sheet.h:84
SCH_SHEET_PATH.
int GetNumber() const
Get the sheet label number.
Definition: sch_sheet.h:142
wxString GetFileName() const
Return the filename corresponding to this sheet.
Definition: sch_sheet.h:491
void CleanupSheet()
Delete sheet label which do not have a corresponding hierarchical label.
Definition: sch_sheet.cpp:407
void ConstrainOnEdge(wxPoint Pos)
Adjust label position to edge based on proximity to vertical or horizontal edge of the parent sheet.
wxPoint GetPosition() const override
Function GetPosition.
Definition: sch_sheet.h:565
void Rotate(wxPoint aPosition) override
Function Rotate rotates the item around aPosition 90 degrees in the clockwise direction.
Definition: sch_sheet.cpp:675
int ComponentCount() const
Count our own components, without the power components.
Definition: sch_sheet.cpp:562
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:215
void SetSize(const wxSize &aSize)
Definition: sch_sheet.h:285
FIELDS_AUTOPLACED
Definition: sch_item.h:46
SCH_LAYER_ID GetLayer() const
Function GetLayer returns the layer this item is on.
Definition: sch_item.h:224
std::vector< SCH_SHEET_PIN * > & GetPins()
Definition: sch_sheet.h:357
SCH_SHEET(const wxPoint &pos=wxPoint(0, 0))
Definition: sch_sheet.cpp:70
std::vector< SCH_FIELD > m_fields
Definition: sch_sheet.h:226
void GetConnectionPoints(std::vector< wxPoint > &aPoints) const override
Function GetConnectionPoints add all the connection points for this item to aPoints.
Definition: sch_sheet.cpp:807
bool HasUndefinedPins()
Check all sheet labels against schematic for undefined hierarchical labels.
Definition: sch_sheet.cpp:305
int GetMinWidth() const
Return the minimum width of the sheet based on the widths of the sheet pin text.
Definition: sch_sheet.cpp:328
void SetPosition(const wxPoint &aPosition) override
Function SetPosition set the schematic item position to aPosition.
Definition: sch_sheet.h:204
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:620
Base plotter engine class.
Definition: plotter.h:104
void GetMsgPanelInfo(EDA_UNITS aUnits, std::vector< MSG_PANEL_ITEM > &aList) override
Function GetMsgPanelInfo populates aList of MSG_PANEL_ITEM objects with it's internal state for displ...
Definition: sch_sheet.cpp:660
void SwapData(SCH_ITEM *aItem) override
Function SwapData swap the internal data structures aItem with the schematic item.
Definition: sch_sheet.cpp:203
EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
Definition: sch_sheet.cpp:143
void SetNumber(int aNumber)
Set the sheet label number.
void Plot(PLOTTER *aPlotter) override
Function Plot plots the schematic item to aPlotter.
Definition: sch_sheet.cpp:911
void GetEndPoints(std::vector< DANGLING_END_ITEM > &aItemList) override
Function GetEndPoints adds the schematic item end points to aItemList if the item has end points.
int m_number
Label number use for saving sheet label to file.
Definition: sch_sheet.h:87
bool UpdateDanglingState(std::vector< DANGLING_END_ITEM > &aItemList, const SCH_SHEET_PATH *aPath=nullptr) override
Function IsDanglingStateChanged tests the schematic item to aItemList to check if it's dangling state...
Definition: sch_sheet.cpp:795
bool CanConnect(const SCH_ITEM *aItem) const override
Definition: sch_sheet.h:541
bool Replace(wxFindReplaceData &aSearchData)
Helper function used in search and replace dialog.
Definition: eda_text.cpp:144
bool IsVerticalOrientation() const
Definition: sch_sheet.cpp:284
void MirrorY(int aYaxis_position) override
Function MirrorY mirrors item relative to the Y axis about aYaxis_position.
Definition: sch_sheet.cpp:727
void SetPosition(const wxPoint &aPosition) override
Function SetPosition set the schematic item position to aPosition.
Definition: sch_sheet.cpp:737
KIGFX::COLOR4D m_backgroundColor
Definition: sch_sheet.h:234
EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
bool operator==(const SCH_SHEET_PIN *aPin) const
bool Matches(wxFindReplaceData &aSearchData, void *aAuxData) override
Function Matches compares the item against the search criteria in aSearchData.
Definition: sch_sheet.h:184
static bool ClassOf(const EDA_ITEM *aItem)
Definition: sch_sheet.h:247
SCH_SCREEN * m_screen
Screen that contains the physical data for the sheet.
Definition: sch_sheet.h:221
EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boards.
Definition: base_struct.h:166
void SwapData(SCH_ITEM *aItem) override
Function SwapData swap the internal data structures aItem with the schematic item.
BITMAP_DEF GetMenuImage() const override
Function GetMenuImage returns a pointer to an image to be used in menus.
Definition: sch_sheet.cpp:858
bool HasPin(const wxString &aName)
Checks if the sheet already has a sheet pin named aName.
Definition: sch_sheet.cpp:260
wxPoint GetRotationCenter() const
Rotating around the boundingBox's center can cause walking when the sheetname or filename is longer t...
Definition: sch_sheet.cpp:555
void Rotate(wxPoint aPosition) override
Function Rotate rotates the item around aPosition 90 degrees in the clockwise direction.
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
DANGLING_END_ITEM is a helper class used to store the state of schematic items that can be connected ...
Definition: sch_item.h:76
void AutoplaceFields(SCH_SCREEN *aScreen, bool aManual) override
Definition: sch_sheet.cpp:451
static bool ClassOf(const EDA_ITEM *aItem)
Definition: sch_sheet.h:103
SEARCH_RESULT
Definition: base_struct.h:54
virtual bool Matches(wxFindReplaceData &aSearchData, void *aAuxData)
Function Matches compares the item against the search criteria in aSearchData.
Definition: base_struct.h:473
SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:147
int GetPenSize() const override
Function GetPenSize virtual pure.
void Move(const wxPoint &aMoveVector) override
Function Move moves the item by aMoveVector to a new position.
Definition: sch_sheet.h:506
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition: eda_text.h:123
wxSize GetSize()
Definition: sch_sheet.h:284
SHEET_SIDE m_edge
Definition: sch_sheet.h:92
SCH_SHEET & operator=(const SCH_ITEM &aSheet)
Definition: sch_sheet.cpp:946
FIELDS_AUTOPLACED m_fieldsAutoplaced
Definition: sch_sheet.h:227
KICAD_T Type() const
Function Type()
Definition: base_struct.h:212
void Resize(const wxSize &aSize)
Resize this sheet to aSize and adjust all of the labels accordingly.
Definition: sch_sheet.cpp:745
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:40
bool HitTest(const wxPoint &aPosition, int aAccuracy) const override
Function HitTest tests if aPosition is contained within or on the bounding box of an item.
Definition: sch_sheet.cpp:864
void GetNetListItem(NETLIST_OBJECT_LIST &aNetListItems, SCH_SHEET_PATH *aSheetPath) override
Function GetNetListItem creates a new NETLIST_OBJECT for the schematic object and adds it to aNetList...
Definition: sch_sheet.cpp:887