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-2017 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 
30 #ifndef SCH_SHEEET_H
31 #define SCH_SHEEET_H
32 
33 #include <boost/ptr_container/ptr_vector.hpp>
34 #include <sch_text.h>
35 
36 
37 class LINE_READER;
38 class SCH_SCREEN;
39 class SCH_SHEET;
40 class SCH_SHEET_PIN;
41 class SCH_SHEET_PATH;
42 class DANGLING_END_ITEM;
43 class SCH_EDIT_FRAME;
45 
46 
47 #define MIN_SHEET_WIDTH 500
48 #define MIN_SHEET_HEIGHT 150
49 
50 
63 {
64 public:
75  {
81  };
82 
83 private:
84  int m_number;
85 
90 
91 public:
92  SCH_SHEET_PIN( SCH_SHEET* parent,
93  const wxPoint& pos = wxPoint( 0, 0 ),
94  const wxString& text = wxEmptyString );
95 
96  // Do not create a copy constructor. The one generated by the compiler is adequate.
97 
99 
100  wxString GetClass() const override
101  {
102  return wxT( "SCH_SHEET_PIN" );
103  }
104 
105  bool operator ==( const SCH_SHEET_PIN* aPin ) const;
106 
113  bool IsMovableFromAnchorPoint() override { return true; }
114 
115  void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
116  GR_DRAWMODE aDrawMode, COLOR4D aColor = COLOR4D::UNSPECIFIED ) override;
117 
124  void CreateGraphicShape( std::vector <wxPoint>& aPoints, const wxPoint& aPos ) override;
125 
126  void SwapData( SCH_ITEM* aItem ) override;
127 
128  int GetPenSize() const override;
129 
135  int GetNumber() const { return m_number; }
136 
142  void SetNumber( int aNumber );
143 
144  void SetEdge( SHEET_SIDE aEdge );
145 
146  SHEET_SIDE GetEdge() const;
147 
153  void ConstrainOnEdge( wxPoint Pos );
154 
161  SCH_SHEET* GetParent() const { return (SCH_SHEET*) m_Parent; }
162 
163  bool Save( FILE* aFile ) const override;
164 
165  bool Load( LINE_READER& aLine, wxString& aErrorMsg ) override;
166 
167 #if defined(DEBUG)
168  void Show( int nestLevel, std::ostream& os ) const override;
169 #endif
170 
171  // Geometric transforms (used in block operations):
172 
173  void Move( const wxPoint& aMoveVector ) override
174  {
175  Offset( aMoveVector );
176  }
177 
178  void MirrorY( int aYaxis_position ) override;
179 
180  void Rotate( wxPoint aPosition ) override;
181 
182  void MirrorX( int aXaxis_position ) override;
183 
184  bool Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint* aFindLocation ) override;
185 
186  bool Replace( wxFindReplaceData& aSearchData, void* aAuxData = NULL ) override
187  {
188  return EDA_ITEM::Replace( aSearchData, m_Text );
189  }
190 
191  bool IsReplaceable() const override { return true; }
192 
193  void GetEndPoints( std::vector< DANGLING_END_ITEM >& aItemList ) override;
194 
195  bool IsConnectable() const override { return true; }
196 
197  wxString GetSelectMenuText() const override;
198 
199  BITMAP_DEF GetMenuImage() const override;
200 
201  void SetPosition( const wxPoint& aPosition ) override { ConstrainOnEdge( aPosition ); }
202 
203  bool HitTest( const wxPoint& aPosition, int aAccuracy ) const override;
204 
205  EDA_ITEM* Clone() const override;
206 };
207 
208 
209 typedef boost::ptr_vector<SCH_SHEET_PIN> SCH_SHEET_PINS;
210 
211 
216 class SCH_SHEET : public SCH_ITEM
217 {
218  friend class SCH_SHEET_PIN;
219 
223 
225  SCH_SHEET_PINS m_pins;
226 
229  wxString m_fileName;
230 
233  wxString m_name;
234 
237 
240 
243 
245  wxSize m_size;
246 
247 public:
248  SCH_SHEET( const wxPoint& pos = wxPoint( 0, 0 ) );
249 
255  SCH_SHEET( const SCH_SHEET& aSheet );
256 
257  ~SCH_SHEET();
258 
259  wxString GetClass() const override
260  {
261  return wxT( "SCH_SHEET" );
262  }
263 
272  bool IsMovableFromAnchorPoint() override { return false; }
273 
274  wxString GetName() const { return m_name; }
275 
276  void SetName( const wxString& aName ) { m_name = aName; }
277 
278  int GetSheetNameSize() const { return m_sheetNameSize; }
279 
280  void SetSheetNameSize( int aSize ) { m_sheetNameSize = aSize; }
281 
282  int GetFileNameSize() const { return m_fileNameSize; }
283 
284  void SetFileNameSize( int aSize ) { m_fileNameSize = aSize; }
285 
287 
288  wxSize GetSize() { return m_size; }
289 
290  void SetSize( const wxSize& aSize ) { m_size = aSize; }
291 
304 
317  void SetScreen( SCH_SCREEN* aScreen );
318 
324  int GetScreenCount() const;
325 
326  bool Save( FILE* aFile ) const override;
327 
328  bool Load( LINE_READER& aLine, wxString& aErrorMsg ) override;
329 
330  void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) override;
331 
332  /* there is no member for orientation in sch_sheet, to preserve file
333  * format, we detect orientation based on pin edges
334  */
335  bool IsVerticalOrientation() const;
336 
346  void AddPin( SCH_SHEET_PIN* aSheetPin );
347 
348  SCH_SHEET_PINS& GetPins() { return m_pins; }
349 
350  SCH_SHEET_PINS& GetPins() const
351  {
352  return const_cast< SCH_SHEET_PINS& >( m_pins );
353  }
354 
360  void RemovePin( SCH_SHEET_PIN* aSheetPin );
361 
368  void CleanupSheet();
369 
377  SCH_SHEET_PIN* GetPin( const wxPoint& aPosition );
378 
386  bool HasPin( const wxString& aName );
387 
388  bool HasPins() { return !m_pins.empty(); }
389 
395  bool HasUndefinedPins();
396 
411  int GetMinWidth() const;
412 
427  int GetMinHeight() const;
428 
429  int GetPenSize() const override;
430 
431  void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
432  GR_DRAWMODE aDrawMode, COLOR4D aColor = COLOR4D::UNSPECIFIED ) override;
433 
434  EDA_RECT const GetBoundingBox() const override;
435 
442  wxPoint GetResizePosition() const;
443 
444  void SwapData( SCH_ITEM* aItem ) override;
445 
451  int ComponentCount();
452 
463  bool Load( SCH_EDIT_FRAME* aFrame );
464 
472  bool SearchHierarchy( const wxString& aFilename, SCH_SCREEN** aScreen );
473 
485  bool LocatePathOfScreen( SCH_SCREEN* aScreen, SCH_SHEET_PATH* aList );
486 
493  int CountSheets();
494 
500  wxString GetFileName( void ) const;
501 
502  // Set a new filename without changing anything else
503  void SetFileName( const wxString& aFilename )
504  {
505  m_fileName = aFilename;
506  // Filenames are stored using unix notation
507  m_fileName.Replace( wxT("\\"), wxT("/") );
508  }
509 
510  bool ChangeFileName( SCH_EDIT_FRAME* aFrame, const wxString& aFileName );
511 
512  //void RemoveSheet(SCH_SHEET* sheet);
513  //to remove a sheet, just delete it
514  //-- the destructor should take care of everything else.
515 
516  // Geometric transforms (used in block operations):
517 
518  void Move( const wxPoint& aMoveVector ) override
519  {
520  m_pos += aMoveVector;
521 
522  for( SCH_SHEET_PIN& pin : m_pins )
523  {
524  pin.Move( aMoveVector );
525  }
526  }
527 
528  void MirrorY( int aYaxis_position ) override;
529 
530  void MirrorX( int aXaxis_position ) override;
531 
532  void Rotate( wxPoint aPosition ) override;
533 
534  bool Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint* aFindLocation ) override;
535 
536  bool Replace( wxFindReplaceData& aSearchData, void* aAuxData = NULL ) override;
537 
538  bool IsReplaceable() const override { return true; }
539 
545  void Resize( const wxSize& aSize );
546 
552 
558 
559  void GetEndPoints( std::vector <DANGLING_END_ITEM>& aItemList ) override;
560 
561  bool IsDanglingStateChanged( std::vector< DANGLING_END_ITEM >& aItemList ) override;
562 
563  bool IsDangling() const override;
564 
565  bool IsSelectStateChanged( const wxRect& aRect ) override;
566 
567  bool IsConnectable() const override { return true; }
568 
569  void GetConnectionPoints( std::vector< wxPoint >& aPoints ) const override;
570 
571  SEARCH_RESULT Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] ) override;
572 
573  wxString GetSelectMenuText() const override;
574 
575  BITMAP_DEF GetMenuImage() const override;
576 
577  void GetNetListItem( NETLIST_OBJECT_LIST& aNetListItems,
578  SCH_SHEET_PATH* aSheetPath ) override;
579 
580  SCH_ITEM& operator=( const SCH_ITEM& aSheet );
581 
582  wxPoint GetPosition() const override { return m_pos; }
583 
584  void SetPosition( const wxPoint& aPosition ) override;
585 
586  bool HitTest( const wxPoint& aPosition, int aAccuracy ) const override;
587 
588  bool HitTest( const EDA_RECT& aRect, bool aContained = false, int aAccuracy = 0 ) const override;
589 
590  void Plot( PLOTTER* aPlotter ) override;
591 
592  EDA_ITEM* Clone() const override;
593 
594 #if defined(DEBUG)
595  void Show( int nestLevel, std::ostream& os ) const override;
596 #endif
597 
598 protected:
599 
607  void renumberPins();
608 };
609 
610 
611 typedef std::vector< SCH_SHEET* > SCH_SHEETS; // no ownership over contained SCH_SHEETs
612 
613 #endif // SCH_SHEEET_H
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...
void Offset(const wxPoint &aOffset)
Definition: eda_text.h:229
SCH_ITEM & operator=(const SCH_ITEM &aSheet)
Definition: sch_sheet.cpp:1248
bool Load(LINE_READER &aLine, wxString &aErrorMsg) override
Function Load reads a schematic item from aLine in a .sch file.
Definition: sch_sheet.cpp:188
Class LINE_READER is an abstract class from which implementation specific LINE_READERs may be derived...
Definition: richio.h:81
EDA_ITEM * m_Parent
Linked list: Link (parent struct)
Definition: base_struct.h:182
void SetFileNameSize(int aSize)
Definition: sch_sheet.h:284
bool SearchHierarchy(const wxString &aFilename, SCH_SCREEN **aScreen)
Function SearchHierarchy search the existing hierarchy for an instance of screen "FileName".
Definition: sch_sheet.cpp:744
SCH_SHEET_PIN * GetPin(const wxPoint &aPosition)
Return the sheet pin item found at aPosition in the sheet.
Definition: sch_sheet.cpp:552
SCH_SHEET * GetParent() const
Get the parent sheet object of this sheet pin.
Definition: sch_sheet.h:161
bool IsDangling() const override
Definition: sch_sheet.cpp:1041
std::vector< SCH_SHEET * > SCH_SHEETS
Definition: sch_sheet.h:611
wxString m_Text
Definition: eda_text.h:346
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:348
PNG memory record (file in memory).
Definition: bitmap_types.h:38
EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
SCH_SHEET_PIN(SCH_SHEET *parent, const wxPoint &pos=wxPoint(0, 0), const wxString &text=wxEmptyString)
bool Replace(wxFindReplaceData &aSearchData, wxString &aText)
Helper function used in search and replace dialog Function Replace performs a text replace on aText u...
void SetFileName(const wxString &aFilename)
Definition: sch_sheet.h:503
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:1014
int CountSheets()
Function CountSheets calculates the number of sheets found in "this" this number includes the full su...
Definition: sch_sheet.cpp:859
int GetMinHeight() const
Function GetMinHeight returns the minimum height that the sheet can be resized based on the sheet pin...
Definition: sch_sheet.cpp:482
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:236
void SetScreen(SCH_SCREEN *aScreen)
Function SetScreen sets the screen associated with this sheet to aScreen.
Definition: sch_sheet.cpp:103
wxPoint GetResizePosition() const
Function GetResizePos returns the position of the lower right corner of the sheet in drawing units...
Definition: sch_sheet.cpp:1140
SHEET_SIDE GetEdge() const
bool IsDanglingStateChanged(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:1028
wxSize m_size
The size of the sheet.
Definition: sch_sheet.h:245
wxString GetClass() const override
Function GetClass returns the class name.
Definition: sch_sheet.h:100
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:233
SCH_SHEET * GetRootSheet()
Function GetRootSheet.
Definition: sch_sheet.cpp:135
int ComponentCount()
Function ComponentCount count our own components, without the power components.
Definition: sch_sheet.cpp:714
bool IsConnectable() const override
Function IsConnectable returns true if the schematic item can connect to another schematic item...
Definition: sch_sheet.h:195
bool IsMovableFromAnchorPoint() override
Virtual function IsMovableFromAnchorPoint Return true for items which are moved with the anchor point...
Definition: sch_sheet.h:113
Schematic editor (Eeschema) main window.
Definition: schframe.h:117
bool Save(FILE *aFile) const override
Function Save writes the data structures for this object out to a FILE in "*.sch" format...
bool IsReplaceable() const override
Function IsReplaceable.
Definition: sch_sheet.h:191
void GetMsgPanelInfo(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:886
bool Matches(wxFindReplaceData &aSearchData, void *aAuxData, wxPoint *aFindLocation) override
Function Matches compares the item against the search criteria in aSearchData.
Definition: sch_sheet.cpp:970
bool operator==(const SCH_SHEET_PIN *aPin) const
int GetPenSize() const override
Function GetPenSize virtual pure.
Definition: sch_sheet.cpp:564
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:242
SCH_SCREEN * GetScreen()
Definition: sch_sheet.h:286
void AddPin(SCH_SHEET_PIN *aSheetPin)
Add aSheetPin to the sheet.
Definition: sch_sheet.cpp:358
void CreateGraphicShape(std::vector< wxPoint > &aPoints, const wxPoint &aPos) override
Function CreateGraphicShape (virtual) Calculates 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:186
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:90
wxString m_fileName
The file name is also in the SCH_SCREEN object associated with the sheet.
Definition: sch_sheet.h:229
Class NETLIST_OBJECT_LIST is a container holding and owning NETLIST_OBJECTs, which are connected item...
const INSPECTOR_FUNC & INSPECTOR
Definition: base_struct.h:118
int GetSheetNameSize() const
Definition: sch_sheet.h:278
void renumberPins()
Renumber the sheet pins in the sheet.
Definition: sch_sheet.cpp:1002
wxString GetClass() const override
Function GetClass returns the class name.
Definition: sch_sheet.h:259
void RemovePin(SCH_SHEET_PIN *aSheetPin)
Remove aSheetPin from the sheet.
Definition: sch_sheet.cpp:368
bool IsConnectable() const override
Function IsConnectable returns true if the schematic item can connect to another schematic item...
Definition: sch_sheet.h:567
EDA_RECT const GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes...
Definition: sch_sheet.cpp:680
void MirrorX(int aXaxis_position) override
Function MirrorX mirrors item relative to the X axis about aXaxis_position.
Definition: sch_sheet.cpp:923
bool IsReplaceable() const override
Function IsReplaceable.
Definition: sch_sheet.h:538
bool HasPins()
Definition: sch_sheet.h:388
void SetSheetNameSize(int aSize)
Definition: sch_sheet.h:280
void SetName(const wxString &aName)
Definition: sch_sheet.h:276
SCH_SHEET_PINS m_pins
The list of sheet connection points.
Definition: sch_sheet.h:225
GR_DRAWMODE
Drawmode. Compositing mode plus a flag or two.
Definition: gr_basic.h:41
bool IsMovableFromAnchorPoint() override
Virtual function IsMovableFromAnchorPoint Return true for items which are moved with the anchor point...
Definition: sch_sheet.h:272
bool Load(LINE_READER &aLine, wxString &aErrorMsg) override
Function Load reads a schematic item from aLine in a .sch file.
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:1076
int GetNumber() const
Get the sheet label number.
Definition: sch_sheet.h:135
int GetFileNameSize() const
Definition: sch_sheet.h:282
void Move(const wxPoint &aMoveVector) override
Function Move moves the item by aMoveVector to a new position.
Definition: sch_sheet.h:173
wxString GetSelectMenuText() const override
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
Definition: sch_sheet.cpp:1103
Class SCH_SHEET_PIN defines a sheet pin (label) used in sheets to create hierarchical schematics...
Definition: sch_sheet.h:62
Class SCH_SHEET_PATH.
int GetScreenCount() const
Function GetScreenCount returns the number of times the associated screen for the sheet is being used...
Definition: sch_sheet.cpp:126
void CleanupSheet()
Delete sheet label which do not have a corresponding hierarchical label.
Definition: sch_sheet.cpp:521
void ConstrainOnEdge(wxPoint Pos)
Function ConstrainOnEdge is used to adjust label position to edge based on proximity to vertical / ho...
wxPoint GetPosition() const override
Function GetPosition.
Definition: sch_sheet.h:582
void Rotate(wxPoint aPosition) override
Function Rotate rotates the item around aPosition 90 degrees in the clockwise direction.
Definition: sch_sheet.cpp:899
wxString GetFileName(void) const
Function GetFileName return the filename corresponding to this sheet.
Definition: sch_sheet.cpp:880
wxPoint GetFileNamePosition()
Function GetFileNamePosition.
Definition: sch_sheet.cpp:588
Class SCH_SHEET is the sheet symbol placed in a schematic, and is the entry point for a sub schematic...
Definition: sch_sheet.h:216
void SetSize(const wxSize &aSize)
Definition: sch_sheet.h:290
wxString GetSelectMenuText() const override
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
SCH_SHEET(const wxPoint &pos=wxPoint(0, 0))
Definition: sch_sheet.cpp:46
void Draw(EDA_DRAW_PANEL *aPanel, wxDC *aDC, const wxPoint &aOffset, GR_DRAWMODE aDrawMode, COLOR4D aColor=COLOR4D::UNSPECIFIED) override
Function Draw Draw a schematic item.
void GetConnectionPoints(std::vector< wxPoint > &aPoints) const override
Function GetConnectionPoints add all the connection points for this item to aPoints.
Definition: sch_sheet.cpp:1069
bool HasUndefinedPins()
Check all sheet labels against schematic for undefined hierarchical labels.
Definition: sch_sheet.cpp:413
void SetPosition(const wxPoint &aPosition) override
Function SetPosition set the schematic item position to aPosition.
Definition: sch_sheet.h:201
bool LocatePathOfScreen(SCH_SCREEN *aScreen, SCH_SHEET_PATH *aList)
Function LocatePathOfScreen search the existing hierarchy for an instance of screen "FileName"...
Definition: sch_sheet.cpp:775
Base plotter engine class.
Definition: plot_common.h:86
void Draw(EDA_DRAW_PANEL *aPanel, wxDC *aDC, const wxPoint &aOffset, GR_DRAWMODE aDrawMode, COLOR4D aColor=COLOR4D::UNSPECIFIED) override
Function Draw Draw a schematic item.
Definition: sch_sheet.cpp:607
int m_fileNameSize
The height of the text used to draw the file name.
Definition: sch_sheet.h:239
void SwapData(SCH_ITEM *aItem) override
Function SwapData swap the internal data structures aItem with the schematic item.
Definition: sch_sheet.cpp:329
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:74
EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
Definition: sch_sheet.cpp:97
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:1170
boost::ptr_vector< SCH_SHEET_PIN > SCH_SHEET_PINS
Definition: sch_sheet.h:209
bool Matches(wxFindReplaceData &aSearchData, void *aAuxData, wxPoint *aFindLocation) override
Function Matches compares the item against the search criteria in aSearchData.
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:84
int GetMinWidth() const
Function GetMinWidth returns the minimum width of the sheet based on the widths of the sheet pin text...
Definition: sch_sheet.cpp:442
void MirrorY(int aYaxis_position) override
Function MirrorY mirrors item relative to the Y axis about aYaxis_position.
Definition: sch_sheet.cpp:935
void SetPosition(const wxPoint &aPosition) override
Function SetPosition set the schematic item position to aPosition.
Definition: sch_sheet.cpp:946
wxPoint GetSheetNamePosition()
Function GetSheetNamePosition.
Definition: sch_sheet.cpp:570
Class EDA_RECT handles the component boundary box.
SCH_SCREEN * m_screen
Screen that contains the physical data for the sheet.
Definition: sch_sheet.h:222
SCH_SHEET_PINS & GetPins() const
Definition: sch_sheet.h:350
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:165
bool IsVerticalOrientation() const
Definition: sch_sheet.cpp:402
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:1111
bool HasPin(const wxString &aName)
Checks if the sheet already has a sheet pin named aName.
Definition: sch_sheet.cpp:390
void Rotate(wxPoint aPosition) override
Function Rotate rotates the item around aPosition 90 degrees in the clockwise direction.
bool Save(FILE *aFile) const override
Function Save writes the data structures for this object out to a FILE in "*.sch" format...
Definition: sch_sheet.cpp:147
Class DANGLING_END_ITEM is a helper class used to store the state of schematic items that can be conn...
SEARCH_RESULT
Definition: base_struct.h:82
bool IsSelectStateChanged(const wxRect &aRect) override
Function IsSelectStateChanged checks if the selection state of an item inside aRect has changed...
Definition: sch_sheet.cpp:1054
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:996
wxString GetName() const
Definition: sch_sheet.h:274
Class SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container clas...
int GetPenSize() const override
Function GetPenSize virtual pure.
Implementation of the label properties dialog.
void Move(const wxPoint &aMoveVector) override
Function Move moves the item by aMoveVector to a new position.
Definition: sch_sheet.h:518
wxSize GetSize()
Definition: sch_sheet.h:288
SHEET_SIDE m_edge
Definition: sch_sheet.h:89
void Resize(const wxSize &aSize)
Resize this sheet to aSize and adjust all of the labels accordingly.
Definition: sch_sheet.cpp:955
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39
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:1117
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:1146