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-2019 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 
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
43 #define MIN_SHEET_HEIGHT 150
44 
45 
56 {
62 };
63 
64 
76 {
77 private:
78  int m_number;
79 
84 
85 public:
86  SCH_SHEET_PIN( SCH_SHEET* parent,
87  const wxPoint& pos = wxPoint( 0, 0 ),
88  const wxString& text = wxEmptyString );
89 
90  // Do not create a copy constructor. The one generated by the compiler is adequate.
91 
93 
94  static inline bool ClassOf( const EDA_ITEM* aItem )
95  {
96  return aItem && SCH_SHEET_PIN_T == aItem->Type();
97  }
98 
99  wxString GetClass() const override
100  {
101  return wxT( "SCH_SHEET_PIN" );
102  }
103 
104  bool operator ==( const SCH_SHEET_PIN* aPin ) const;
105 
112  bool IsMovableFromAnchorPoint() override { return true; }
113 
114  void Print( wxDC* aDC, const wxPoint& aOffset ) override;
115 
122  void CreateGraphicShape( std::vector <wxPoint>& aPoints, const wxPoint& aPos ) override;
123 
124  void SwapData( SCH_ITEM* aItem ) override;
125 
126  int GetPenSize() const override;
127 
133  int GetNumber() const { return m_number; }
134 
140  void SetNumber( int aNumber );
141 
142  void SetEdge( SHEET_SIDE aEdge );
143 
144  SHEET_SIDE GetEdge() const;
145 
150  void ConstrainOnEdge( wxPoint Pos );
151 
158  SCH_SHEET* GetParent() const { return (SCH_SHEET*) m_Parent; }
159 
160 #if defined(DEBUG)
161  void Show( int nestLevel, std::ostream& os ) const override;
162 #endif
163 
164  // Geometric transforms (used in block operations):
165 
166  void Move( const wxPoint& aMoveVector ) override
167  {
168  Offset( aMoveVector );
169  }
170 
171  void MirrorX( int aXaxis_position ) override;
172  void MirrorY( int aYaxis_position ) override;
173  void Rotate( wxPoint aPosition ) override;
174 
175  bool Matches( wxFindReplaceData& aSearchData, void* aAuxData ) override
176  {
177  return SCH_ITEM::Matches( GetText(), aSearchData );
178  }
179 
180  bool Replace( wxFindReplaceData& aSearchData, void* aAuxData = NULL ) override
181  {
182  return EDA_TEXT::Replace( aSearchData );
183  }
184 
185  bool IsReplaceable() const override { return true; }
186 
187  void GetEndPoints( std::vector< DANGLING_END_ITEM >& aItemList ) override;
188 
189  bool IsConnectable() const override { return true; }
190 
191  wxString GetSelectMenuText( EDA_UNITS_T aUnits ) const override;
192 
193  BITMAP_DEF GetMenuImage() const override;
194 
195  void SetPosition( const wxPoint& aPosition ) override { ConstrainOnEdge( aPosition ); }
196 
197  bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override;
198 
199  EDA_ITEM* Clone() const override;
200 };
201 
202 
203 typedef boost::ptr_vector<SCH_SHEET_PIN> SCH_SHEET_PINS;
204 
205 
209 class SCH_SHEET : public SCH_ITEM
210 {
211  friend class SCH_SHEET_PIN;
212 
216 
219 
222  wxString m_fileName;
223 
226  wxString m_name;
227 
230 
233 
235  wxPoint m_pos;
236 
238  wxSize m_size;
239 
240 public:
241  SCH_SHEET( const wxPoint& pos = wxPoint( 0, 0 ) );
242 
247  SCH_SHEET( const SCH_SHEET& aSheet );
248 
249  ~SCH_SHEET();
250 
251  static inline bool ClassOf( const EDA_ITEM* aItem )
252  {
253  return aItem && SCH_SHEET_T == aItem->Type();
254  }
255 
256  wxString GetClass() const override
257  {
258  return wxT( "SCH_SHEET" );
259  }
260 
270  bool IsMovableFromAnchorPoint() override { return false; }
271 
272  wxString GetName() const { return m_name; }
273  void SetName( const wxString& aName ) { m_name = aName; }
274 
275  int GetSheetNameSize() const { return m_sheetNameSize; }
276  void SetSheetNameSize( int aSize ) { m_sheetNameSize = aSize; }
277 
278  int GetFileNameSize() const { return m_fileNameSize; }
279  void SetFileNameSize( int aSize ) { m_fileNameSize = aSize; }
280 
282 
283  wxSize GetSize() { return m_size; }
284  void SetSize( const wxSize& aSize ) { m_size = aSize; }
285 
296 
308  void SetScreen( SCH_SCREEN* aScreen );
309 
315  int GetScreenCount() const;
316 
317  void GetMsgPanelInfo( EDA_UNITS_T aUnits, std::vector< MSG_PANEL_ITEM >& aList ) override;
318 
319  /* there is no member for orientation in sch_sheet, to preserve file
320  * format, we detect orientation based on pin edges
321  */
322  bool IsVerticalOrientation() const;
323 
333  void AddPin( SCH_SHEET_PIN* aSheetPin );
334 
336 
338  {
339  return const_cast< SCH_SHEET_PINS& >( m_pins );
340  }
341 
347  void RemovePin( SCH_SHEET_PIN* aSheetPin );
348 
355  void CleanupSheet();
356 
364  SCH_SHEET_PIN* GetPin( const wxPoint& aPosition );
365 
373  bool HasPin( const wxString& aName );
374 
375  bool HasPins() { return !m_pins.empty(); }
376 
382  bool HasUndefinedPins();
383 
395  int GetMinWidth() const;
396 
407  int GetMinHeight() const;
408 
409  int GetPenSize() const override;
410 
411  void Print( wxDC* aDC, const wxPoint& aOffset ) override;
412 
413  EDA_RECT const GetBoundingBox() const override;
414 
420  wxPoint GetRotationCenter() const;
421 
422  void SwapData( SCH_ITEM* aItem ) override;
423 
429  int ComponentCount();
430 
438  bool SearchHierarchy( const wxString& aFilename, SCH_SCREEN** aScreen );
439 
450  bool LocatePathOfScreen( SCH_SCREEN* aScreen, SCH_SHEET_PATH* aList );
451 
457  int CountSheets();
458 
464  wxString GetFileName( void ) const;
465 
466  // Set a new filename without changing anything else
467  void SetFileName( const wxString& aFilename )
468  {
469  m_fileName = aFilename;
470  // Filenames are stored using unix notation
471  m_fileName.Replace( wxT("\\"), wxT("/") );
472  }
473 
474  bool ChangeFileName( SCH_EDIT_FRAME* aFrame, const wxString& aFileName );
475 
476  // Geometric transforms (used in block operations):
477 
478  void Move( const wxPoint& aMoveVector ) override
479  {
480  m_pos += aMoveVector;
481 
482  for( SCH_SHEET_PIN& pin : m_pins )
483  {
484  pin.Move( aMoveVector );
485  }
486  }
487 
488  void MirrorY( int aYaxis_position ) override;
489  void MirrorX( int aXaxis_position ) override;
490  void Rotate( wxPoint aPosition ) override;
491 
492  bool Matches( wxFindReplaceData& aSearchData, void* aAuxData ) override;
493 
494  bool Replace( wxFindReplaceData& aSearchData, void* aAuxData = NULL ) override;
495 
496  bool IsReplaceable() const override { return true; }
497 
503  void Resize( const wxSize& aSize );
504 
508  wxPoint GetSheetNamePosition();
509 
513  wxPoint GetFileNamePosition();
514 
515  void GetEndPoints( std::vector <DANGLING_END_ITEM>& aItemList ) override;
516 
517  bool UpdateDanglingState( std::vector<DANGLING_END_ITEM>& aItemList ) override;
518 
519  bool IsConnectable() const override { return true; }
520 
521  bool CanConnect( const SCH_ITEM* aItem ) const override
522  {
523  return ( aItem->Type() == SCH_LINE_T && aItem->GetLayer() == LAYER_WIRE ) ||
524  ( aItem->Type() == SCH_LINE_T && aItem->GetLayer() == LAYER_BUS ) ||
525  ( aItem->Type() == SCH_NO_CONNECT_T );
526  }
527 
528  void GetConnectionPoints( std::vector< wxPoint >& aPoints ) const override;
529 
530  SEARCH_RESULT Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] ) override;
531 
532  wxString GetSelectMenuText( EDA_UNITS_T aUnits ) const override;
533 
534  BITMAP_DEF GetMenuImage() const override;
535 
536  void GetNetListItem( NETLIST_OBJECT_LIST& aNetListItems,
537  SCH_SHEET_PATH* aSheetPath ) override;
538 
539  SCH_ITEM& operator=( const SCH_ITEM& aSheet );
540 
541  void ViewGetLayers( int aLayers[], int& aCount ) const override;
542 
543  wxPoint GetPosition() const override { return m_pos; }
544  void SetPosition( const wxPoint& aPosition ) override;
545 
546  bool HitTest( const wxPoint& aPosition, int aAccuracy ) const override;
547  bool HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy = 0 ) const override;
548 
549  void Plot( PLOTTER* aPlotter ) override;
550 
551  EDA_ITEM* Clone() const override;
552 
553 #if defined(DEBUG)
554  void Show( int nestLevel, std::ostream& os ) const override;
555 #endif
556 
557 protected:
558 
566  void renumberPins();
567 };
568 
569 
570 //typedef std::vector< SCH_SHEET* > SCH_SHEETS; // no ownership over contained SCH_SHEETs
571 
572 #endif // SCH_SHEEET_H
void Offset(const wxPoint &aOffset)
Definition: eda_text.h:237
SCH_ITEM & operator=(const SCH_ITEM &aSheet)
Definition: sch_sheet.cpp:972
Class LINE_READER is an abstract class from which implementation specific LINE_READERs may be derived...
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:437
EDA_ITEM * m_Parent
Linked list: Link (parent struct)
Definition: base_struct.h:180
void SetFileNameSize(int aSize)
Definition: sch_sheet.h:279
bool SearchHierarchy(const wxString &aFilename, SCH_SCREEN **aScreen)
Search the existing hierarchy for an instance of screen loaded from aFileName.
Definition: sch_sheet.cpp:559
SCH_SHEET_PIN * GetPin(const wxPoint &aPosition)
Return the sheet pin item found at aPosition in the sheet.
Definition: sch_sheet.cpp:381
BITMAP_DEF GetMenuImage() const override
Function GetMenuImage returns a pointer to an image to be used in menus.
SCH_SHEET_PINS & GetPins()
Definition: sch_sheet.h:335
SCH_SHEET * GetParent() const
Get the parent sheet object of this sheet pin.
Definition: sch_sheet.h:158
EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
wxString GetSelectMenuText(EDA_UNITS_T aUnits) const override
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
SCH_SHEET_PIN(SCH_SHEET *parent, const wxPoint &pos=wxPoint(0, 0), const wxString &text=wxEmptyString)
void SetFileName(const wxString &aFilename)
Definition: sch_sheet.h:467
void MirrorY(int aYaxis_position) override
Function MirrorY mirrors item relative to the Y axis about aYaxis_position.
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:774
bool Matches(wxFindReplaceData &aSearchData, void *aAuxData) override
Function Matches compares the item against the search criteria in aSearchData.
Definition: sch_sheet.cpp:736
int CountSheets()
Count the number of sheets found in "this" sheet includeing all of the subsheets.
Definition: sch_sheet.cpp:625
bool ChangeFileName(SCH_EDIT_FRAME *aFrame, const wxString &aFileName)
int m_sheetNameSize
The height of the text used to draw the sheet name.
Definition: sch_sheet.h:229
void SetScreen(SCH_SCREEN *aScreen)
Set the SCH_SCREEN associated with this sheet to aScreen.
Definition: sch_sheet.cpp:104
wxSize m_size
The size of the sheet.
Definition: sch_sheet.h:238
wxString GetClass() const override
Function GetClass returns the class name.
Definition: sch_sheet.h:99
wxString m_name
This is equivalent to the reference designator for components and is stored in F0 sheet pin in the sc...
Definition: sch_sheet.h:226
SCH_SHEET * GetRootSheet()
Return the root sheet of this SCH_SHEET object.
Definition: sch_sheet.cpp:136
int ComponentCount()
Count our own components, without the power components.
Definition: sch_sheet.cpp:529
bool IsConnectable() const override
Function IsConnectable returns true if the schematic item can connect to another schematic item.
Definition: sch_sheet.h:189
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:112
SHEET_SIDE GetEdge() const
Schematic editor (Eeschema) main window.
bool IsReplaceable() const override
Function IsReplaceable.
Definition: sch_sheet.h:185
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.
void Print(wxDC *aDC, const wxPoint &aOffset) override
Function Print Print a schematic item.
Definition: sch_sheet.cpp:447
int GetPenSize() const override
Function GetPenSize virtual pure.
Definition: sch_sheet.cpp:393
void MirrorX(int aXaxis_position) override
Function MirrorX mirrors item relative to the X axis about aXaxis_position.
wxPoint m_pos
The position of the sheet.
Definition: sch_sheet.h:235
SCH_SCREEN * GetScreen()
Definition: sch_sheet.h:281
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:177
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:180
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:78
wxString m_fileName
The file name is also in the SCH_SCREEN object associated with the sheet.
Definition: sch_sheet.h:222
Class NETLIST_OBJECT_LIST is a container holding and owning NETLIST_OBJECTs, which are connected item...
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:127
int GetFileNameSize() const
Definition: sch_sheet.h:278
void renumberPins()
Renumber the sheet pins in the sheet.
Definition: sch_sheet.cpp:762
wxString GetClass() const override
Function GetClass returns the class name.
Definition: sch_sheet.h:256
int GetSheetNameSize() const
Definition: sch_sheet.h:275
void RemovePin(SCH_SHEET_PIN *aSheetPin)
Remove aSheetPin from the sheet.
Definition: sch_sheet.cpp:187
bool IsConnectable() const override
Function IsConnectable returns true if the schematic item can connect to another schematic item.
Definition: sch_sheet.h:519
EDA_RECT const GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes.
Definition: sch_sheet.cpp:488
wxString GetName() const
Definition: sch_sheet.h:272
void MirrorX(int aXaxis_position) override
Function MirrorX mirrors item relative to the X axis about aXaxis_position.
Definition: sch_sheet.cpp:689
bool IsReplaceable() const override
Function IsReplaceable.
Definition: sch_sheet.h:496
bool HasPins()
Definition: sch_sheet.h:375
void SetSheetNameSize(int aSize)
Definition: sch_sheet.h:276
void SetName(const wxString &aName)
Definition: sch_sheet.h:273
SCH_SHEET_PINS & GetPins() const
Definition: sch_sheet.h:337
SCH_SHEET_PINS m_pins
The list of sheet connection points.
Definition: sch_sheet.h:218
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:270
int GetMinHeight() const
Return the minimum height that the sheet can be resized based on the sheet pin positions.
Definition: sch_sheet.cpp:311
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:806
void GetMsgPanelInfo(EDA_UNITS_T 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:652
void Move(const wxPoint &aMoveVector) override
Function Move moves the item by aMoveVector to a new position.
Definition: sch_sheet.h:166
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Definition: sch_sheet.h:75
Class SCH_SHEET_PATH.
int GetNumber() const
Get the sheet label number.
Definition: sch_sheet.h:133
void CleanupSheet()
Delete sheet label which do not have a corresponding hierarchical label.
Definition: sch_sheet.cpp:350
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:543
void Rotate(wxPoint aPosition) override
Function Rotate rotates the item around aPosition 90 degrees in the clockwise direction.
Definition: sch_sheet.cpp:665
wxPoint GetFileNamePosition()
Definition: sch_sheet.cpp:418
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:209
void SetSize(const wxSize &aSize)
Definition: sch_sheet.h:284
wxString GetFileName(void) const
Return the filename corresponding to this sheet.
Definition: sch_sheet.cpp:646
SCH_LAYER_ID GetLayer() const
Function GetLayer returns the layer this item is on.
Definition: sch_item.h:193
SCH_SHEET(const wxPoint &pos=wxPoint(0, 0))
Definition: sch_sheet.cpp:47
void GetConnectionPoints(std::vector< wxPoint > &aPoints) const override
Function GetConnectionPoints add all the connection points for this item to aPoints.
Definition: sch_sheet.cpp:799
bool HasUndefinedPins()
Check all sheet labels against schematic for undefined hierarchical labels.
Definition: sch_sheet.cpp:242
int GetMinWidth() const
Return the minimum width of the sheet based on the widths of the sheet pin text.
Definition: sch_sheet.cpp:271
void SetPosition(const wxPoint &aPosition) override
Function SetPosition set the schematic item position to aPosition.
Definition: sch_sheet.h:195
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:594
Base plotter engine class.
Definition: plotter.h:97
int m_fileNameSize
The height of the text used to draw the file name.
Definition: sch_sheet.h:232
void SwapData(SCH_ITEM *aItem) override
Function SwapData swap the internal data structures aItem with the schematic item.
Definition: sch_sheet.cpp:148
EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
Definition: sch_sheet.cpp:98
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:894
boost::ptr_vector< SCH_SHEET_PIN > SCH_SHEET_PINS
Definition: sch_sheet.h:203
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:78
bool CanConnect(const SCH_ITEM *aItem) const override
Definition: sch_sheet.h:521
bool Replace(wxFindReplaceData &aSearchData)
Helper function used in search and replace dialog performs a text replace using the find and replace ...
Definition: eda_text.cpp:159
bool IsVerticalOrientation() const
Definition: sch_sheet.cpp:221
void MirrorY(int aYaxis_position) override
Function MirrorY mirrors item relative to the Y axis about aYaxis_position.
Definition: sch_sheet.cpp:701
void SetPosition(const wxPoint &aPosition) override
Function SetPosition set the schematic item position to aPosition.
Definition: sch_sheet.cpp:712
wxPoint GetSheetNamePosition()
Definition: sch_sheet.cpp:399
Class 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:175
static bool ClassOf(const EDA_ITEM *aItem)
Definition: sch_sheet.h:251
SCH_SCREEN * m_screen
Screen that contains the physical data for the sheet.
Definition: sch_sheet.h:215
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:163
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:840
bool HasPin(const wxString &aName)
Checks if the sheet already has a sheet pin named aName.
Definition: sch_sheet.cpp:209
wxPoint GetRotationCenter() const
Rotating around the boundingBox's center can cause walking when the sheetname or filename is longer t...
Definition: sch_sheet.cpp:522
void Rotate(wxPoint aPosition) override
Function Rotate rotates the item around aPosition 90 degrees in the clockwise direction.
wxString GetSelectMenuText(EDA_UNITS_T aUnits) const override
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
Definition: sch_sheet.cpp:834
Class DANGLING_END_ITEM is a helper class used to store the state of schematic items that can be conn...
Definition: sch_item.h:67
static bool ClassOf(const EDA_ITEM *aItem)
Definition: sch_sheet.h:94
SEARCH_RESULT
Definition: base_struct.h:54
bool UpdateDanglingState(std::vector< DANGLING_END_ITEM > &aItemList) override
Function IsDanglingStateChanged tests the schematic item to aItemList to check if it's dangling state...
Definition: sch_sheet.cpp:788
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.cpp:756
virtual bool Matches(wxFindReplaceData &aSearchData, void *aAuxData)
Function Matches compares the item against the search criteria in aSearchData.
Definition: base_struct.h:512
Class SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container clas...
Definition: sch_item.h:114
int GetPenSize() const override
Function GetPenSize virtual pure.
Definitions of the SCH_TEXT class and derivatives for Eeschema.
void Move(const wxPoint &aMoveVector) override
Function Move moves the item by aMoveVector to a new position.
Definition: sch_sheet.h:478
virtual const wxString & GetText() const
Function GetText returns the string associated with the text object.
Definition: eda_text.h:124
wxSize GetSize()
Definition: sch_sheet.h:283
EDA_UNITS_T
Definition: common.h:133
SHEET_SIDE m_edge
Definition: sch_sheet.h:83
KICAD_T Type() const
Function Type()
Definition: base_struct.h:210
void Resize(const wxSize &aSize)
Resize this sheet to aSize and adjust all of the labels accordingly.
Definition: sch_sheet.cpp:721
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:846
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:869