KiCad PCB EDA Suite
class_board.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) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
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 CLASS_BOARD_H_
31 #define CLASS_BOARD_H_
32 
33 
34 #include <dlist.h>
35 #include <core/iterators.h>
36 
37 #include <common.h> // PAGE_INFO
39 #include <class_netinfo.h>
40 #include <class_pad.h>
43 #include <class_title_block.h>
44 #include <class_zone_settings.h>
45 #include <pcb_plot_params.h>
46 #include <board_item_container.h>
47 
48 #include <memory>
49 
50 using std::unique_ptr;
51 
52 class PCB_BASE_FRAME;
53 class PCB_EDIT_FRAME;
54 class PICKED_ITEMS_LIST;
55 class BOARD;
56 class ZONE_CONTAINER;
57 class SEGZONE;
58 class TRACK;
59 class D_PAD;
60 class MARKER_PCB;
61 class MSG_PANEL_ITEM;
62 class NETLIST;
63 class REPORTER;
64 class SHAPE_POLY_SET;
65 class CONNECTIVITY_DATA;
66 
71 enum LAYER_T
72 {
78 };
79 
80 
85 struct LAYER
86 {
88  {
89  clear();
90  }
91 
92  void clear()
93  {
94  m_type = LT_SIGNAL;
95  m_visible = true;
96  m_number = 0;
97  m_name.clear();
98  }
99 
100  /*
101  LAYER( const wxString& aName = wxEmptyString,
102  LAYER_T aType = LT_SIGNAL, bool aVisible = true, int aNumber = -1 ) :
103  m_name( aName ),
104  m_type( aType ),
105  m_visible( aVisible ),
106  m_number( aNumber )
107  {
108  }
109  */
110 
111  wxString m_name;
112 
114 
115  bool m_visible;
116 
117  int m_number;
118 
125  static const char* ShowType( LAYER_T aType );
126 
134  static LAYER_T ParseType( const char* aType );
135 };
136 
137 
138 // Helper class to handle high light nets
140 {
141  friend class BOARD;
142 
143 protected:
144  int m_netCode; // net selected for highlight (-1 when no net selected )
145  bool m_highLightOn; // highlight active
146 
147  void Clear()
148  {
149  m_netCode = -1;
150  m_highLightOn = false;
151  }
152 
154  {
155  Clear();
156  }
157 };
158 
159 
160 DECL_VEC_FOR_SWIG(MARKERS, MARKER_PCB*)
161 DECL_VEC_FOR_SWIG(ZONE_CONTAINERS, ZONE_CONTAINER*)
162 DECL_VEC_FOR_SWIG(TRACKS, TRACK*)
163 
164 
170 {
171  friend class PCB_EDIT_FRAME;
172 
173 private:
175  wxString m_fileName;
176 
178  MARKERS m_markers;
179 
181  ZONE_CONTAINERS m_ZoneDescriptorList;
182 
184 
185  // if true m_highLight_NetCode is used
186  HIGH_LIGHT_INFO m_highLight; // current high light data
187  HIGH_LIGHT_INFO m_highLightPrevious; // a previously stored high light data
188 
190 
192  std::shared_ptr<CONNECTIVITY_DATA> m_connectivity;
193 
200 
210  void chainMarkedSegments( wxPoint aPosition, const LSET& aLayerSet, TRACKS* aList );
211 
212  // The default copy constructor & operator= are inadequate,
213  // either write one or do not use it at all
214  BOARD( const BOARD& aOther ) :
215  BOARD_ITEM_CONTAINER( aOther ), m_NetInfo( this )
216  {
217  assert( false );
218  }
219 
220  BOARD& operator=( const BOARD& aOther )
221  {
222  assert( false );
223  return *this; // just to mute warning
224  }
225 
226 public:
227  static inline bool ClassOf( const EDA_ITEM* aItem )
228  {
229  return aItem && PCB_T == aItem->Type();
230  }
231 
232  void SetFileName( const wxString& aFileName ) { m_fileName = aFileName; }
233 
234  const wxString &GetFileName() const { return m_fileName; }
235 
238 
239 
240 private:
241  DLIST<BOARD_ITEM> m_Drawings; // linked list of lines & texts
242 
243 public:
244 
245  DLIST<MODULE> m_Modules; // linked list of MODULEs
246  DLIST<TRACK> m_Track; // linked list of TRACKs and VIAs
247  DLIST<SEGZONE> m_Zone; // linked list of SEGZONEs
248 
252  ZONE_CONTAINERS& Zones() { return m_ZoneDescriptorList; }
253 
254 
255  // will be deprecated as soon as append board functionality is fixed
256  DLIST<BOARD_ITEM>& DrawingsList() { return m_Drawings; }
257 
260 
261  BOARD();
262  ~BOARD();
263 
264  virtual const wxPoint& GetPosition() const override;
265 
266  virtual void SetPosition( const wxPoint& aPos ) override;
267 
268  bool IsEmpty() const
269  {
270  return m_Drawings.GetCount() == 0 && m_Modules.GetCount() == 0 &&
271  m_Track.GetCount() == 0 && m_Zone.GetCount() == 0;
272  }
273 
274  void Move( const wxPoint& aMoveVector ) override;
275 
276  void SetFileFormatVersionAtLoad( int aVersion ) { m_fileFormatVersionAtLoad = aVersion; }
277  int GetFileFormatVersionAtLoad() const { return m_fileFormatVersionAtLoad; }
278 
279  void Add( BOARD_ITEM* aItem, ADD_MODE aMode = ADD_INSERT ) override;
280 
281  void Remove( BOARD_ITEM* aBoardItem ) override;
282 
283  BOARD_ITEM* Duplicate( const BOARD_ITEM* aItem, bool aAddToBoard = false );
284 
290  std::shared_ptr<CONNECTIVITY_DATA> GetConnectivity() const
291  {
292  return m_connectivity;
293  }
294 
299  void DeleteMARKERs();
300 
305  void DeleteZONEOutlines();
306 
313  MARKER_PCB* GetMARKER( int index ) const
314  {
315  if( (unsigned) index < m_markers.size() )
316  return m_markers[index];
317 
318  return NULL;
319  }
320 
325  int GetMARKERCount() const
326  {
327  return (int) m_markers.size();
328  }
329 
334  void SetAuxOrigin( const wxPoint& aPoint ) { m_designSettings.m_AuxOrigin = aPoint; }
335  const wxPoint& GetAuxOrigin() const { return m_designSettings.m_AuxOrigin; }
336 
341  void SetGridOrigin( const wxPoint& aPoint ) { m_designSettings.m_GridOrigin = aPoint; }
342  const wxPoint& GetGridOrigin() const { return m_designSettings.m_GridOrigin; }
343 
349  {
350  m_highLight.Clear();
351  m_highLightPrevious.Clear();
352  }
353 
358  int GetHighLightNetCode() const { return m_highLight.m_netCode; }
359 
364  void SetHighLightNet( int aNetCode)
365  {
366  m_highLight.m_netCode = aNetCode;
367  }
368 
373  bool IsHighLightNetON() const { return m_highLight.m_highLightOn; }
374 
379  void HighLightOFF() { m_highLight.m_highLightOn = false; }
380 
386  void HighLightON() { m_highLight.m_highLightOn = true; }
387 
392  void PushHighLight();
393 
398  void PopHighLight();
399 
404  int GetCopperLayerCount() const;
405 
406  void SetCopperLayerCount( int aCount );
407 
414  LSET GetEnabledLayers() const;
415 
422  void SetEnabledLayers( LSET aLayerMask );
423 
431  bool IsLayerEnabled( PCB_LAYER_ID aLayer ) const
432  {
433  return m_designSettings.IsLayerEnabled( aLayer );
434  }
435 
443  bool IsLayerVisible( PCB_LAYER_ID aLayer ) const
444  {
445  return m_designSettings.IsLayerVisible( aLayer );
446  }
447 
454  LSET GetVisibleLayers() const;
455 
462  void SetVisibleLayers( LSET aLayerMask );
463 
464  // these 2 functions are not tidy at this time, since there are PCB_LAYER_IDs that
465  // are not stored in the bitmap.
466 
474  int GetVisibleElements() const;
475 
483  void SetVisibleElements( int aMask );
484 
490  void SetVisibleAlls();
491 
500  bool IsElementVisible( GAL_LAYER_ID LAYER_aPCB ) const;
501 
509  void SetElementVisibility( GAL_LAYER_ID LAYER_aPCB, bool aNewState );
510 
518  bool IsModuleLayerVisible( PCB_LAYER_ID layer );
519 
525  COLOR4D GetVisibleElementColor( GAL_LAYER_ID LAYER_aPCB );
526 
527  void SetVisibleElementColor( GAL_LAYER_ID LAYER_aPCB, COLOR4D aColor );
528 
534  {
535  // remove const-ness with cast.
536  return (BOARD_DESIGN_SETTINGS&) m_designSettings;
537  }
538 
543  void SetDesignSettings( const BOARD_DESIGN_SETTINGS& aDesignSettings )
544  {
545  m_designSettings = aDesignSettings;
546  }
547 
548  const PAGE_INFO& GetPageSettings() const { return m_paper; }
549  void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
550 
551  const PCB_PLOT_PARAMS& GetPlotOptions() const { return m_plotOptions; }
552  void SetPlotOptions( const PCB_PLOT_PARAMS& aOptions ) { m_plotOptions = aOptions; }
553 
554  TITLE_BLOCK& GetTitleBlock() { return m_titles; }
555  void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
556 
557  const ZONE_SETTINGS& GetZoneSettings() const { return m_zoneSettings; }
558  void SetZoneSettings( const ZONE_SETTINGS& aSettings ) { m_zoneSettings = aSettings; }
559 
564  COLORS_DESIGN_SETTINGS* GetColorsSettings() const { return m_colorsSettings; }
565 
570  void SetColorsSettings( COLORS_DESIGN_SETTINGS* aColorsSettings )
571  {
572  m_colorsSettings = aColorsSettings;
573  }
574 
587  bool GetBoardPolygonOutlines( SHAPE_POLY_SET& aOutlines,
588  wxString* aErrorText = NULL );
589 
601  void ConvertBrdLayerToPolygonalContours( PCB_LAYER_ID aLayer, SHAPE_POLY_SET& aOutlines );
602 
613  const PCB_LAYER_ID GetLayerID( const wxString& aLayerName ) const;
614 
625  const wxString GetLayerName( PCB_LAYER_ID aLayer ) const;
626 
636  bool SetLayerName( PCB_LAYER_ID aLayer, const wxString& aLayerName );
637 
649  static wxString GetStandardLayerName( PCB_LAYER_ID aLayerId )
650  {
651  // a BOARD's standard layer name is the PCB_LAYER_ID fixed name
652  return LSET::Name( aLayerId );
653  }
654 
663  bool SetLayerDescr( PCB_LAYER_ID aIndex, const LAYER& aLayer );
664 
673  LAYER_T GetLayerType( PCB_LAYER_ID aLayer ) const;
674 
683  bool SetLayerType( PCB_LAYER_ID aLayer, LAYER_T aLayerType );
684 
689  void SetLayerColor( PCB_LAYER_ID aLayer, COLOR4D aColor );
690 
695  COLOR4D GetLayerColor( PCB_LAYER_ID aLayer ) const;
696 
698  int GetNumSegmTrack() const;
699 
701  int GetNumSegmZone() const;
702 
707  unsigned GetNodesCount() const;
708 
713  unsigned GetUnconnectedNetCount() const;
714 
719  unsigned GetPadCount() const;
720 
725  D_PAD* GetPad( unsigned aIndex ) const;
726 
734  const std::vector<D_PAD*> GetPads();
735 
737  {
738  m_NetInfo.buildListOfNets();
739  }
740 
747  NETINFO_ITEM* FindNet( int aNetcode ) const;
748 
755  NETINFO_ITEM* FindNet( const wxString& aNetname ) const;
756 
758  {
759  return m_NetInfo;
760  }
761 
762 #ifndef SWIG
763 
768  {
769  return m_NetInfo.begin();
770  }
771 
777  {
778  return m_NetInfo.end();
779  }
780 #endif
781 
786  unsigned GetNetCount() const
787  {
788  return m_NetInfo.GetNetCount();
789  }
790 
797  EDA_RECT ComputeBoundingBox( bool aBoardEdgesOnly = false ) const;
798 
799  const EDA_RECT GetBoundingBox() const override
800  {
801  return ComputeBoundingBox( false );
802  }
803 
812  {
813  return ComputeBoundingBox( true );
814  }
815 
816  void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) override;
817 
826  void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
827  GR_DRAWMODE aDrawMode, const wxPoint& aOffset = ZeroOffset ) override;
828 
838  void DrawHighLight( EDA_DRAW_PANEL* aDrawPanel, wxDC* aDC, int aNetCode );
839 
853  SEARCH_RESULT Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] ) override;
854 
864  MODULE* FindModuleByReference( const wxString& aReference ) const;
865 
875  MODULE* FindModule( const wxString& aRefOrTimeStamp, bool aSearchByTimeStamp = false ) const;
876 
909  void ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
910  std::vector<MODULE*>* aNewFootprints, REPORTER* aReporter = NULL );
911 
919  int SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount );
920 
928  void SynchronizeNetsAndNetClasses();
929 
930  /***************************************************************************/
931 
932  wxString GetClass() const override
933  {
934  return wxT( "BOARD" );
935  }
936 
937 #if defined(DEBUG)
938  void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
939 #endif
940 
941 
942  /*************************/
943  /* Copper Areas handling */
944  /*************************/
945 
957  ZONE_CONTAINER* HitTestForAnyFilledArea( const wxPoint& aRefPos,
958  PCB_LAYER_ID aStartLayer,
959  PCB_LAYER_ID aEndLayer,
960  int aNetCode );
961 
966  void RedrawAreasOutlines( EDA_DRAW_PANEL* aPanel,
967  wxDC* aDC,
968  GR_DRAWMODE aDrawMode,
969  PCB_LAYER_ID aLayer );
970 
975  void RedrawFilledAreas( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode,
976  PCB_LAYER_ID aLayer );
977 
988  int SetAreasNetCodesFromNetNames( void );
989 
996  ZONE_CONTAINER* GetArea( int index ) const
997  {
998  if( (unsigned) index < m_ZoneDescriptorList.size() )
999  return m_ZoneDescriptorList[index];
1000 
1001  return NULL;
1002  }
1003 
1010  int GetAreaIndex( const ZONE_CONTAINER* aArea ) const
1011  {
1012  for( int ii = 0; ii < GetAreaCount(); ii++ ) // Search for aArea in list
1013  {
1014  if( aArea == GetArea( ii ) ) // Found !
1015  return ii;
1016  }
1017 
1018  return -1;
1019  }
1020 
1025  int GetAreaCount() const
1026  {
1027  return (int) m_ZoneDescriptorList.size();
1028  }
1029 
1030  /* Functions used in test, merge and cut outlines */
1031 
1043  ZONE_CONTAINER* AddArea( PICKED_ITEMS_LIST* aNewZonesList, int aNetcode,
1044  PCB_LAYER_ID aLayer, wxPoint aStartPointPosition, int aHatch );
1045 
1056  ZONE_CONTAINER* InsertArea( int aNetcode, int aAreaIdx, PCB_LAYER_ID aLayer,
1057  int aCornerX, int aCornerY, int aHatch );
1058 
1068  bool NormalizeAreaPolygon( PICKED_ITEMS_LIST* aNewZonesList, ZONE_CONTAINER* aCurrArea );
1069 
1080  bool OnAreaPolygonModified( PICKED_ITEMS_LIST* aModifiedZonesList,
1081  ZONE_CONTAINER* modified_area );
1082 
1093  bool CombineAllAreasInNet( PICKED_ITEMS_LIST* aDeletedList,
1094  int aNetCode,
1095  bool aUseLocalFlags );
1096 
1104  void RemoveArea( PICKED_ITEMS_LIST* aDeletedList, ZONE_CONTAINER* area_to_remove );
1105 
1111  bool TestAreaIntersections( ZONE_CONTAINER* area_to_test );
1112 
1121  bool TestAreaIntersection( ZONE_CONTAINER* area_ref, ZONE_CONTAINER* area_to_test );
1122 
1134  bool CombineAreas( PICKED_ITEMS_LIST* aDeletedList,
1135  ZONE_CONTAINER* area_ref,
1136  ZONE_CONTAINER* area_to_combine );
1137 
1149  int Test_Drc_Areas_Outlines_To_Areas_Outlines( ZONE_CONTAINER* aArea_To_Examine,
1150  bool aCreate_Markers );
1151 
1152 
1165  VIA* GetViaByPosition( const wxPoint& aPosition,
1166  PCB_LAYER_ID aLayer = PCB_LAYER_ID( -1 ) ) const;
1167 
1176  D_PAD* GetPad( const wxPoint& aPosition, LSET aLayerMask );
1177  D_PAD* GetPad( const wxPoint& aPosition )
1178  {
1179  return GetPad( aPosition, LSET().set() );
1180  }
1181 
1190  D_PAD* GetPad( TRACK* aTrace, ENDPOINT_T aEndPoint );
1191 
1202  D_PAD* GetPadFast( const wxPoint& aPosition, LSET aLayerMask );
1203 
1219  D_PAD* GetPad( std::vector<D_PAD*>& aPadList, const wxPoint& aPosition, LSET aLayerMask );
1220 
1227  void PadDelete( D_PAD* aPad );
1228 
1241  void GetSortedPadListByXthenYCoord( std::vector<D_PAD*>& aVector, int aNetCode = -1 );
1242 
1256  TRACK* GetVisibleTrack( TRACK* aStartingTrace, const wxPoint& aPosition, LSET aLayerSet ) const;
1257 
1282  TRACK* MarkTrace( TRACK* aTrace, int* aCount, double* aTraceLength,
1283  double* aInPackageLength, bool aReorder );
1284 
1292  TRACKS TracksInNet( int aNetCode );
1293 
1311  TRACKS TracksInNetBetweenPoints( const wxPoint& aStartPos, const wxPoint& aGoalPos, int aNetCode );
1312 
1327  MODULE* GetFootprint( const wxPoint& aPosition, PCB_LAYER_ID aActiveLayer,
1328  bool aVisibleOnly, bool aIgnoreLocked = false );
1329 
1343  BOARD_CONNECTED_ITEM* GetLockPoint( const wxPoint& aPosition, LSET aLayerMask );
1344 
1362  TRACK* CreateLockPoint( wxPoint& aPosition, TRACK* aSegment, PICKED_ITEMS_LIST* aList );
1363 };
1364 
1365 #endif // CLASS_BOARD_H_
void SetColorsSettings(COLORS_DESIGN_SETTINGS *aColorsSettings)
Function SetColorsSettings.
Definition: class_board.h:570
KICAD_T Type() const
Function Type()
Definition: base_struct.h:198
Wrapper class, so you can iterate through NETINFO_ITEM*s, not std::pair
void SetFileFormatVersionAtLoad(int aVersion)
Definition: class_board.h:276
D_PAD * GetPad(const wxPoint &aPosition)
Definition: class_board.h:1177
void BuildListOfNets()
Definition: class_board.h:736
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes...
Definition: class_board.h:799
Class ZONE_CONTAINER handles a list of polygons defining a copper zone.
Definition: class_zone.h:78
NETINFO_LIST::iterator BeginNets() const
Function BeginNets.
Definition: class_board.h:767
void SetZoneSettings(const ZONE_SETTINGS &aSettings)
Definition: class_board.h:558
MARKER_PCB * GetMARKER(int index) const
Function GetMARKER returns the MARKER at a given index.
Definition: class_board.h:313
void SetElementVisibility(GAL_LAYER_ID aElement, bool aNewState)
Function SetElementVisibility changes the visibility of an element category.
Definition: pcbframe.cpp:934
static bool ClassOf(const EDA_ITEM *aItem)
Definition: class_board.h:227
const ZONE_SETTINGS & GetZoneSettings() const
Definition: class_board.h:557
Definition: typeinfo.h:97
wxPoint m_GridOrigin
origin for grid offsets
void SetGridOrigin(const wxPoint &aPoint)
Function SetGridOrigin sets the origin point of the grid.
Definition: class_board.h:341
void SetLayerColor(COLOR4D aColor, SCH_LAYER_ID aLayer)
Definition: eeschema.cpp:173
BOARD(const BOARD &aOther)
Definition: class_board.h:214
wxString m_name
The name of the layer, there should be no spaces in this name.
Definition: class_board.h:111
const wxPoint & GetGridOrigin() const
Definition: class_board.h:342
wxString m_fileName
the board filename
Definition: class_board.h:175
Class BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class...
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
Definition: class_board.h:555
PAGE_INFO m_paper
Definition: class_board.h:197
DLIST< BOARD_ITEM > & DrawingsList()
Definition: class_board.h:256
bool IsLayerEnabled(PCB_LAYER_ID aLayer) const
Function IsLayerEnabled is a proxy function that calls the correspondent function in m_BoardSettings ...
Definition: class_board.h:431
void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: class_board.h:549
LAYER_T m_type
The type of the layer.
Definition: class_board.h:113
COLORS_DESIGN_SETTINGS * m_colorsSettings
Definition: class_board.h:196
bool IsLayerEnabled(PCB_LAYER_ID aLayerId) const
Function IsLayerEnabled tests whether a given layer is enabled.
void ResetHighLight()
Function ResetHighLight Reset all high light data to the init state.
Definition: class_board.h:348
ZONE_CONTAINER * m_CurrentZoneContour
zone contour currently in progress
Definition: class_board.h:259
unsigned GetNetCount() const
Function GetNetCount.
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
void HighLightOFF()
Function HighLightOFF Disable highlight.
Definition: class_board.h:379
LAYER()
Definition: class_board.h:87
DLIST< SEGZONE > m_Zone
Definition: class_board.h:247
BOARD & operator=(const BOARD &aOther)
Definition: class_board.h:220
HIGH_LIGHT_INFO m_highLight
Definition: class_board.h:186
NETINFO_LIST m_NetInfo
net info list (name, design constraints ..
Definition: class_board.h:191
bool IsLayerVisible(PCB_LAYER_ID aLayerId) const
Function IsLayerVisible tests whether a given layer is visible.
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
HIGH_LIGHT_INFO m_highLightPrevious
Definition: class_board.h:187
NETINFO_LIST::iterator EndNets() const
Function EndNets.
Definition: class_board.h:776
COLOR4D GetLayerColor(SCH_LAYER_ID aLayer)
Definition: eeschema.cpp:166
Class TITLE_BLOCK holds the information shown in the lower right corner of a plot, printout, or editing view.
Class BOARD_CONNECTED_ITEM is a base class derived from BOARD_ITEM for items that can be connected an...
PCB_PLOT_PARAMS m_plotOptions
Definition: class_board.h:199
void SetVisibleAlls()
Function SetVisibleAlls Set the status of all visible element categories and layers to VISIBLE...
Definition: pcbframe.cpp:942
void SetAuxOrigin(const wxPoint &aPoint)
Function SetAuxOrigin sets the origin point used for plotting.
Definition: class_board.h:334
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:90
ENDPOINT_T
Flag used in locate routines (from which endpoint work)
Definition: pcbnew.h:54
static const char * ShowType(LAYER_T aType)
Function ShowType converts a LAYER_T enum to a const char*.
const EDA_RECT GetBoardEdgesBoundingBox() const
Function GetBoardEdgesBoundingBox Returns the board bounding box calculated using exclusively the boa...
Definition: class_board.h:811
const INSPECTOR_FUNC & INSPECTOR
Definition: base_struct.h:104
ZONE_SETTINGS m_zoneSettings
Definition: class_board.h:195
bool IsElementVisible(GAL_LAYER_ID aElement) const
Function IsElementVisible tests whether a given element category is visible.
Definition: pcbframe.cpp:928
PCB_LAYER_ID
A quick note on layer IDs:
Class LSET is a set of PCB_LAYER_IDs.
Class NETLIST stores all of information read from a netlist along with the flags used to update the N...
Definition: pcb_netlist.h:205
DLIST_ITERATOR_WRAPPER< MODULE > Modules()
Definition: class_board.h:250
static const wxChar * Name(PCB_LAYER_ID aLayerId)
Function Name returns the fixed name association with aLayerId.
Definition: lset.cpp:73
Class NETINFO_LIST is a container class for NETINFO_ITEM elements, which are the nets.
const wxString & GetFileName() const
Definition: class_board.h:234
GR_DRAWMODE
Drawmode. Compositing mode plus a flag or two.
Definition: gr_basic.h:41
Class SHAPE_POLY_SET.
Class PAGE_INFO describes the page size and margins of a paper page on which to eventually print or p...
bool IsEmpty() const
Definition: class_board.h:268
LAYER_T
Enum LAYER_T gives the allowed types of layers, same as Specctra DSN spec.
Definition: class_board.h:71
COLORS_DESIGN_SETTINGS * GetColorsSettings() const
Function GetColorSettings.
Definition: class_board.h:564
TITLE_BLOCK m_titles
text in lower right of screen and plots
Definition: class_board.h:198
const PCB_PLOT_PARAMS & GetPlotOptions() const
Definition: class_board.h:551
bool m_visible
Definition: class_board.h:115
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings.
Definition: class_board.h:533
#define DECL_VEC_FOR_SWIG(TypeName, MemberType)
Declare a std::vector but no swig template.
Definition: macros.h:146
DLIST< BOARD_ITEM > m_Drawings
Definition: class_board.h:241
void SetDesignSettings(const BOARD_DESIGN_SETTINGS &aDesignSettings)
Function SetDesignSettings.
Definition: class_board.h:543
void SetPosition(wxString aStr, wxString aDefaultMeasurementUnit, int *aX, int *aY, wxString aActualConversion)
int GetAreaCount() const
Function GetAreaCount.
Definition: class_board.h:1025
MARKERS m_markers
MARKER_PCBs for clearance problems, owned by pointer.
Definition: class_board.h:178
void SetFileName(const wxString &aFileName)
Definition: class_board.h:232
void SetPlotOptions(const PCB_PLOT_PARAMS &aOptions)
Definition: class_board.h:552
Class PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
static LAYER_T ParseType(const char *aType)
Function ParseType converts a string to a LAYER_T.
Class PCB_PLOT_PARAMS handles plot parameters and options when plotting/printing a board...
NETINFO_LIST & GetNetInfo()
Definition: class_board.h:757
const PAGE_INFO & GetPageSettings() const
Definition: class_board.h:548
Pad object description.
int GetFileFormatVersionAtLoad() const
Definition: class_board.h:277
void HighLightON()
Function HighLightON Enable highlight.
Definition: class_board.h:386
Class ZONE_SETTINGS handles zones parameters.
const wxPoint & GetAuxOrigin() const
Definition: class_board.h:335
void SetHighLightNet(int aNetCode)
Function SetHighLightNet.
Definition: class_board.h:364
void clear()
Definition: class_board.h:92
Class NETINFO_ITEM handles the data for a net.
Definition: class_netinfo.h:69
iterator begin() const
ZONE_CONTAINERS & Zones()
Definition: class_board.h:252
TITLE_BLOCK & GetTitleBlock()
Definition: class_board.h:554
ZONE_CONTAINER * GetArea(int index) const
Function GetArea returns the Area (Zone Container) at a given index.
Definition: class_board.h:996
Board layer functions and definitions.
int m_fileFormatVersionAtLoad
the version loaded from the file
Definition: class_board.h:189
iterator end() const
Class LAYER holds information pertinent to a layer of a BOARD.
Definition: class_board.h:85
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:169
Class ZONE_SETTINGS used to handle zones parameters in dialogs.
DLIST< MODULE > m_Modules
Definition: class_board.h:245
ZONE_CONTAINERS m_ZoneDescriptorList
edge zone descriptors, owned by pointer.
Definition: class_board.h:181
std::shared_ptr< CONNECTIVITY_DATA > m_connectivity
Definition: class_board.h:192
Class EDA_RECT handles the component boundary box.
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:151
The common library.
wxString GetClass() const override
Function GetClass returns the class name.
Definition: class_board.h:932
Class COLORS_DESIGN_SETTINGS is a list of color settings for designs in Eeschema, Pcbnew and GerbView...
unsigned GetCount() const
Function GetCount returns the number of elements in the list.
Definition: dlist.h:126
bool IsHighLightNetON() const
Function IsHighLightNetON.
Definition: class_board.h:373
DLIST_ITERATOR_WRAPPER< TRACK > Tracks()
Definition: class_board.h:249
int GetHighLightNetCode() const
Function GetHighLightNetCode.
Definition: class_board.h:358
DLIST< TRACK > m_Track
Definition: class_board.h:246
BOARD_DESIGN_SETTINGS m_designSettings
Definition: class_board.h:194
Abstract interface for BOARD_ITEMs capable of storing other items inside.
int m_number
Definition: class_board.h:117
Class EDA_MSG_ITEM is used EDA_MSG_PANEL as the item type for displaying messages.
Definition: msgpanel.h:53
SEARCH_RESULT
Definition: base_struct.h:68
Handle colors used to draw all items or layers.
int GetAreaIndex(const ZONE_CONTAINER *aArea) const
Function GetAreaIndex returns the Area Index for the given Zone Container.
Definition: class_board.h:1010
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Function GetConnectivity() returns list of missing connections between components/tracks.
Definition: class_board.h:290
wxPoint m_AuxOrigin
origin for plot exports
class PCB_BASE_FRAME basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer...
void buildListOfNets()
Function buildListOfNets builds or rebuilds the list of NETINFO_ITEMs The list is sorted by names...
DLIST_ITERATOR_WRAPPER< BOARD_ITEM > Drawings()
Definition: class_board.h:251
int GetMARKERCount() const
Function GetMARKERCount.
Definition: class_board.h:325
unsigned GetNetCount() const
Function GetNetCount.
Definition: class_board.h:786
static wxString GetStandardLayerName(PCB_LAYER_ID aLayerId)
Function GetStandardLayerName returns an "English Standard" name of a PCB layer when given aLayerNumb...
Definition: class_board.h:649
Class BOARD_DESIGN_SETTINGS contains design settings for a BOARD object.
bool IsLayerVisible(PCB_LAYER_ID aLayer) const
Function IsLayerVisible is a proxy function that calls the correspondent function in m_BoardSettings ...
Definition: class_board.h:443
int m_Status_Pcb
Flags used in ratsnest calculation and update.
Definition: class_board.h:237
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39