KiCad PCB EDA Suite
GERBER_DRAW_ITEM Class Reference

#include <class_gerber_draw_item.h>

Inheritance diagram for GERBER_DRAW_ITEM:
EDA_ITEM KIGFX::VIEW_ITEM

Public Member Functions

 GERBER_DRAW_ITEM (GERBER_FILE_IMAGE *aGerberparams)
 
 ~GERBER_DRAW_ITEM ()
 
GERBER_DRAW_ITEMNext () const
 
GERBER_DRAW_ITEMBack () const
 
void SetNetAttributes (const GBR_NETLIST_METADATA &aNetAttributes)
 
const GBR_NETLIST_METADATAGetNetAttributes ()
 
int GetLayer () const
 Function GetLayer returns the layer this item is on. More...
 
bool GetLayerPolarity ()
 
bool HasNegativeItems ()
 Function HasNegativeItems. More...
 
void SetLayerParameters ()
 Function SetLayerParameters Initialize parameters from Image and Layer parameters found in the gerber file: m_UnitsMetric, m_MirrorA, m_MirrorB, m_DrawScale, m_DrawOffset. More...
 
void SetLayerPolarity (bool aNegative)
 
void MoveAB (const wxPoint &aMoveVector)
 Function MoveAB move this object. More...
 
void MoveXY (const wxPoint &aMoveVector)
 Function MoveXY move this object. More...
 
const wxPointGetPosition () const
 Function GetPosition returns the position of this object. More...
 
void SetPosition (const wxPoint &aPos)
 
wxPoint GetABPosition (const wxPoint &aXYPosition) const
 Function GetABPosition returns the image position of aPosition for this object. More...
 
wxPoint GetXYPosition (const wxPoint &aABPosition) const
 Function GetXYPosition returns the image position of aPosition for this object. More...
 
D_CODEGetDcodeDescr ()
 Function GetDcodeDescr returns the GetDcodeDescr of this object, or NULL. More...
 
const EDA_RECT GetBoundingBox () const override
 Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes. More...
 
void Draw (EDA_DRAW_PANEL *aPanel, wxDC *aDC, GR_DRAWMODE aDrawMode, const wxPoint &aOffset, GBR_DISPLAY_OPTIONS *aDrawOptions)
 
void ConvertSegmentToPolygon ()
 Function ConvertSegmentToPolygon convert a line to an equivalent polygon. More...
 
void DrawGbrPoly (EDA_RECT *aClipBox, wxDC *aDC, COLOR4D aColor, const wxPoint &aOffset, bool aFilledShape)
 Function DrawGbrPoly a helper function used to draw the polygon stored in m_PolyCorners. More...
 
int Shape () const
 
void GetMsgPanelInfo (std::vector< MSG_PANEL_ITEM > &aList) override
 Function GetMsgPanelInfo populates aList of MSG_PANEL_ITEM objects with it's internal state for display purposes. More...
 
wxString ShowGBRShape ()
 
bool HitTest (const wxPoint &aRefPos) const override
 Function HitTest tests if the given wxPoint is within the bounds of this object. More...
 
bool HitTest (const EDA_RECT &aRefArea) const
 Function HitTest (overloaded) tests if the given wxRect intersect this object. More...
 
wxString GetClass () const override
 Function GetClass returns the class name. More...
 
void UnLink ()
 Function UnLink detaches this object from its owner. More...
 
void DeleteStructure ()
 Function DeleteStructure deletes this object after UnLink()ing it from its owner. More...
 
KICAD_T Type () const
 Function Type() More...
 
void SetTimeStamp (time_t aNewTimeStamp)
 
time_t GetTimeStamp () const
 
EDA_ITEMGetParent () const
 
DHEADGetList () const
 
void SetParent (EDA_ITEM *aParent)
 
void SetList (DHEAD *aList)
 
bool IsNew () const
 
bool IsModified () const
 
bool IsMoving () const
 
bool IsDragging () const
 
bool IsWireImage () const
 
bool IsSelected () const
 
bool IsResized () const
 
bool IsHighlighted () const
 
bool IsBrightened () const
 
void SetWireImage ()
 
void SetSelected ()
 
void SetHighlighted ()
 
void SetBrightened ()
 
void ClearSelected ()
 
void ClearHighlighted ()
 
void ClearBrightened ()
 
void SetModified ()
 
int GetState (int type) const
 
void SetState (int type, int state)
 
STATUS_FLAGS GetStatus () const
 
void SetStatus (STATUS_FLAGS aStatus)
 
void SetFlags (STATUS_FLAGS aMask)
 
void ClearFlags (STATUS_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
 
STATUS_FLAGS GetFlags () const
 
void SetForceVisible (bool aEnable)
 Function SetForceVisible is used to set and cleag force visible flag used to force the item to be drawn even if it's draw attribute is set to not visible. More...
 
virtual EDA_ITEMClone () const
 Function Clone creates a duplicate of this item with linked list members set to NULL. More...
 
virtual SEARCH_RESULT Visit (INSPECTOR inspector, void *testData, const KICAD_T scanTypes[])
 Function Visit may be re-implemented for each derived class in order to handle all the types given by its member data. More...
 
virtual wxString GetSelectMenuText () const
 Function GetSelectMenuText returns the text to display to be used in the selection clarification context menu when multiple items are found at the current cursor position. More...
 
virtual BITMAP_DEF GetMenuImage () const
 Function GetMenuImage returns a pointer to an image to be used in menus. More...
 
virtual bool Matches (wxFindReplaceData &aSearchData, void *aAuxData, wxPoint *aFindLocation)
 Function Matches compares the item against the search criteria in aSearchData. More...
 
bool Replace (wxFindReplaceData &aSearchData, wxString &aText)
 Helper function used in search and replace dialog Function Replace performs a text replace on aText using the find and replace criteria in aSearchData on items that support text find and replace. More...
 
virtual bool Replace (wxFindReplaceData &aSearchData, void *aAuxData=NULL)
 Function Replace performs a text replace using the find and replace criteria in aSearchData on items that support text find and replace. More...
 
virtual bool IsReplaceable () const
 Function IsReplaceable. More...
 
bool operator< (const EDA_ITEM &aItem) const
 Test if another item is less than this object. More...
 
virtual const BOX2I ViewBBox () const override
 
virtual void ViewGetLayers (int aLayers[], int &aCount) const override
 
virtual void ViewDraw (int aLayer, VIEW *aView) const
 Function ViewDraw() Draws the parts of the object belonging to layer aLayer. More...
 
virtual unsigned int ViewGetLOD (int aLayer, VIEW *aView) const
 Function ViewGetLOD() Returns the level of detail of the item. More...
 
VIEW_ITEM_DATA * viewPrivData () const
 

Static Public Member Functions

static SEARCH_RESULT IterateForward (EDA_ITEM *listStart, INSPECTOR inspector, void *testData, const KICAD_T scanTypes[])
 Function IterateForward walks through the object tree calling the inspector() on each object type requested in scanTypes. More...
 
static bool Sort (const EDA_ITEM *aLeft, const EDA_ITEM *aRight)
 Function Sort is a helper function to be used by the C++ STL sort algorithm for sorting a STL container of EDA_ITEM pointers. More...
 

Public Attributes

bool m_UnitsMetric
 
int m_Shape
 
wxPoint m_Start
 
wxPoint m_End
 
wxPoint m_ArcCentre
 
std::vector< wxPointm_PolyCorners
 
wxSize m_Size
 
bool m_Flashed
 
int m_DCode
 
GERBER_FILE_IMAGEm_GerberImageFile
 

Protected Member Functions

bool Matches (const wxString &aText, wxFindReplaceData &aSearchData)
 Function Matches compares aText against search criteria in aSearchData. More...
 

Protected Attributes

EDA_ITEMPnext
 next in linked list More...
 
EDA_ITEMPback
 previous in linked list More...
 
DHEADm_List
 which DLIST I am on. More...
 
EDA_ITEMm_Parent
 Linked list: Link (parent struct) More...
 
time_t m_TimeStamp
 Time stamp used for logical links. More...
 
bool m_forceVisible
 Set to true to override the visibility setting of the item. More...
 
STATUS_FLAGS m_Flags
 Flag bits for editing and other uses. More...
 

Private Member Functions

void SetNext (EDA_ITEM *aNext)
 
void SetBack (EDA_ITEM *aBack)
 

Private Attributes

bool m_LayerNegative
 
bool m_swapAxis
 
bool m_mirrorA
 
bool m_mirrorB
 
wxRealPoint m_drawScale
 
wxPoint m_layerOffset
 
double m_lyrRotation
 
GBR_NETLIST_METADATA m_netAttributes
 the string given by a TO attribute set in aperture (dcode). More...
 

Detailed Description

Definition at line 62 of file class_gerber_draw_item.h.

Constructor & Destructor Documentation

GERBER_DRAW_ITEM::GERBER_DRAW_ITEM ( GERBER_FILE_IMAGE aGerberparams)

Definition at line 42 of file class_gerber_draw_item.cpp.

References GBR_SEGMENT, m_DCode, m_drawScale, m_Flashed, m_GerberImageFile, m_LayerNegative, m_lyrRotation, m_mirrorA, m_mirrorB, m_Shape, m_swapAxis, m_UnitsMetric, and SetLayerParameters().

42  :
44 {
45  m_GerberImageFile = aGerberImageFile;
47  m_Flashed = false;
48  m_DCode = 0;
49  m_UnitsMetric = false;
50  m_LayerNegative = false;
51  m_swapAxis = false;
52  m_mirrorA = false;
53  m_mirrorB = false;
54  m_drawScale.x = m_drawScale.y = 1.0;
55  m_lyrRotation = 0;
56 
57  if( m_GerberImageFile )
59 }
void SetLayerParameters()
Function SetLayerParameters Initialize parameters from Image and Layer parameters found in the gerber...
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType)
Definition: base_struct.cpp:66
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:151
GERBER_FILE_IMAGE * m_GerberImageFile
GERBER_DRAW_ITEM::~GERBER_DRAW_ITEM ( )

Definition at line 62 of file class_gerber_draw_item.cpp.

63 {
64 }

Member Function Documentation

GERBER_DRAW_ITEM* GERBER_DRAW_ITEM::Back ( ) const
inline

Definition at line 116 of file class_gerber_draw_item.h.

References EDA_ITEM::Pback.

116 { return static_cast<GERBER_DRAW_ITEM*>( Pback ); }
EDA_ITEM * Pback
previous in linked list
Definition: base_struct.h:165
void EDA_ITEM::ClearBrightened ( )
inlineinherited

Definition at line 233 of file base_struct.h.

References BRIGHTENED, and EDA_ITEM::ClearFlags().

Referenced by SELECTION_TOOL::disambiguationMenu().

233 { ClearFlags( BRIGHTENED ); }
#define BRIGHTENED
item is drawn with a bright contour
Definition: base_struct.h:137
void ClearFlags(STATUS_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
Definition: base_struct.h:254
void EDA_ITEM::ClearFlags ( STATUS_FLAGS  aMask = EDA_ITEM_ALL_FLAGS)
inlineinherited

Definition at line 254 of file base_struct.h.

Referenced by Abort_Edit_Pcb_Text(), Abort_EditEdge(), Abort_Move_ModuleOutline(), Abort_Move_Pad(), Abort_MoveOrCopyModule(), Abort_MoveTrack(), Abort_Zone_Create_Outline(), Abort_Zone_Move_Corner_Or_Outlines(), AbortMoveAndEditTarget(), abortMoveBitmap(), AbortMoveDimensionText(), abortMoveItem(), AbortMoveTextModule(), AbortPinMove(), SCH_SCREEN::addConnectedItemsToBlock(), SCH_EDIT_FRAME::addCurrentItemToList(), PNS_KICAD_IFACE::AddItem(), PCB_EDIT_FRAME::AppendBoardFile(), SCH_EDIT_FRAME::AppendOneEEProject(), PCB_EDIT_FRAME::Begin_DrawSegment(), FOOTPRINT_EDIT_FRAME::Begin_Edge_Module(), PCB_EDIT_FRAME::Begin_Zone(), SCH_EDIT_FRAME::BeginSegment(), PCB_EDIT_FRAME::Block_Delete(), PCB_EDIT_FRAME::Block_Flip(), PCB_EDIT_FRAME::Block_Move(), PCB_EDIT_FRAME::Change_Side_Module(), SCH_SCREEN::ClearAnnotation(), EDA_ITEM::ClearBrightened(), EDA_ITEM::ClearHighlighted(), ClearMarkItems(), clearModuleItemFlags(), EDA_ITEM::ClearSelected(), SCH_EDIT_FRAME::ConvertPart(), SCH_EDIT_FRAME::copyBlockItems(), CopyMarkedItems(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions(), LIB_PART::CopySelectedItems(), MWAVE::CreateMicrowaveInductor(), FOOTPRINT_EDIT_FRAME::CreateTextModule(), PCB_EDIT_FRAME::Delete_LastCreatedCorner(), PCB_EDIT_FRAME::Delete_Segment_Edge(), LIB_PART::DeleteSelectedItems(), DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN(), PCB_EDIT_FRAME::EditDimension(), PCB_EDIT_FRAME::End_Edge(), FOOTPRINT_EDIT_FRAME::End_Edge_Module(), PCB_EDIT_FRAME::End_Move_Zone_Corner_Or_Outlines(), PCB_EDIT_FRAME::End_Zone(), SCH_EDIT_FRAME::EndSegment(), PCB_EDIT_FRAME::Exchange_Module(), ExitSheet(), SCH_SCREEN::GetConnection(), PCB_BASE_FRAME::GlobalChange_PadSettings(), PCB_BASE_FRAME::Import_Pad_Settings(), SCH_JUNCTION::IsSelectStateChanged(), SCH_NO_CONNECT::IsSelectStateChanged(), SCH_MARKER::IsSelectStateChanged(), SCH_BUS_ENTRY_BASE::IsSelectStateChanged(), SCH_LINE::IsSelectStateChanged(), SCH_BITMAP::IsSelectStateChanged(), SCH_TEXT::IsSelectStateChanged(), SCH_COMPONENT::IsSelectStateChanged(), SCH_SHEET::IsSelectStateChanged(), FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD(), MarkItemsInBloc(), MirrorX(), MirrorY(), moveBitmap(), FOOTPRINT_EDIT_FRAME::OnEditItemRequest(), LIB_EDIT_FRAME::OnEditPin(), FOOTPRINT_EDIT_FRAME::OnLeftClick(), SCH_EDIT_FRAME::OnLeftClick(), PCB_EDIT_FRAME::OnLeftClick(), LIB_EDIT_FRAME::OnRotateItem(), SCH_EDIT_FRAME::OnSelectUnit(), SCH_FIELD::Place(), PCB_EDIT_FRAME::Place_DrawItem(), FOOTPRINT_EDIT_FRAME::Place_EdgeMod(), PCB_EDIT_FRAME::Place_Texte_Pcb(), PCB_EDIT_FRAME::PlaceDimensionText(), PCB_EDIT_FRAME::PlaceDraggedOrMovedTrackSegment(), PCB_BASE_FRAME::PlaceModule(), PCB_BASE_FRAME::PlacePad(), PCB_EDIT_FRAME::PlaceTarget(), DRAWING_TOOL::PlaceText(), PCB_BASE_FRAME::PlaceTexteModule(), FOOTPRINT_EDIT_FRAME::Process_Special_Functions(), LIB_EDIT_FRAME::Process_Special_Functions(), EDIT_TOOL::Properties(), BOARD_COMMIT::Push(), PCB_BASE_EDIT_FRAME::PutDataInPreviousState(), SCH_EDIT_FRAME::PutDataInPreviousState(), SCH_EDIT_FRAME::RepeatDrawItem(), LIB_EDIT_FRAME::RepeatPinItem(), BOARD_COMMIT::Revert(), PCB_BASE_FRAME::Rotate_Module(), RotateListOfItems(), LIB_PIN::Save(), PCB_BASE_EDIT_FRAME::SaveCopyInUndoList(), FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint(), SCH_EDIT_FRAME::SetRepeatItem(), PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope(), PCB_EDIT_FRAME::StartMoveModule(), PCB_EDIT_FRAME::StartMoveOneNodeOrSegment(), and DIALOG_PAD_PROPERTIES::TransferDataFromWindow().

254 { m_Flags &= ~aMask; }
STATUS_FLAGS m_Flags
Flag bits for editing and other uses.
Definition: base_struct.h:175
void EDA_ITEM::ClearHighlighted ( )
inlineinherited

Definition at line 232 of file base_struct.h.

References EDA_ITEM::ClearFlags(), and HIGHLIGHTED.

232 { ClearFlags( HIGHLIGHTED ); }
#define HIGHLIGHTED
item is drawn in normal colors, when the rest is darkened
Definition: base_struct.h:136
void ClearFlags(STATUS_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
Definition: base_struct.h:254
void EDA_ITEM::ClearSelected ( )
inlineinherited

Definition at line 231 of file base_struct.h.

References EDA_ITEM::ClearFlags(), and SELECTED.

Referenced by POINT_EDITOR::addCorner(), GAL_ARRAY_CREATOR::prePushAction(), SELECTION_TOOL::unselectVisually(), and PCB_EDITOR_CONTROL::ZoneDuplicate().

231 { ClearFlags( SELECTED ); }
#define SELECTED
Definition: base_struct.h:120
void ClearFlags(STATUS_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
Definition: base_struct.h:254
EDA_ITEM * EDA_ITEM::Clone ( ) const
virtualinherited

Function Clone creates a duplicate of this item with linked list members set to NULL.

The default version will return NULL in release builds and likely crash the program. In debug builds, a warning message indicating the derived class has not implemented cloning. This really should be a pure virtual function. Due to the fact that there are so many objects derived from EDA_ITEM, the decision was made to return NULL until all the objects derived from EDA_ITEM implement cloning. Once that happens, this function should be made pure.

Returns
A clone of the item.

Reimplemented in ZONE_CONTAINER, SCH_SHEET, SCH_COMPONENT, MODULE, D_PAD, LIB_PIN, VIA, SEGZONE, SCH_HIERLABEL, SCH_GLOBALLABEL, TRACK, SCH_LABEL, DRAWSEGMENT, LIB_FIELD, DIMENSION, SCH_TEXT, SCH_SHEET_PIN, SCH_FIELD, TEXTE_MODULE, SCH_BUS_BUS_ENTRY, LIB_ARC, SCH_BUS_WIRE_ENTRY, SCH_LINE, SCH_BITMAP, TEXTE_PCB, LIB_TEXT, EDGE_MODULE, LIB_POLYLINE, LIB_RECTANGLE, SCH_MARKER, LIB_CIRCLE, PCB_TARGET, LIB_BEZIER, SCH_NO_CONNECT, and SCH_JUNCTION.

Definition at line 125 of file base_struct.cpp.

References EDA_ITEM::GetClass().

Referenced by PCB_EDIT_FRAME::Block_Duplicate(), CopyMarkedItems(), LIB_PART::CopySelectedItems(), BOARD::Duplicate(), DuplicateStruct(), SCH_SCREEN::ExtractWires(), LIB_PART::LIB_PART(), LIB_EDIT_FRAME::LoadOneSymbol(), new_clone(), SCH_EDIT_FRAME::OnCopySchematicItemRequest(), SCH_EDIT_FRAME::RepeatDrawItem(), PCB_BASE_EDIT_FRAME::SaveCopyInUndoList(), LIB_PART::SetConversion(), SCH_EDIT_FRAME::SetRepeatItem(), SCH_EDIT_FRAME::SetUndoItem(), LIB_PART::SetUnitCount(), and COMMIT::Stage().

126 {
127  wxCHECK_MSG( false, NULL, wxT( "Clone not implemented in derived class " ) + GetClass() +
128  wxT( ". Bad programmer!" ) );
129 }
virtual wxString GetClass() const =0
Function GetClass returns the class name.
void GERBER_DRAW_ITEM::ConvertSegmentToPolygon ( )

Function ConvertSegmentToPolygon convert a line to an equivalent polygon.

Useful when a line is plotted using a rectangular pen. In this case, the usual segment plot function cannot be used

Definition at line 414 of file class_gerber_draw_item.cpp.

References delta, m_End, m_PolyCorners, m_Size, m_Start, wxPoint::x, and wxPoint::y.

Referenced by Draw().

415 {
416  m_PolyCorners.clear();
417  m_PolyCorners.reserve(6);
418 
419  wxPoint start = m_Start;
420  wxPoint end = m_End;
421 
422  // make calculations more easy if ensure start.x < end.x
423  // (only 2 quadrants to consider)
424  if( start.x > end.x )
425  std::swap( start, end );
426 
427  // calculate values relative to start point:
428  wxPoint delta = end - start;
429 
430  // calculate corners for the first quadrant only (delta.x and delta.y > 0 )
431  // currently, delta.x already is > 0.
432  // make delta.y > 0
433  bool change = delta.y < 0;
434 
435  if( change )
436  delta.y = -delta.y;
437 
438  // Now create the full polygon.
439  // Due to previous changes, the shape is always something like
440  // 3 4
441  // 2 5
442  // 1 6
443  wxPoint corner;
444  corner.x -= m_Size.x/2;
445  corner.y -= m_Size.y/2;
446  m_PolyCorners.push_back( corner ); // Lower left corner, start point (1)
447  corner.y += m_Size.y;
448  m_PolyCorners.push_back( corner ); // upper left corner, start point (2)
449 
450  if( delta.x || delta.y)
451  {
452  corner += delta;
453  m_PolyCorners.push_back( corner ); // upper left corner, end point (3)
454  }
455 
456  corner.x += m_Size.x;
457  m_PolyCorners.push_back( corner ); // upper right corner, end point (4)
458  corner.y -= m_Size.y;
459  m_PolyCorners.push_back( corner ); // lower right corner, end point (5)
460 
461  if( delta.x || delta.y )
462  {
463  corner -= delta;
464  m_PolyCorners.push_back( corner ); // lower left corner, start point (6)
465  }
466 
467  // Create final polygon:
468  for( unsigned ii = 0; ii < m_PolyCorners.size(); ii++ )
469  {
470  if( change )
471  m_PolyCorners[ii].y = -m_PolyCorners[ii].y;
472 
473  m_PolyCorners[ii] += start;
474  }
475 }
std::vector< wxPoint > m_PolyCorners
static const int delta[8][2]
Definition: solve.cpp:112
void GERBER_DRAW_ITEM::DeleteStructure ( )
inline

Function DeleteStructure deletes this object after UnLink()ing it from its owner.

Definition at line 278 of file class_gerber_draw_item.h.

References UnLink().

279  {
280  UnLink();
281  delete this;
282  }
void UnLink()
Function UnLink detaches this object from its owner.
void GERBER_DRAW_ITEM::Draw ( EDA_DRAW_PANEL aPanel,
wxDC *  aDC,
GR_DRAWMODE  aDrawMode,
const wxPoint aOffset,
GBR_DISPLAY_OPTIONS aDrawOptions 
)

Definition at line 271 of file class_gerber_draw_item.cpp.

References APT_RECT, color, ConvertSegmentToPolygon(), D_CODE::DrawFlashedShape(), DrawGbrPoly(), GBR_ARC, GBR_CIRCLE, GBR_POLYGON, GBR_SEGMENT, GBR_SPOT_CIRCLE, GBR_SPOT_MACRO, GBR_SPOT_OVAL, GBR_SPOT_POLY, GBR_SPOT_RECT, GetABPosition(), EDA_DRAW_PANEL::GetClipBox(), GetDcodeDescr(), GetLineLength(), GERBER_FILE_IMAGE::GetPositiveDrawColor(), GR_AND, GR_HIGHLIGHT, GRArc1(), GRCircle(), GRCSegm(), GRFilledSegment(), GRLine(), GRSetDrawMode(), KiROUND(), m_ArcCentre, GBR_DISPLAY_OPTIONS::m_DisplayFlashedItemsFill, GBR_DISPLAY_OPTIONS::m_DisplayLinesFill, GBR_DISPLAY_OPTIONS::m_DisplayPolygonsFill, m_End, m_GerberImageFile, GERBER_FILE_IMAGE::m_ImageNegative, m_LayerNegative, GBR_DISPLAY_OPTIONS::m_NegativeDrawColor, m_PolyCorners, m_Shape, D_CODE::m_Shape, m_Size, and m_Start.

273 {
274  // used when a D_CODE is not found. default D_CODE to draw a flashed item
275  static D_CODE dummyD_CODE( 0 );
276  bool isFilled;
277  int radius;
278  int halfPenWidth;
279  static bool show_err;
280  D_CODE* d_codeDescr = GetDcodeDescr();
281 
282  if( d_codeDescr == NULL )
283  d_codeDescr = &dummyD_CODE;
284 
286 
287  if( ( aDrawMode & GR_HIGHLIGHT ) && !( aDrawMode & GR_AND ) )
288  color.SetToLegacyHighlightColor();
289 
290  /* isDark is true if flash is positive and should use a drawing
291  * color other than the background color, else use the background color
292  * when drawing so that an erasure happens.
293  */
295 
296  if( !isDark )
297  {
298  // draw in background color ("negative" color)
299  color = aDrawOptions->m_NegativeDrawColor;
300  }
301 
302  GRSetDrawMode( aDC, aDrawMode );
303 
304  isFilled = aDrawOptions->m_DisplayLinesFill;
305 
306  switch( m_Shape )
307  {
308  case GBR_POLYGON:
309  isFilled = aDrawOptions->m_DisplayPolygonsFill;
310 
311  if( !isDark )
312  isFilled = true;
313 
314  DrawGbrPoly( aPanel->GetClipBox(), aDC, color, aOffset, isFilled );
315  break;
316 
317  case GBR_CIRCLE:
318  radius = KiROUND( GetLineLength( m_Start, m_End ) );
319 
320  halfPenWidth = m_Size.x >> 1;
321 
322  if( !isFilled )
323  {
324  // draw the border of the pen's path using two circles, each as narrow as possible
325  GRCircle( aPanel->GetClipBox(), aDC, GetABPosition( m_Start ),
326  radius - halfPenWidth, 0, color );
327  GRCircle( aPanel->GetClipBox(), aDC, GetABPosition( m_Start ),
328  radius + halfPenWidth, 0, color );
329  }
330  else // Filled mode
331  {
332  GRCircle( aPanel->GetClipBox(), aDC, GetABPosition( m_Start ),
333  radius, m_Size.x, color );
334  }
335  break;
336 
337  case GBR_ARC:
338  // Currently, arcs plotted with a rectangular aperture are not supported.
339  // a round pen only is expected.
340 
341 #if 0 // for arc debug only
342  GRLine( aPanel->GetClipBox(), aDC, GetABPosition( m_Start ),
344  GRLine( aPanel->GetClipBox(), aDC, GetABPosition( m_End ),
346 #endif
347 
348  if( !isFilled )
349  {
350  GRArc1( aPanel->GetClipBox(), aDC, GetABPosition( m_Start ),
352  0, color );
353  }
354  else
355  {
356  GRArc1( aPanel->GetClipBox(), aDC, GetABPosition( m_Start ),
358  m_Size.x, color );
359  }
360 
361  break;
362 
363  case GBR_SPOT_CIRCLE:
364  case GBR_SPOT_RECT:
365  case GBR_SPOT_OVAL:
366  case GBR_SPOT_POLY:
367  case GBR_SPOT_MACRO:
368  isFilled = aDrawOptions->m_DisplayFlashedItemsFill;
369  d_codeDescr->DrawFlashedShape( this, aPanel->GetClipBox(), aDC, color,
370  m_Start, isFilled );
371  break;
372 
373  case GBR_SEGMENT:
374  /* Plot a line from m_Start to m_End.
375  * Usually, a round pen is used, but some gerber files use a rectangular pen
376  * In fact, any aperture can be used to plot a line.
377  * currently: only a square pen is handled (I believe using a polygon gives a strange plot).
378  */
379  if( d_codeDescr->m_Shape == APT_RECT )
380  {
381  if( m_PolyCorners.size() == 0 )
383 
384  DrawGbrPoly( aPanel->GetClipBox(), aDC, color, aOffset, isFilled );
385  }
386  else
387  {
388  if( !isFilled )
389  {
390  GRCSegm( aPanel->GetClipBox(), aDC, GetABPosition( m_Start ),
391  GetABPosition( m_End ), m_Size.x, color );
392  }
393  else
394  {
395  GRFilledSegment( aPanel->GetClipBox(), aDC, GetABPosition( m_Start ),
396  GetABPosition( m_End ), m_Size.x, color );
397  }
398  }
399 
400  break;
401 
402  default:
403  if( !show_err )
404  {
405  wxMessageBox( wxT( "Trace_Segment() type error" ) );
406  show_err = true;
407  }
408 
409  break;
410  }
411 }
COLOR4D GetPositiveDrawColor() const
void DrawGbrPoly(EDA_RECT *aClipBox, wxDC *aDC, COLOR4D aColor, const wxPoint &aOffset, bool aFilledShape)
Function DrawGbrPoly a helper function used to draw the polygon stored in m_PolyCorners.
bool m_DisplayPolygonsFill
Option to draw polygons (filled/sketch)
double GetLineLength(const wxPoint &aPointA, const wxPoint &aPointB)
Function GetLineLength returns the length of a line segment defined by aPointA and aPointB...
Definition: trigo.h:183
void GRSetDrawMode(wxDC *DC, GR_DRAWMODE draw_mode)
Definition: gr_basic.cpp:290
static int KiROUND(double v)
KiROUND rounds a floating point number to an int using "round halfway cases away from zero"...
Definition: common.h:107
D_CODE * GetDcodeDescr()
Function GetDcodeDescr returns the GetDcodeDescr of this object, or NULL.
APERTURE_T m_Shape
shape ( Line, rectangle, circle , oval .. )
Definition: dcode.h:99
void GRLine(EDA_RECT *ClipBox, wxDC *DC, int x1, int y1, int x2, int y2, int width, COLOR4D Color)
Definition: gr_basic.cpp:352
std::vector< wxPoint > m_PolyCorners
void GRCSegm(EDA_RECT *ClipBox, wxDC *DC, int x1, int y1, int x2, int y2, int width, int aPenSize, COLOR4D Color)
Definition: gr_basic.cpp:481
Definition: dcode.h:51
bool m_DisplayLinesFill
Option to draw line items (filled/sketch)
COLOR4D m_NegativeDrawColor
The color used to draw negative objects, usually the background color, but not always, when negative objects must be visible.
bool m_DisplayFlashedItemsFill
Option to draw flashed items (filled/sketch)
EDA_RECT * GetClipBox()
void ConvertSegmentToPolygon()
Function ConvertSegmentToPolygon convert a line to an equivalent polygon.
Class D_CODE holds a gerber DCODE (also called Aperture) definition.
Definition: dcode.h:81
void DrawFlashedShape(GERBER_DRAW_ITEM *aParent, EDA_RECT *aClipBox, wxDC *aDC, COLOR4D aColor, wxPoint aShapePos, bool aFilledShape)
Function DrawFlashedShape Draw the dcode shape for flashed items.
Definition: dcode.cpp:153
void GRFilledSegment(EDA_RECT *aClipBox, wxDC *aDC, wxPoint aStart, wxPoint aEnd, int aWidth, COLOR4D aColor)
Definition: gr_basic.cpp:592
void GRCircle(EDA_RECT *ClipBox, wxDC *DC, int xc, int yc, int r, int width, COLOR4D Color)
Definition: gr_basic.cpp:791
wxPoint GetABPosition(const wxPoint &aXYPosition) const
Function GetABPosition returns the image position of aPosition for this object.
GERBER_FILE_IMAGE * m_GerberImageFile
void GRArc1(EDA_RECT *ClipBox, wxDC *DC, int x1, int y1, int x2, int y2, int xc, int yc, COLOR4D Color)
Definition: gr_basic.cpp:873
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39
void GERBER_DRAW_ITEM::DrawGbrPoly ( EDA_RECT aClipBox,
wxDC *  aDC,
COLOR4D  aColor,
const wxPoint aOffset,
bool  aFilledShape 
)

Function DrawGbrPoly a helper function used to draw the polygon stored in m_PolyCorners.

Definition at line 478 of file class_gerber_draw_item.cpp.

References GetABPosition(), GRClosedPoly(), and m_PolyCorners.

Referenced by Draw().

483 {
484  std::vector<wxPoint> points;
485 
486  points = m_PolyCorners;
487  for( unsigned ii = 0; ii < points.size(); ii++ )
488  {
489  points[ii] += aOffset;
490  points[ii] = GetABPosition( points[ii] );
491  }
492 
493  GRClosedPoly( aClipBox, aDC, points.size(), &points[0], aFilledShape, aColor, aColor );
494 }
std::vector< wxPoint > m_PolyCorners
void GRClosedPoly(EDA_RECT *ClipBox, wxDC *DC, int n, wxPoint Points[], bool Fill, COLOR4D Color, COLOR4D BgColor)
Function GRClosedPoly draws a closed polygon onto the drawing context aDC and optionally fills and/or...
Definition: gr_basic.cpp:777
wxPoint GetABPosition(const wxPoint &aXYPosition) const
Function GetABPosition returns the image position of aPosition for this object.
wxPoint GERBER_DRAW_ITEM::GetABPosition ( const wxPoint aXYPosition) const

Function GetABPosition returns the image position of aPosition for this object.

Image position is the value of aPosition, modified by image parameters: offsets, axis selection, scale, rotation

Parameters
aXYPosition= position in X,Y gerber axis
Returns
const wxPoint - The given position in plotter A,B axis.

Definition at line 87 of file class_gerber_draw_item.cpp.

References KiROUND(), m_drawScale, m_GerberImageFile, GERBER_FILE_IMAGE::m_ImageJustifyOffset, GERBER_FILE_IMAGE::m_ImageOffset, GERBER_FILE_IMAGE::m_ImageRotation, m_layerOffset, m_lyrRotation, m_mirrorA, m_mirrorB, m_swapAxis, RotatePoint(), wxPoint::x, and wxPoint::y.

Referenced by Draw(), AM_PRIMITIVE::DrawBasicShape(), D_CODE::DrawFlashedPolygon(), D_CODE::DrawFlashedShape(), DrawGbrPoly(), GetBoundingBox(), and HitTest().

88 {
89  /* Note: RS274Xrevd_e is obscure about the order of transforms:
90  * For instance: Rotation must be made after or before mirroring ?
91  * Note: if something is changed here, GetYXPosition must reflect changes
92  */
93  wxPoint abPos = aXYPosition + m_GerberImageFile->m_ImageJustifyOffset;
94 
95  if( m_swapAxis )
96  std::swap( abPos.x, abPos.y );
97 
99  abPos.x = KiROUND( abPos.x * m_drawScale.x );
100  abPos.y = KiROUND( abPos.y * m_drawScale.y );
101  double rotation = m_lyrRotation * 10 + m_GerberImageFile->m_ImageRotation * 10;
102 
103  if( rotation )
104  RotatePoint( &abPos, -rotation );
105 
106  // Negate A axis if mirrored
107  if( m_mirrorA )
108  abPos.x = -abPos.x;
109 
110  // abPos.y must be negated when no mirror, because draw axis is top to bottom
111  if( !m_mirrorB )
112  abPos.y = -abPos.y;
113  return abPos;
114 }
static int KiROUND(double v)
KiROUND rounds a floating point number to an int using "round halfway cases away from zero"...
Definition: common.h:107
void RotatePoint(int *pX, int *pY, double angle)
Definition: trigo.cpp:317
GERBER_FILE_IMAGE * m_GerberImageFile
const EDA_RECT GERBER_DRAW_ITEM::GetBoundingBox ( ) const
overridevirtual

Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes.

This box should be an enclosing perimeter for visible components of this object, and the units should be in the pcb or schematic coordinate system. It is OK to overestimate the size by a few counts.

Reimplemented from EDA_ITEM.

Definition at line 218 of file class_gerber_draw_item.cpp.

References GetABPosition(), EDA_RECT::GetEnd(), EDA_RECT::GetOrigin(), EDA_RECT::Inflate(), m_Size, m_Start, EDA_RECT::Normalize(), EDA_RECT::SetEnd(), and EDA_RECT::SetOrigin().

219 {
220  // return a rectangle which is (pos,dim) in nature. therefore the +1
221  EDA_RECT bbox( m_Start, wxSize( 1, 1 ) );
222 
223  bbox.Inflate( m_Size.x / 2, m_Size.y / 2 );
224 
225  // calculate the corners coordinates in current gerber axis orientations
226  wxPoint org = GetABPosition( bbox.GetOrigin() );
227  wxPoint end = GetABPosition( bbox.GetEnd() );
228 
229  // Set the corners position:
230  bbox.SetOrigin( org );
231  bbox.SetEnd( end );
232  bbox.Normalize();
233 
234  return bbox;
235 }
Class EDA_RECT handles the component boundary box.
wxPoint GetABPosition(const wxPoint &aXYPosition) const
Function GetABPosition returns the image position of aPosition for this object.
wxString GERBER_DRAW_ITEM::GetClass ( ) const
inlineoverridevirtual

Function GetClass returns the class name.

Returns
wxString

Implements EDA_ITEM.

Definition at line 256 of file class_gerber_draw_item.h.

257  {
258  return wxT( "GERBER_DRAW_ITEM" );
259  }
D_CODE * GERBER_DRAW_ITEM::GetDcodeDescr ( )

Function GetDcodeDescr returns the GetDcodeDescr of this object, or NULL.

Returns
D_CODE* - a pointer to the DCode description (for flashed items).

Definition at line 206 of file class_gerber_draw_item.cpp.

References FIRST_DCODE, GERBER_FILE_IMAGE::GetDCODE(), LAST_DCODE, m_DCode, and m_GerberImageFile.

Referenced by AM_PRIMITIVE::ConvertShapeToPolygon(), Draw(), AM_PRIMITIVE::DrawBasicShape(), EVT_UPDATE_UI_RANGE(), GetMsgPanelInfo(), AM_PRIMITIVE::GetShapeDim(), AM_PRIMITIVE::IsAMPrimitiveExposureOn(), GERBVIEW_FRAME::OnRightClick(), and ShowGBRShape().

207 {
208  if( (m_DCode < FIRST_DCODE) || (m_DCode > LAST_DCODE) )
209  return NULL;
210 
211  if( m_GerberImageFile == NULL )
212  return NULL;
213 
214  return m_GerberImageFile->GetDCODE( m_DCode, false );
215 }
D_CODE * GetDCODE(int aDCODE, bool aCreateIfNoExist=true)
Function GetDCODE returns a pointer to the D_CODE within this GERBER for the given aDCODE...
#define LAST_DCODE
Definition: dcode.h:71
#define FIRST_DCODE
Definition: dcode.h:70
GERBER_FILE_IMAGE * m_GerberImageFile
STATUS_FLAGS EDA_ITEM::GetFlags ( ) const
inlineinherited

Definition at line 255 of file base_struct.h.

References EDA_ITEM::m_Flags.

Referenced by AbortMoveAndEditTarget(), SCH_SCREEN::addConnectedItemsToBlock(), AddMenusForBitmap(), AddMenusForBusEntry(), AddMenusForComponent(), AddMenusForComponentField(), AddMenusForEditComponent(), AddMenusForGLabel(), AddMenusForHierchicalSheet(), AddMenusForHLabel(), AddMenusForLabel(), AddMenusForSheetPin(), AddMenusForText(), SCH_EDIT_FRAME::BeginSegment(), SCH_EDIT_FRAME::ChangeTextOrient(), Collect_TrackSegmentsToDrag(), SCH_EDIT_FRAME::ConvertPart(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions(), LIB_EDIT_FRAME::CreatePin(), PCB_EDIT_FRAME::createPopUpMenuForFootprints(), PCB_EDIT_FRAME::createPopUpMenuForFpPads(), PCB_EDIT_FRAME::createPopUpMenuForFpTexts(), PCB_EDIT_FRAME::createPopUpMenuForTexts(), PCB_EDIT_FRAME::createPopupMenuForTracks(), PCB_EDIT_FRAME::createPopUpMenuForZones(), PCB_EDIT_FRAME::Delete_Segment_Edge(), BOARD::Draw(), PCB_EDIT_FRAME::Edit_TrackSegm_Width(), SCH_EDIT_FRAME::EditComponentFieldText(), SCH_EDIT_FRAME::EditImage(), PCB_EDIT_FRAME::FlipTextePcb(), LIB_VIEW_FRAME::GeneralControl(), SCH_EDIT_FRAME::GeneralControl(), SCH_SCREEN::GetConnection(), InitialiseDragParameters(), LIB_EDIT_FRAME::LoadOneSymbol(), Magnetize(), SCH_EDIT_FRAME::MirrorImage(), SCH_EDIT_FRAME::MirrorSheet(), moveBitmap(), SCH_EDIT_FRAME::OnAutoplaceFields(), SCH_EDIT_FRAME::OnConvertTextType(), SCH_EDIT_FRAME::OnCopySchematicItemRequest(), SCH_EDIT_FRAME::OnDragItem(), SCH_EDIT_FRAME::OnEditItem(), LIB_EDIT_FRAME::OnEditPin(), FOOTPRINT_EDIT_FRAME::OnHotKey(), SCH_EDIT_FRAME::OnHotKey(), PCB_EDIT_FRAME::OnHotKey(), PCB_EDIT_FRAME::OnHotkeyBeginRoute(), PCB_EDIT_FRAME::OnHotkeyCopyItem(), PCB_EDIT_FRAME::OnHotkeyDeleteItem(), PCB_EDIT_FRAME::OnHotkeyDuplicateOrArrayItem(), PCB_EDIT_FRAME::OnHotkeyEditItem(), PCB_EDIT_FRAME::OnHotkeyFlipItem(), PCB_EDIT_FRAME::OnHotkeyMoveItem(), PCB_EDIT_FRAME::OnHotkeyPlaceItem(), PCB_EDIT_FRAME::OnHotkeyRotateItem(), FOOTPRINT_EDIT_FRAME::OnLeftClick(), SCH_EDIT_FRAME::OnLeftClick(), PCB_EDIT_FRAME::OnLeftClick(), FOOTPRINT_EDIT_FRAME::OnLeftDClick(), SCH_EDIT_FRAME::OnLeftDClick(), PCB_EDIT_FRAME::OnLeftDClick(), SCH_EDIT_FRAME::OnMoveItem(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick(), TARGET_PROPERTIES_DIALOG_EDITOR::OnOkClick(), SCH_EDIT_FRAME::OnOpenLibraryEditor(), SCH_EDIT_FRAME::OnOrient(), FOOTPRINT_EDIT_FRAME::OnRightClick(), GERBVIEW_FRAME::OnRightClick(), SCH_EDIT_FRAME::OnRightClick(), PCB_EDIT_FRAME::OnRightClick(), SCH_EDIT_FRAME::OnRotate(), SCH_EDIT_FRAME::OnSelectUnit(), PCB_EDIT_FRAME::PlaceTarget(), FOOTPRINT_EDIT_FRAME::PrepareItemForHotkey(), LIB_EDIT_FRAME::Process_Special_Functions(), EDIT_TOOL::Properties(), PCB_BASE_FRAME::Rotate_Module(), PCB_EDIT_FRAME::Rotate_Texte_Pcb(), SCH_EDIT_FRAME::RotateField(), SCH_EDIT_FRAME::RotateHierarchicalSheet(), SCH_EDIT_FRAME::RotateImage(), PCB_BASE_FRAME::RotateTextModule(), SCH_EDIT_FRAME::SaveCopyInUndoList(), SCH_SCREEN::SelectBlockItems(), SCH_EDIT_FRAME::SetBusEntryShape(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::SetInitCmp(), Show_Drag_Track_Segment_With_Cte_Slope(), Show_MoveNode(), PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope(), PCB_EDIT_FRAME::StartMoveOneNodeOrSegment(), DIALOG_LABEL_EDITOR::TextPropertiesAccept(), DIALOG_PCB_TEXT_PROPERTIES::TransferDataFromWindow(), and DIALOG_MODULE_BOARD_EDITOR::TransferDataFromWindow().

255 { return m_Flags; }
STATUS_FLAGS m_Flags
Flag bits for editing and other uses.
Definition: base_struct.h:175
int GERBER_DRAW_ITEM::GetLayer ( ) const

Function GetLayer returns the layer this item is on.

Definition at line 80 of file class_gerber_draw_item.cpp.

References m_GerberImageFile, and GERBER_FILE_IMAGE::m_GraphicLayer.

Referenced by GetMsgPanelInfo().

81 {
82  // returns the layer this item is on, or 0 if the m_GerberImageFile is NULL.
84 }
GERBER_FILE_IMAGE * m_GerberImageFile
bool GERBER_DRAW_ITEM::GetLayerPolarity ( )
inline

Definition at line 127 of file class_gerber_draw_item.h.

References m_LayerNegative.

128  {
129  return m_LayerNegative;
130  }
DHEAD* EDA_ITEM::GetList ( ) const
inlineinherited

Definition at line 209 of file base_struct.h.

References EDA_ITEM::m_List.

Referenced by BOARD::CreateLockPoint(), BOARD_ITEM::DeleteStructure(), DHEAD::insert(), BOARD::MarkTrace(), DHEAD::remove(), BOARD_ITEM::UnLink(), and UnLink().

209 { return m_List; }
DHEAD * m_List
which DLIST I am on.
Definition: base_struct.h:166
BITMAP_DEF EDA_ITEM::GetMenuImage ( ) const
virtualinherited

Function GetMenuImage returns a pointer to an image to be used in menus.

The default version returns the right arrow image. Override this function to provide object specific menu images.

Returns
The menu image associated with the item.

Reimplemented in ZONE_CONTAINER, SCH_SHEET, MODULE, SCH_COMPONENT, D_PAD, LIB_PIN, VIA, SEGZONE, SCH_HIERLABEL, SCH_GLOBALLABEL, TRACK, SCH_LABEL, DRAWSEGMENT, LIB_FIELD, DIMENSION, SCH_SHEET_PIN, TEXTE_MODULE, SCH_TEXT, SCH_FIELD, LIB_ARC, TEXTE_PCB, SCH_BITMAP, LIB_TEXT, SCH_LINE, EDGE_MODULE, LIB_POLYLINE, SCH_BUS_ENTRY_BASE, MARKER_PCB, LIB_RECTANGLE, LIB_CIRCLE, PCB_TARGET, SCH_MARKER, SCH_NO_CONNECT, and SCH_JUNCTION.

Definition at line 282 of file base_struct.cpp.

References dummy_xpm.

Referenced by FOOTPRINT_EDIT_FRAME::ModeditLocateAndDisplay(), and PCB_BASE_FRAME::PcbGeneralLocateAndDisplay().

283 {
284  return dummy_xpm;
285 }
static const BITMAP_OPAQUE dummy_xpm[1]
Definition: base_struct.cpp:56
void GERBER_DRAW_ITEM::GetMsgPanelInfo ( std::vector< MSG_PANEL_ITEM > &  aList)
overridevirtual

Function GetMsgPanelInfo populates aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.

Note
This method replaces DisplayInfo() so that KiCad objects no longer have any knowledge of wxWidgets UI objects.
Parameters
aListis the list to populate.

Reimplemented from EDA_ITEM.

Definition at line 497 of file class_gerber_draw_item.cpp.

References BLUE, BROWN, CYAN, DARKCYAN, DARKRED, GBR_NETLIST_METADATA::GBR_NETINFO_CMP, GBR_NETLIST_METADATA::GBR_NETINFO_NET, GBR_NETLIST_METADATA::GBR_NETINFO_PAD, GBR_NETLIST_METADATA::GBR_NETINFO_UNSPECIFIED, GetChars(), GetDcodeDescr(), GERBER_FILE_IMAGE_LIST::GetDisplayName(), GERBER_FILE_IMAGE_LIST::GetImagesList(), GetLayer(), D_CODE::m_AperFunction, GBR_NETLIST_METADATA::m_Cmpref, m_DCode, m_LayerNegative, m_lyrRotation, m_mirrorA, m_mirrorB, GBR_NETLIST_METADATA::m_NetAttribType, m_netAttributes, GBR_NETLIST_METADATA::m_Netname, GBR_NETLIST_METADATA::m_Padname, m_swapAxis, RED, and ShowGBRShape().

Referenced by GERBVIEW_FRAME::Locate(), and GERBVIEW_FRAME::SetCurItem().

498 {
499  wxString msg;
500  wxString text;
501 
502  msg = ShowGBRShape();
503  aList.push_back( MSG_PANEL_ITEM( _( "Type" ), msg, DARKCYAN ) );
504 
505  // Display D_Code value:
506  msg.Printf( _( "D Code %d" ), m_DCode );
507  D_CODE* apertDescr = GetDcodeDescr();
508 
509  if( apertDescr->m_AperFunction.IsEmpty() )
510  text = _( "No attribute" );
511  else
512  text = apertDescr->m_AperFunction;
513 
514  aList.push_back( MSG_PANEL_ITEM( msg, text, RED ) );
515 
516  // Display graphic layer number
518  aList.push_back( MSG_PANEL_ITEM( _( "Graphic Layer" ), msg, BROWN ) );
519 
520  // Display item rotation
521  // The full rotation is Image rotation + m_lyrRotation
522  // but m_lyrRotation is specific to this object
523  // so we display only this parameter
524  msg.Printf( wxT( "%f" ), m_lyrRotation );
525  aList.push_back( MSG_PANEL_ITEM( _( "Rotation" ), msg, BLUE ) );
526 
527  // Display item polarity (item specific)
528  msg = m_LayerNegative ? _("Clear") : _("Dark");
529  aList.push_back( MSG_PANEL_ITEM( _( "Polarity" ), msg, BLUE ) );
530 
531  // Display mirroring (item specific)
532  msg.Printf( wxT( "A:%s B:%s" ),
533  m_mirrorA ? _("Yes") : _("No"),
534  m_mirrorB ? _("Yes") : _("No"));
535  aList.push_back( MSG_PANEL_ITEM( _( "Mirror" ), msg, DARKRED ) );
536 
537  // Display AB axis swap (item specific)
538  msg = m_swapAxis ? wxT( "A=Y B=X" ) : wxT( "A=X B=Y" );
539  aList.push_back( MSG_PANEL_ITEM( _( "AB axis" ), msg, DARKRED ) );
540 
541  // Display net info, if exists
543  return;
544 
545  // Build full net info:
546  wxString net_msg;
547  wxString cmp_pad_msg;
548 
550  {
551  net_msg = _( "Net:" );
552  net_msg << " ";
553  if( m_netAttributes.m_Netname.IsEmpty() )
554  net_msg << "<no net name>";
555  else
556  net_msg << m_netAttributes.m_Netname;
557  }
558 
560  {
561  cmp_pad_msg.Printf( _( "Cmp: %s; Pad: %s" ),
564  }
565 
567  {
568  cmp_pad_msg = _( "Cmp:" );
569  cmp_pad_msg << " " << m_netAttributes.m_Cmpref;
570  }
571 
572 
573  aList.push_back( MSG_PANEL_ITEM( net_msg, cmp_pad_msg, CYAN ) );
574 }
Definition: colors.h:57
print info associated to a component (TO.C attribute)
const wxString GetDisplayName(int aIdx, bool aNameOnly=false)
D_CODE * GetDcodeDescr()
Function GetDcodeDescr returns the GetDcodeDescr of this object, or NULL.
wxString m_Cmpref
the component reference parent of the data
Definition: colors.h:54
int GetLayer() const
Function GetLayer returns the layer this item is on.
wxString m_Padname
for a flashed pad: the pad name ((TO.P attribute)
Definition: colors.h:59
static GERBER_FILE_IMAGE_LIST & GetImagesList()
GBR_NETLIST_METADATA m_netAttributes
the string given by a TO attribute set in aperture (dcode).
wxString m_Netname
for items associated to a net: the netname
Definition: colors.h:60
wxString m_AperFunction
the aperture attribute (created by a TA.AperFunction command) attached to the D_CODE ...
Definition: dcode.h:109
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
Class D_CODE holds a gerber DCODE (also called Aperture) definition.
Definition: dcode.h:81
print info associated to a flashed pad (TO.P attribute)
Class EDA_MSG_ITEM is used EDA_MSG_PANEL as the item type for displaying messages.
Definition: msgpanel.h:53
print info associated to a net (TO.N attribute)
int m_NetAttribType
the type of net info (used to define the gerber string to create)
Definition: colors.h:62
const GBR_NETLIST_METADATA& GERBER_DRAW_ITEM::GetNetAttributes ( )
inline

Definition at line 119 of file class_gerber_draw_item.h.

References m_netAttributes.

Referenced by EVT_UPDATE_UI_RANGE(), and GERBVIEW_FRAME::OnRightClick().

119 { return m_netAttributes; }
GBR_NETLIST_METADATA m_netAttributes
the string given by a TO attribute set in aperture (dcode).
const wxPoint& GERBER_DRAW_ITEM::GetPosition ( ) const
inline

Function GetPosition returns the position of this object.

Returns
const wxPoint& - The position of this object. This function exists mainly to satisfy the virtual GetPosition() in parent class

Definition at line 176 of file class_gerber_draw_item.h.

References m_Start.

176 { return m_Start; }
wxString EDA_ITEM::GetSelectMenuText ( ) const
virtualinherited

Function GetSelectMenuText returns the text to display to be used in the selection clarification context menu when multiple items are found at the current cursor position.

The default version of this function raises an assertion in the debug mode and returns a string to indicate that it was not overridden to provide the object specific text.

Returns
The menu text string.

Reimplemented in ZONE_CONTAINER, SCH_SHEET, MODULE, SCH_COMPONENT, D_PAD, LIB_PIN, VIA, SEGZONE, SCH_HIERLABEL, SCH_GLOBALLABEL, TRACK, SCH_LABEL, DRAWSEGMENT, LIB_FIELD, DIMENSION, SCH_SHEET_PIN, TEXTE_MODULE, SCH_TEXT, SCH_FIELD, SCH_BUS_BUS_ENTRY, LIB_ARC, SCH_BUS_WIRE_ENTRY, TEXTE_PCB, SCH_BITMAP, LIB_TEXT, SCH_LINE, EDGE_MODULE, LIB_POLYLINE, MARKER_PCB, LIB_RECTANGLE, LIB_CIRCLE, PCB_TARGET, SCH_MARKER, SCH_NO_CONNECT, and SCH_JUNCTION.

Definition at line 175 of file base_struct.cpp.

References EDA_ITEM::GetClass().

Referenced by SELECTION_TOOL::disambiguationMenu(), DRC::fillMarker(), SCH_FIND_COLLECTOR::GetText(), FOOTPRINT_EDIT_FRAME::ModeditLocateAndDisplay(), and PCB_BASE_FRAME::PcbGeneralLocateAndDisplay().

176 {
177  wxFAIL_MSG( wxT( "GetSelectMenuText() was not overridden for schematic item type " ) +
178  GetClass() );
179 
180  return wxString( wxT( "Undefined menu text for " ) + GetClass() );
181 }
virtual wxString GetClass() const =0
Function GetClass returns the class name.
STATUS_FLAGS EDA_ITEM::GetStatus ( ) const
inlineinherited

Definition at line 250 of file base_struct.h.

References EDA_ITEM::m_Status.

250 { return m_Status; }
STATUS_FLAGS m_Status
Definition: base_struct.h:161
wxPoint GERBER_DRAW_ITEM::GetXYPosition ( const wxPoint aABPosition) const

Function GetXYPosition returns the image position of aPosition for this object.

Image position is the value of aPosition, modified by image parameters: offsets, axis selection, scale, rotation

Parameters
aABPosition= position in A,B plotter axis
Returns
const wxPoint - The given position in X,Y axis.

Definition at line 117 of file class_gerber_draw_item.cpp.

References KiROUND(), m_drawScale, m_GerberImageFile, GERBER_FILE_IMAGE::m_ImageJustifyOffset, GERBER_FILE_IMAGE::m_ImageOffset, GERBER_FILE_IMAGE::m_ImageRotation, m_layerOffset, m_lyrRotation, m_mirrorA, m_mirrorB, m_swapAxis, RotatePoint(), wxPoint::x, and wxPoint::y.

Referenced by HitTest(), and MoveAB().

118 {
119  // do the inverse transform made by GetABPosition
120  wxPoint xyPos = aABPosition;
121 
122  if( m_mirrorA )
123  xyPos.x = -xyPos.x;
124 
125  if( !m_mirrorB )
126  xyPos.y = -xyPos.y;
127 
128  double rotation = m_lyrRotation * 10 + m_GerberImageFile->m_ImageRotation * 10;
129 
130  if( rotation )
131  RotatePoint( &xyPos, rotation );
132 
133  xyPos.x = KiROUND( xyPos.x / m_drawScale.x );
134  xyPos.y = KiROUND( xyPos.y / m_drawScale.y );
136 
137  if( m_swapAxis )
138  std::swap( xyPos.x, xyPos.y );
139 
140  return xyPos - m_GerberImageFile->m_ImageJustifyOffset;
141 }
static int KiROUND(double v)
KiROUND rounds a floating point number to an int using "round halfway cases away from zero"...
Definition: common.h:107
void RotatePoint(int *pX, int *pY, double angle)
Definition: trigo.cpp:317
GERBER_FILE_IMAGE * m_GerberImageFile
bool GERBER_DRAW_ITEM::HasNegativeItems ( )

Function HasNegativeItems.

Returns
true if this item or at least one shape (when using aperture macros must be drawn in background color used to optimize screen refresh (when no items are in background color refresh can be faster)

Definition at line 262 of file class_gerber_draw_item.cpp.

References m_GerberImageFile, GERBER_FILE_IMAGE::m_ImageNegative, and m_LayerNegative.

263 {
265 
266  // if isClear is true, this item has negative shape
267  return isClear;
268 }
GERBER_FILE_IMAGE * m_GerberImageFile
bool GERBER_DRAW_ITEM::HitTest ( const wxPoint aRefPos) const
overridevirtual

Function HitTest tests if the given wxPoint is within the bounds of this object.

Parameters
aRefPosa wxPoint to test
Returns
bool - true if a hit, else false

Reimplemented from EDA_ITEM.

Definition at line 577 of file class_gerber_draw_item.cpp.

References GetXYPosition(), HitTestPoints(), m_End, m_Flashed, m_Size, m_Start, min, and TestSegmentHit().

Referenced by GERBVIEW_FRAME::Block_Move(), and GERBVIEW_FRAME::Locate().

578 {
579  // calculate aRefPos in XY gerber axis:
580  wxPoint ref_pos = GetXYPosition( aRefPos );
581 
582  // TODO: a better analyze of the shape (perhaps create a D_CODE::HitTest for flashed items)
583  int radius = std::min( m_Size.x, m_Size.y ) >> 1;
584 
585  if( m_Flashed )
586  return HitTestPoints( m_Start, ref_pos, radius );
587  else
588  return TestSegmentHit( ref_pos, m_Start, m_End, radius );
589 }
bool HitTestPoints(const wxPoint &pointA, const wxPoint &pointB, double threshold)
Test, if two points are near each other.
Definition: trigo.h:142
bool TestSegmentHit(const wxPoint &aRefPoint, wxPoint aStart, wxPoint aEnd, int aDist)
Function TestSegmentHit test for hit on line segment i.e.
Definition: trigo.cpp:142
wxPoint GetXYPosition(const wxPoint &aABPosition) const
Function GetXYPosition returns the image position of aPosition for this object.
#define min(a, b)
Definition: auxiliary.h:85
bool GERBER_DRAW_ITEM::HitTest ( const EDA_RECT aRefArea) const

Function HitTest (overloaded) tests if the given wxRect intersect this object.

For now, an ending point must be inside this rect.

Parameters
aRefAreaa wxPoint to test
Returns
bool - true if a hit, else false

Definition at line 592 of file class_gerber_draw_item.cpp.

References EDA_RECT::Contains(), GetABPosition(), m_End, and m_Start.

593 {
594  wxPoint pos = GetABPosition( m_Start );
595 
596  if( aRefArea.Contains( pos ) )
597  return true;
598 
599  pos = GetABPosition( m_End );
600 
601  if( aRefArea.Contains( pos ) )
602  return true;
603 
604  return false;
605 }
bool Contains(const wxPoint &aPoint) const
Function Contains.
wxPoint GetABPosition(const wxPoint &aXYPosition) const
Function GetABPosition returns the image position of aPosition for this object.
bool EDA_ITEM::IsBrightened ( ) const
inlineinherited

Definition at line 224 of file base_struct.h.

References BRIGHTENED.

Referenced by SELECTION_TOOL::disambiguationMenu().

224 { return m_Flags & BRIGHTENED; }
#define BRIGHTENED
item is drawn with a bright contour
Definition: base_struct.h:137
STATUS_FLAGS m_Flags
Flag bits for editing and other uses.
Definition: base_struct.h:175
bool EDA_ITEM::IsDragging ( ) const
inlineinherited
bool EDA_ITEM::IsHighlighted ( ) const
inlineinherited

Definition at line 223 of file base_struct.h.

References HIGHLIGHTED.

223 { return m_Flags & HIGHLIGHTED; }
#define HIGHLIGHTED
item is drawn in normal colors, when the rest is darkened
Definition: base_struct.h:136
STATUS_FLAGS m_Flags
Flag bits for editing and other uses.
Definition: base_struct.h:175
bool EDA_ITEM::IsModified ( ) const
inlineinherited

Definition at line 217 of file base_struct.h.

References IS_CHANGED.

Referenced by LIB_EDIT_FRAME::OnEditPin().

217 { return m_Flags & IS_CHANGED; }
#define IS_CHANGED
std::function passed to nested users by ref, avoids copying std::function
Definition: base_struct.h:109
STATUS_FLAGS m_Flags
Flag bits for editing and other uses.
Definition: base_struct.h:175
bool EDA_ITEM::IsNew ( ) const
inlineinherited

Definition at line 216 of file base_struct.h.

References IS_NEW.

Referenced by Abort_Edit_Pcb_Text(), Abort_EditEdge(), Abort_Move_ModuleOutline(), Abort_MoveOrCopyModule(), Abort_Zone_Create_Outline(), AbortBuildDimension(), AbortMoveAndEditTarget(), abortMoveBitmap(), abortMoveItem(), AbortPinMove(), AbortSymbolTraceOn(), SCH_EDIT_FRAME::addCurrentItemToList(), SCH_EDIT_FRAME::addJunctionMenuEntries(), AddMenusForBus(), AddMenusForWire(), PCB_EDIT_FRAME::Delete_Segment(), PCB_EDIT_FRAME::Delete_Segment_Edge(), SCH_EDIT_FRAME::DeleteCurrentSegment(), LIB_ARC::drawEditGraphics(), LIB_ARC::drawGraphic(), DrawMovePin(), SCH_EDIT_FRAME::EditSheetPin(), LIB_PIN::EnableEditMode(), LIB_EDIT_FRAME::EndDrawGraphicItem(), SCH_EDIT_FRAME::EndSegment(), ExitSheet(), SCH_EDIT_FRAME::OnAutoplaceFields(), SCH_EDIT_FRAME::OnConvertTextType(), LIB_EDIT_FRAME::OnEditPin(), SCH_EDIT_FRAME::OnHotKey(), FOOTPRINT_EDIT_FRAME::OnLeftClick(), LIB_EDIT_FRAME::OnLeftClick(), PCB_EDIT_FRAME::OnLeftClick(), FOOTPRINT_EDIT_FRAME::OnLeftDClick(), LIB_EDIT_FRAME::OnLeftDClick(), SCH_EDIT_FRAME::OnLeftDClick(), PCB_EDIT_FRAME::OnLeftDClick(), LIB_EDIT_FRAME::OnRightClick(), SCH_EDIT_FRAME::OnRightClick(), SCH_EDIT_FRAME::OnRotate(), PCB_EDIT_FRAME::Place_Texte_Pcb(), PCB_BASE_FRAME::PlaceModule(), LIB_EDIT_FRAME::PlacePin(), PCB_EDIT_FRAME::PlaceTarget(), SCH_EDIT_FRAME::PrepareMoveItem(), SCH_EDIT_FRAME::ReSizeSheet(), ShowClearance(), PCB_EDIT_FRAME::StartMoveTextePcb(), PCB_EDIT_FRAME::SwitchLayer(), and DIALOG_LABEL_EDITOR::TextPropertiesAccept().

216 { return m_Flags & IS_NEW; }
#define IS_NEW
New item, just created.
Definition: base_struct.h:113
STATUS_FLAGS m_Flags
Flag bits for editing and other uses.
Definition: base_struct.h:175
virtual bool EDA_ITEM::IsReplaceable ( ) const
inlinevirtualinherited

Function IsReplaceable.

Override this method in any derived object that supports test find and replace.

Returns
True if the item has replaceable text that can be modified using the find and replace dialog.

Reimplemented in SCH_COMPONENT, SCH_SHEET, SCH_LABEL, SCH_SHEET_PIN, SCH_FIELD, and SCH_TEXT.

Definition at line 444 of file base_struct.h.

Referenced by EDA_ITEM::Matches(), and EDA_ITEM::Replace().

444 { return false; }
bool EDA_ITEM::IsResized ( ) const
inlineinherited

Definition at line 222 of file base_struct.h.

References IS_RESIZED.

Referenced by ExitSheet().

222 { return m_Flags & IS_RESIZED; }
STATUS_FLAGS m_Flags
Flag bits for editing and other uses.
Definition: base_struct.h:175
#define IS_RESIZED
Item being resized.
Definition: base_struct.h:114
bool EDA_ITEM::IsWireImage ( ) const
inlineinherited

Definition at line 220 of file base_struct.h.

References IS_WIRE_IMAGE.

Referenced by abortMoveItem(), and SCH_FIELD::Draw().

220 { return m_Flags & IS_WIRE_IMAGE; }
#define IS_WIRE_IMAGE
Item to be drawn as wireframe while editing.
Definition: base_struct.h:117
STATUS_FLAGS m_Flags
Flag bits for editing and other uses.
Definition: base_struct.h:175
SEARCH_RESULT EDA_ITEM::IterateForward ( EDA_ITEM listStart,
INSPECTOR  inspector,
void *  testData,
const KICAD_T  scanTypes[] 
)
staticinherited

Function IterateForward walks through the object tree calling the inspector() on each object type requested in scanTypes.

Parameters
listStartThe first in a list of EDA_ITEMs to iterate over.
inspectorIs an INSPECTOR to call on each object that is one of the requested scanTypes.
testDataIs an aid to testFunc, and should be sufficient to allow it to fully determine if an item meets the match criteria, but it may also be used to collect output.
scanTypesA KICAD_T array that is EOT terminated, and provides both the order and interest level of of the types of objects to be iterated over.
Returns
SEARCH_RESULT SEARCH_QUIT if the called INSPECTOR returned SEARCH_QUIT, else SCAN_CONTINUE;

Definition at line 132 of file base_struct.cpp.

References EDA_ITEM::Pnext, SEARCH_CONTINUE, SEARCH_QUIT, and EDA_ITEM::Visit().

Referenced by SCH_COLLECTOR::Collect(), SCH_FIND_COLLECTOR::Collect(), SCH_TYPE_COLLECTOR::Collect(), MODULE::Visit(), and BOARD::Visit().

136 {
137  EDA_ITEM* p = listStart;
138 
139  for( ; p; p = p->Pnext )
140  {
141  if( SEARCH_QUIT == p->Visit( inspector, testData, scanTypes ) )
142  return SEARCH_QUIT;
143  }
144 
145  return SEARCH_CONTINUE;
146 }
virtual SEARCH_RESULT Visit(INSPECTOR inspector, void *testData, const KICAD_T scanTypes[])
Function Visit may be re-implemented for each derived class in order to handle all the types given by...
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:151
EDA_ITEM * Pnext
next in linked list
Definition: base_struct.h:164
virtual bool EDA_ITEM::Matches ( wxFindReplaceData &  aSearchData,
void *  aAuxData,
wxPoint aFindLocation 
)
inlinevirtualinherited

Function Matches compares the item against the search criteria in aSearchData.

The base class returns false since many of the objects derived from EDA_ITEM do not have any text to search.

Parameters
aSearchDataA reference to a wxFindReplaceData object containing the search criteria.
aAuxDataA pointer to optional data required for the search or NULL if not used.
aFindLocationA pointer to a wxPoint object to store the location of matched item. The pointer can be NULL if it is not used.
Returns
True if the item's text matches the search criteria in aSearchData.

Reimplemented in SCH_SHEET, SCH_COMPONENT, SCH_SHEET_PIN, SCH_FIELD, SCH_TEXT, LIB_PIN, and SCH_MARKER.

Definition at line 400 of file base_struct.h.

Referenced by SCH_FIND_COLLECTOR::Inspect(), SCH_MARKER::Matches(), LIB_PIN::Matches(), SCH_TEXT::Matches(), SCH_FIELD::Matches(), SCH_SHEET_PIN::Matches(), and SCH_SHEET::Matches().

401  {
402  return false;
403  }
bool EDA_ITEM::Matches ( const wxString &  aText,
wxFindReplaceData &  aSearchData 
)
protectedinherited

Function Matches compares aText against search criteria in aSearchData.

This is a helper function for simplify derived class logic.

Parameters
aTextA reference to a wxString object containing the string to test.
aSearchDataThe criteria to search against.
Returns
True if aText matches the search criteria in aSearchData.

Definition at line 184 of file base_struct.cpp.

References FR_MATCH_WILDCARD, FR_SEARCH_REPLACE, and EDA_ITEM::IsReplaceable().

185 {
186  wxString text = aText;
187  wxString searchText = aSearchData.GetFindString();
188 
189  // Don't match if searching for replaceable item and the item doesn't support text replace.
190  if( (aSearchData.GetFlags() & FR_SEARCH_REPLACE) && !IsReplaceable() )
191  return false;
192 
193  if( aSearchData.GetFlags() & wxFR_WHOLEWORD )
194  return aText.IsSameAs( searchText, aSearchData.GetFlags() & wxFR_MATCHCASE );
195 
196  if( aSearchData.GetFlags() & FR_MATCH_WILDCARD )
197  {
198  if( aSearchData.GetFlags() & wxFR_MATCHCASE )
199  return text.Matches( searchText );
200 
201  return text.MakeUpper().Matches( searchText.MakeUpper() );
202  }
203 
204  if( aSearchData.GetFlags() & wxFR_MATCHCASE )
205  return aText.Find( searchText ) != wxNOT_FOUND;
206 
207  return text.MakeUpper().Find( searchText.MakeUpper() ) != wxNOT_FOUND;
208 }
virtual bool IsReplaceable() const
Function IsReplaceable.
Definition: base_struct.h:444
Perform search using simple wild card matching (* & ?).
Perform a search for a item that has replaceable text.
void GERBER_DRAW_ITEM::MoveAB ( const wxPoint aMoveVector)

Function MoveAB move this object.

Parameters
aMoveVector- the move vector for this object.

Definition at line 238 of file class_gerber_draw_item.cpp.

References GetXYPosition(), m_ArcCentre, m_End, m_PolyCorners, and m_Start.

Referenced by GERBVIEW_FRAME::Block_Move().

239 {
240  wxPoint xymove = GetXYPosition( aMoveVector );
241 
242  m_Start += xymove;
243  m_End += xymove;
244  m_ArcCentre += xymove;
245 
246  for( unsigned ii = 0; ii < m_PolyCorners.size(); ii++ )
247  m_PolyCorners[ii] += xymove;
248 }
std::vector< wxPoint > m_PolyCorners
wxPoint GetXYPosition(const wxPoint &aABPosition) const
Function GetXYPosition returns the image position of aPosition for this object.
void GERBER_DRAW_ITEM::MoveXY ( const wxPoint aMoveVector)

Function MoveXY move this object.

Parameters
aMoveVector- the move vector for this object, in XY gerber axis.

Definition at line 251 of file class_gerber_draw_item.cpp.

References m_ArcCentre, m_End, m_PolyCorners, and m_Start.

Referenced by GERBER_FILE_IMAGE::StepAndRepeatItem().

252 {
253  m_Start += aMoveVector;
254  m_End += aMoveVector;
255  m_ArcCentre += aMoveVector;
256 
257  for( unsigned ii = 0; ii < m_PolyCorners.size(); ii++ )
258  m_PolyCorners[ii] += aMoveVector;
259 }
std::vector< wxPoint > m_PolyCorners
bool EDA_ITEM::operator< ( const EDA_ITEM aItem) const
inherited

Test if another item is less than this object.

Parameters
aItem- Item to compare against.
Returns
- True if aItem is less than the item.

Definition at line 241 of file base_struct.cpp.

References Format(), GetChars(), and EDA_ITEM::GetClass().

242 {
243  wxFAIL_MSG( wxString::Format( wxT( "Less than operator not defined for item type %s." ),
244  GetChars( GetClass() ) ) );
245 
246  return false;
247 }
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
virtual wxString GetClass() const =0
Function GetClass returns the class name.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
bool EDA_ITEM::Replace ( wxFindReplaceData &  aSearchData,
wxString &  aText 
)
inherited

Helper function used in search and replace dialog Function Replace performs a text replace on aText using the find and replace criteria in aSearchData on items that support text find and replace.

Parameters
aSearchDataA reference to a wxFindReplaceData object containing the search and replace criteria.
aTextA reference to a wxString object containing the text to be replaced.
Returns
True if aText was modified, otherwise false.

Definition at line 211 of file base_struct.cpp.

References GetChars(), EDA_ITEM::GetClass(), and EDA_ITEM::IsReplaceable().

Referenced by SCH_TEXT::Replace(), SCH_FIELD::Replace(), SCH_SHEET_PIN::Replace(), SCH_SHEET::Replace(), and SCH_FIND_COLLECTOR::ReplaceItem().

212 {
213  wxCHECK_MSG( IsReplaceable(), false,
214  wxT( "Attempt to replace text in <" ) + GetClass() + wxT( "> item." ) );
215 
216  wxString searchString = (aSearchData.GetFlags() & wxFR_MATCHCASE) ? aText : aText.Upper();
217 
218  int result = searchString.Find( (aSearchData.GetFlags() & wxFR_MATCHCASE) ?
219  aSearchData.GetFindString() :
220  aSearchData.GetFindString().Upper() );
221 
222  if( result == wxNOT_FOUND )
223  return false;
224 
225  wxString prefix = aText.Left( result );
226  wxString suffix;
227 
228  if( aSearchData.GetFindString().length() + result < aText.length() )
229  suffix = aText.Right( aText.length() - ( aSearchData.GetFindString().length() + result ) );
230 
231  wxLogTrace( traceFindReplace, wxT( "Replacing '%s', prefix '%s', replace '%s', suffix '%s'." ),
232  GetChars( aText ), GetChars( prefix ), GetChars( aSearchData.GetReplaceString() ),
233  GetChars( suffix ) );
234 
235  aText = prefix + aSearchData.GetReplaceString() + suffix;
236 
237  return true;
238 }
virtual bool IsReplaceable() const
Function IsReplaceable.
Definition: base_struct.h:444
const wxString traceFindReplace(wxT("KicadFindReplace"))
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
virtual wxString GetClass() const =0
Function GetClass returns the class name.
virtual bool EDA_ITEM::Replace ( wxFindReplaceData &  aSearchData,
void *  aAuxData = NULL 
)
inlinevirtualinherited

Function Replace performs a text replace using the find and replace criteria in aSearchData on items that support text find and replace.

This function must be overridden for items that support text replace.

Parameters
aSearchDataA reference to a wxFindReplaceData object containing the search and replace criteria.
aAuxDataA pointer to optional data required for the search or NULL if not used.
Returns
True if the item text was modified, otherwise false.

Reimplemented in SCH_SHEET, SCH_SHEET_PIN, SCH_FIELD, and SCH_TEXT.

Definition at line 432 of file base_struct.h.

432 { return false; }
void GERBER_DRAW_ITEM::SetBack ( EDA_ITEM aBack)
inlineprivate

Definition at line 68 of file class_gerber_draw_item.h.

References EDA_ITEM::Pback.

68 { Pback = aBack; }
EDA_ITEM * Pback
previous in linked list
Definition: base_struct.h:165
void EDA_ITEM::SetBrightened ( )
inlineinherited

Definition at line 229 of file base_struct.h.

References BRIGHTENED, and EDA_ITEM::SetFlags().

Referenced by SELECTION_TOOL::disambiguationMenu().

229 { SetFlags( BRIGHTENED ); }
void SetFlags(STATUS_FLAGS aMask)
Definition: base_struct.h:253
#define BRIGHTENED
item is drawn with a bright contour
Definition: base_struct.h:137
void EDA_ITEM::SetFlags ( STATUS_FLAGS  aMask)
inlineinherited

Definition at line 253 of file base_struct.h.

Referenced by SCH_SCREEN::addConnectedItemsToBlock(), AddSegmentToDragList(), PCBNEW_CONTROL::AppendBoard(), PCB_EDIT_FRAME::AppendBoardFile(), PCB_EDIT_FRAME::Begin_DrawSegment(), FOOTPRINT_EDIT_FRAME::Begin_Edge_Module(), PCB_EDIT_FRAME::Begin_Route(), PCB_EDIT_FRAME::Begin_Zone(), PCB_EDIT_FRAME::BeginMoveDimensionText(), PCB_EDIT_FRAME::BeginMoveTarget(), SCH_EDIT_FRAME::BeginSegment(), PCB_EDIT_FRAME::Change_Side_Module(), SCH_EDIT_FRAME::ConvertPart(), CopyMarkedItems(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions(), LIB_PART::CopySelectedItems(), SCH_EDIT_FRAME::CreateBusBusEntry(), SCH_EDIT_FRAME::CreateBusWireEntry(), SCH_EDIT_FRAME::CreateNewImage(), SCH_EDIT_FRAME::CreateNewText(), LIB_EDIT_FRAME::CreatePin(), SCH_EDIT_FRAME::CreateSheet(), SCH_EDIT_FRAME::CreateSheetPin(), PCB_EDIT_FRAME::CreateTarget(), PCB_EDIT_FRAME::CreateTextePcb(), FOOTPRINT_EDIT_FRAME::CreateTextModule(), PCB_EDIT_FRAME::EditDimension(), LIB_PIN::EnableEditMode(), PCB_EDIT_FRAME::FlipTextePcb(), SCH_SCREEN::GetConnection(), PCB_BASE_FRAME::GlobalChange_PadSettings(), FOOTPRINT_EDIT_FRAME::HandleBlockEnd(), PCB_BASE_FRAME::Import_Pad_Settings(), SCH_EDIT_FRAME::ImportSheetPin(), SCH_JUNCTION::IsSelectStateChanged(), SCH_NO_CONNECT::IsSelectStateChanged(), SCH_MARKER::IsSelectStateChanged(), SCH_BUS_ENTRY_BASE::IsSelectStateChanged(), SCH_LINE::IsSelectStateChanged(), SCH_BITMAP::IsSelectStateChanged(), SCH_TEXT::IsSelectStateChanged(), SCH_COMPONENT::IsSelectStateChanged(), SCH_SHEET::IsSelectStateChanged(), SCH_EDIT_FRAME::Load_Component(), PCB_BASE_FRAME::LoadModuleFromLibrary(), SCH_SCREEN::MarkConnections(), MarkItemsInBloc(), moveBitmap(), SCH_EDIT_FRAME::MoveImage(), SCH_EDIT_FRAME::OnConvertTextType(), SCH_EDIT_FRAME::OnCopySchematicItemRequest(), LIB_EDIT_FRAME::OnEditPin(), TARGET_PROPERTIES_DIALOG_EDITOR::OnOkClick(), SCH_EDIT_FRAME::OnSelectUnit(), PCB_EDIT_FRAME::Other_Layer_Route(), DRAWING_TOOL::PlaceText(), SCH_EDIT_FRAME::PrepareMoveItem(), LIB_EDIT_FRAME::Process_Special_Functions(), EDIT_TOOL::Properties(), SCH_EDIT_FRAME::PutDataInPreviousState(), SCH_EDIT_FRAME::RepeatDrawItem(), LIB_EDIT_FRAME::RepeatPinItem(), SCH_EDIT_FRAME::ReSizeSheet(), PCB_BASE_FRAME::Rotate_Module(), PCB_EDIT_FRAME::Rotate_Texte_Pcb(), SCH_SCREEN::SchematicCleanUp(), SCH_SCREEN::SelectBlockItems(), EDA_ITEM::SetBrightened(), LIB_PIN::SetConversion(), EDA_ITEM::SetHighlighted(), EDA_ITEM::SetModified(), LIB_PIN::SetNumber(), EDA_ITEM::SetSelected(), EDA_ITEM::SetWireImage(), PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope(), PCB_EDIT_FRAME::Start_Move_DrawItem(), FOOTPRINT_EDIT_FRAME::Start_Move_EdgeMod(), PCB_EDIT_FRAME::Start_Move_Zone_Corner(), PCB_EDIT_FRAME::Start_Move_Zone_Drag_Outline_Edge(), PCB_EDIT_FRAME::Start_Move_Zone_Outlines(), PCB_EDIT_FRAME::StartMoveModule(), PCB_EDIT_FRAME::StartMoveOneNodeOrSegment(), PCB_BASE_FRAME::StartMovePad(), LIB_EDIT_FRAME::StartMovePin(), PCB_BASE_FRAME::StartMoveTexteModule(), PCB_EDIT_FRAME::StartMoveTextePcb(), DIALOG_PCB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_PAD_PROPERTIES::TransferDataFromWindow(), and UndrawAndMarkSegmentsToDrag().

253 { m_Flags |= aMask; }
STATUS_FLAGS m_Flags
Flag bits for editing and other uses.
Definition: base_struct.h:175
void EDA_ITEM::SetForceVisible ( bool  aEnable)
inlineinherited

Function SetForceVisible is used to set and cleag force visible flag used to force the item to be drawn even if it's draw attribute is set to not visible.

Parameters
aEnableTrue forces the item to be drawn. False uses the item's visibility setting to determine if the item is to be drawn.

Definition at line 265 of file base_struct.h.

Referenced by SCH_EDIT_FRAME::OnFindSchematicItem(), and SCH_EDIT_FRAME::updateFindReplaceView().

265 { m_forceVisible = aEnable; }
bool m_forceVisible
Set to true to override the visibility setting of the item.
Definition: base_struct.h:172
void EDA_ITEM::SetHighlighted ( )
inlineinherited

Definition at line 228 of file base_struct.h.

References HIGHLIGHTED, and EDA_ITEM::SetFlags().

228 { SetFlags( HIGHLIGHTED ); }
void SetFlags(STATUS_FLAGS aMask)
Definition: base_struct.h:253
#define HIGHLIGHTED
item is drawn in normal colors, when the rest is darkened
Definition: base_struct.h:136
void GERBER_DRAW_ITEM::SetLayerParameters ( )

Function SetLayerParameters Initialize parameters from Image and Layer parameters found in the gerber file: m_UnitsMetric, m_MirrorA, m_MirrorB, m_DrawScale, m_DrawOffset.

Definition at line 144 of file class_gerber_draw_item.cpp.

References GERBER_FILE_IMAGE::GetLayerParams(), m_drawScale, m_GerberImageFile, GERBER_FILE_IMAGE::m_GerbMetric, GERBER_LAYER::m_LayerNegative, m_LayerNegative, m_layerOffset, GERBER_FILE_IMAGE::m_LocalRotation, m_lyrRotation, m_mirrorA, GERBER_FILE_IMAGE::m_MirrorA, m_mirrorB, GERBER_FILE_IMAGE::m_MirrorB, GERBER_FILE_IMAGE::m_Offset, GERBER_FILE_IMAGE::m_Scale, m_swapAxis, GERBER_FILE_IMAGE::m_SwapAxis, and m_UnitsMetric.

Referenced by GERBER_DRAW_ITEM().

145 {
147  m_swapAxis = m_GerberImageFile->m_SwapAxis; // false if A = X, B = Y;
148 
149  // true if A =Y, B = Y
150  m_mirrorA = m_GerberImageFile->m_MirrorA; // true: mirror / axe A
151  m_mirrorB = m_GerberImageFile->m_MirrorB; // true: mirror / axe B
152  m_drawScale = m_GerberImageFile->m_Scale; // A and B scaling factor
153  m_layerOffset = m_GerberImageFile->m_Offset; // Offset from OF command
154 
155  // Rotation from RO command:
158 }
GERBER_FILE_IMAGE * m_GerberImageFile
GERBER_LAYER & GetLayerParams()
Function GetLayerParams.
void GERBER_DRAW_ITEM::SetLayerPolarity ( bool  aNegative)
inline

Definition at line 151 of file class_gerber_draw_item.h.

Referenced by fillArcGBRITEM(), fillArcPOLY(), fillFlashedGBRITEM(), and fillLineGBRITEM().

152  {
153  m_LayerNegative = aNegative;
154  }
void EDA_ITEM::SetList ( DHEAD aList)
inlineinherited

Definition at line 214 of file base_struct.h.

Referenced by DHEAD::append(), DHEAD::insert(), and DHEAD::remove().

214 { m_List = aList; }
DHEAD * m_List
which DLIST I am on.
Definition: base_struct.h:166
void EDA_ITEM::SetModified ( )
inherited
void GERBER_DRAW_ITEM::SetNetAttributes ( const GBR_NETLIST_METADATA aNetAttributes)

Definition at line 67 of file class_gerber_draw_item.cpp.

References GBR_NETLIST_METADATA::GBR_NETINFO_CMP, GBR_NETLIST_METADATA::GBR_NETINFO_NET, GBR_NETLIST_METADATA::GBR_NETINFO_PAD, GBR_NETLIST_METADATA::m_Cmpref, GERBER_FILE_IMAGE::m_ComponentsList, m_GerberImageFile, GBR_NETLIST_METADATA::m_NetAttribType, m_netAttributes, GBR_NETLIST_METADATA::m_Netname, and GERBER_FILE_IMAGE::m_NetnamesList.

Referenced by fillArcGBRITEM(), fillArcPOLY(), fillFlashedGBRITEM(), and fillLineGBRITEM().

68 {
69  m_netAttributes = aNetAttributes;
70 
73  m_GerberImageFile->m_ComponentsList.insert( std::make_pair( m_netAttributes.m_Cmpref, 0 ) );
74 
76  m_GerberImageFile->m_NetnamesList.insert( std::make_pair( m_netAttributes.m_Netname, 0 ) );
77 }
print info associated to a component (TO.C attribute)
wxString m_Cmpref
the component reference parent of the data
GBR_NETLIST_METADATA m_netAttributes
the string given by a TO attribute set in aperture (dcode).
wxString m_Netname
for items associated to a net: the netname
std::map< wxString, int > m_NetnamesList
print info associated to a flashed pad (TO.P attribute)
print info associated to a net (TO.N attribute)
GERBER_FILE_IMAGE * m_GerberImageFile
std::map< wxString, int > m_ComponentsList
int m_NetAttribType
the type of net info (used to define the gerber string to create)
void GERBER_DRAW_ITEM::SetNext ( EDA_ITEM aNext)
inlineprivate

Definition at line 67 of file class_gerber_draw_item.h.

References EDA_ITEM::Pnext.

67 { Pnext = aNext; }
EDA_ITEM * Pnext
next in linked list
Definition: base_struct.h:164
void EDA_ITEM::SetParent ( EDA_ITEM aParent)
inlineinherited

Definition at line 213 of file base_struct.h.

Referenced by MODULE::Add(), BOARD::Add(), BOARD_NETLIST_UPDATER::addNewComponent(), LIB_FIELD::Copy(), SCH_EDIT_FRAME::copyBlockItems(), CopyMarkedItems(), SCH_EDIT_FRAME::CreateSheet(), DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN(), PCB_EDIT_FRAME::Exchange_Module(), PCB_IO::FootprintSave(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), DIALOG_MODULE_MODULE_EDITOR::initModeditProperties(), DIALOG_MODULE_BOARD_EDITOR::InitModeditProperties(), LIB_PART::LIB_PART(), SCH_SHEET::Load(), FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD(), SCH_LEGACY_PLUGIN::loadHierarchy(), LIB_EDIT_FRAME::LoadOneSymbol(), MODULE::MODULE(), DIALOG_MODULE_BOARD_EDITOR::OnEditReference(), DIALOG_MODULE_BOARD_EDITOR::OnEditValue(), DIALOG_LIB_EDIT_PIN::OnPaintShowPanel(), MODULE::operator=(), SCH_COMPONENT::operator=(), PCB_PARSER::parseMODULE_unchecked(), MODULE_EDITOR_TOOLS::PasteItems(), FOOTPRINT_EDIT_FRAME::Process_Special_Functions(), FOOTPRINT_PREVIEW_PANEL::renderFootprint(), BOARD_NETLIST_UPDATER::replaceComponent(), BOARD::ReplaceNetlist(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), PCB_BASE_EDIT_FRAME::SaveCopyInUndoList(), SaveCopyOfZones(), SCH_COMPONENT::SCH_COMPONENT(), SCH_SHEET::SCH_SHEET(), SCH_SHEET_PIN::SCH_SHEET_PIN(), LIB_PART::SetFields(), SetSchItemParent(), PCB_EDIT_FRAME::StartMoveModule(), BOARD_ITEM::SwapData(), SCH_COMPONENT::SwapData(), and SCH_SHEET::SwapData().

213 { m_Parent = aParent; }
EDA_ITEM * m_Parent
Linked list: Link (parent struct)
Definition: base_struct.h:168
void GERBER_DRAW_ITEM::SetPosition ( const wxPoint aPos)
inline

Definition at line 177 of file class_gerber_draw_item.h.

177 { m_Start = aPos; }
void EDA_ITEM::SetSelected ( )
inlineinherited

Definition at line 227 of file base_struct.h.

References SELECTED, and EDA_ITEM::SetFlags().

Referenced by SELECTION_TOOL::selectVisually().

227 { SetFlags( SELECTED ); }
#define SELECTED
Definition: base_struct.h:120
void SetFlags(STATUS_FLAGS aMask)
Definition: base_struct.h:253
void EDA_ITEM::SetStatus ( STATUS_FLAGS  aStatus)
inlineinherited
void EDA_ITEM::SetTimeStamp ( time_t  aNewTimeStamp)
inlineinherited

Definition at line 203 of file base_struct.h.

Referenced by BOARD_NETLIST_UPDATER::addNewComponent(), PCAD2KICAD::PCB_TEXT::AddToBoard(), PCAD2KICAD::PCB_ARC::AddToBoard(), PCAD2KICAD::PCB_PAD::AddToBoard(), PCAD2KICAD::PCB_LINE::AddToBoard(), PCAD2KICAD::PCB_POLYGON::AddToBoard(), PCAD2KICAD::PCB_MODULE::AddToBoard(), SCH_EDIT_FRAME::AppendOneEEProject(), PCB_EDIT_FRAME::Begin_Zone(), SCH_EDIT_FRAME::CreateSheet(), Diagnose(), DuplicateItemsInList(), DuplicateStruct(), EDIT_TOOL::editFootprintInFpEditor(), PCB_EDIT_FRAME::Exchange_Module(), PCB_IO::FootprintSave(), DIALOG_MODULE_BOARD_EDITOR::GotoModuleEditor(), EDA_ITEM::initVars(), BOARD::InsertArea(), SCH_SHEET::Load(), LEGACY_PLUGIN::loadMODULE(), PCB_BASE_FRAME::LoadModuleFromLibrary(), LEGACY_PLUGIN::loadPCB_TARGET(), LEGACY_PLUGIN::loadPCB_TEXT(), EAGLE_PLUGIN::loadPlain(), EAGLE_PLUGIN::loadSignals(), LEGACY_PLUGIN::loadTrackList(), EDA_ITEM::operator=(), EAGLE_PLUGIN::packageCircle(), EAGLE_PLUGIN::packagePolygon(), EAGLE_PLUGIN::packageRectangle(), EAGLE_PLUGIN::packageText(), SCH_EDIT_FRAME::PasteListOfItems(), FOOTPRINT_EDIT_FRAME::Process_Special_Functions(), PCB_EDIT_FRAME::Process_Special_Functions(), SCH_SCREENS::ReplaceDuplicateTimeStamps(), BOARD::ReplaceNetlist(), SCH_SHEET::SCH_SHEET(), SCH_COMPONENT::SetTimeStamp(), SimilarLabelsDiagnose(), BOARD_ITEM::SwapData(), and TestDuplicateSheetNames().

203 { m_TimeStamp = aNewTimeStamp; }
time_t m_TimeStamp
Time stamp used for logical links.
Definition: base_struct.h:169
void EDA_ITEM::SetWireImage ( )
inlineinherited

Definition at line 226 of file base_struct.h.

References IS_WIRE_IMAGE, and EDA_ITEM::SetFlags().

Referenced by moveItemWithMouseCursor().

226 { SetFlags( IS_WIRE_IMAGE ); }
void SetFlags(STATUS_FLAGS aMask)
Definition: base_struct.h:253
#define IS_WIRE_IMAGE
Item to be drawn as wireframe while editing.
Definition: base_struct.h:117
int GERBER_DRAW_ITEM::Shape ( ) const
inline

Definition at line 228 of file class_gerber_draw_item.h.

References m_Shape.

228 { return m_Shape; }
wxString GERBER_DRAW_ITEM::ShowGBRShape ( )

Definition at line 161 of file class_gerber_draw_item.cpp.

References GBR_ARC, GBR_CIRCLE, GBR_POLYGON, GBR_SEGMENT, GBR_SPOT_CIRCLE, GBR_SPOT_MACRO, GBR_SPOT_OVAL, GBR_SPOT_POLY, GBR_SPOT_RECT, GetDcodeDescr(), D_CODE::GetMacro(), m_Shape, name, and APERTURE_MACRO::name.

Referenced by GetMsgPanelInfo().

162 {
163  switch( m_Shape )
164  {
165  case GBR_SEGMENT:
166  return _( "Line" );
167 
168  case GBR_ARC:
169  return _( "Arc" );
170 
171  case GBR_CIRCLE:
172  return _( "Circle" );
173 
174  case GBR_SPOT_OVAL:
175  return wxT( "spot_oval" );
176 
177  case GBR_SPOT_CIRCLE:
178  return wxT( "spot_circle" );
179 
180  case GBR_SPOT_RECT:
181  return wxT( "spot_rect" );
182 
183  case GBR_SPOT_POLY:
184  return wxT( "spot_poly" );
185 
186  case GBR_POLYGON:
187  return wxT( "polygon" );
188 
189  case GBR_SPOT_MACRO:
190  {
191  wxString name = wxT( "apt_macro" );
192  D_CODE* dcode = GetDcodeDescr();
193 
194  if( dcode && dcode->GetMacro() )
195  name << wxT(" ") << dcode->GetMacro()->name;
196 
197  return name;
198  }
199 
200  default:
201  return wxT( "??" );
202  }
203 }
wxString name
The name of the aperture macro.
D_CODE * GetDcodeDescr()
Function GetDcodeDescr returns the GetDcodeDescr of this object, or NULL.
Class D_CODE holds a gerber DCODE (also called Aperture) definition.
Definition: dcode.h:81
const char * name
APERTURE_MACRO * GetMacro() const
Definition: dcode.h:158
static bool EDA_ITEM::Sort ( const EDA_ITEM aLeft,
const EDA_ITEM aRight 
)
inlinestaticinherited

Function Sort is a helper function to be used by the C++ STL sort algorithm for sorting a STL container of EDA_ITEM pointers.

Parameters
aLeftThe left hand item to compare.
aRightThe right hand item to compare.
Returns
True if aLeft is less than aRight.

Definition at line 463 of file base_struct.h.

Referenced by PART_LIB::GetEntryTypePowerNames().

463 { return *aLeft < *aRight; }
KICAD_T EDA_ITEM::Type ( ) const
inlineinherited

Function Type()

returns the type of object. This attribute should never be changed after a constructor sets it, so there is no public "setter" method.

Returns
KICAD_T - the type of object.

Definition at line 198 of file base_struct.h.

References EDA_ITEM::m_StructType.

Referenced by Abort_Move_ModuleOutline(), abortMoveBitmap(), abortMoveItem(), AbortPinMove(), DIALOG_GLOBAL_DELETION::AcceptPcbDelete(), MODULE::Add(), BOARD::Add(), RN_DATA::Add(), PCB_EDIT_FRAME::Add45DegreeSegment(), RN_DATA::AddBlocked(), SCH_SCREEN::addConnectedItemsToBlock(), POINT_EDITOR::addCorner(), POINT_EDITOR::addCornerCondition(), SCH_EDIT_FRAME::addCurrentItemToList(), AddMenusForComponent(), AddMenusForEditComponent(), SCH_SHEET::AddPin(), RN_DATA::AddSimple(), SCH_EDIT_FRAME::AppendOneEEProject(), PCB_EDIT_FRAME::Attribut_Track(), PCB_EDIT_FRAME::Autoroute(), PCB_EDIT_FRAME::Begin_Route(), SCH_EDIT_FRAME::BeginSegment(), PCB_EDIT_FRAME::Block_Delete(), PCB_EDIT_FRAME::Block_Duplicate(), PCB_EDIT_FRAME::Block_Flip(), PCB_EDIT_FRAME::Block_Move(), PCB_EDIT_FRAME::Block_Rotate(), SCH_SCREENS::BuildScreenList(), SCH_SHEET_LIST::BuildSheetList(), HIERARCHY_NAVIG_DLG::BuildSheetsTree(), calcArea(), calcMaxArea(), calcMinArea(), DIALOG_EXCHANGE_MODULE::changeAllFootprints(), DIALOG_EXCHANGE_MODULE::changeSameFootprints(), TEXTE_PCB::ClassOf(), EDGE_MODULE::ClassOf(), BOARD_CONNECTED_ITEM::ClassOf(), TEXTE_MODULE::ClassOf(), DRAWSEGMENT::ClassOf(), TRACK::ClassOf(), MODULE::ClassOf(), D_PAD::ClassOf(), NETINFO_ITEM::ClassOf(), BOARD::ClassOf(), VIA::ClassOf(), SCH_SHEET::CleanupSheet(), Collect_TrackSegmentsToDrag(), LIB_BEZIER::compare(), LIB_CIRCLE::compare(), LIB_RECTANGLE::compare(), LIB_POLYLINE::compare(), LIB_TEXT::compare(), LIB_ARC::compare(), LIB_FIELD::compare(), LIB_PIN::compare(), SCH_SHEET::ComponentCount(), GRID_HELPER::computeAnchors(), LIB_PART::CopySelectedItems(), SCH_SCREEN::CountConnectedItems(), SCH_SHEET::CountSheets(), CINFO3D_VISU::createLayers(), BOARD::CreateLockPoint(), SCH_EDIT_FRAME::CreateNewText(), CINFO3D_VISU::createNewTrack(), PCB_EDIT_FRAME::createPopupMenuForTracks(), CreateRoutesSection(), PCB_EDITOR_CONTROL::CrossProbeSchToPcb(), D_PAD::D_PAD(), FOOTPRINT_EDIT_FRAME::Delete_Edge_Module(), PCB_EDIT_FRAME::Delete_Segment_Edge(), SCH_SCREENS::DeleteAllMarkers(), SCH_SCREEN::DeleteItem(), LIB_EDIT_FRAME::deleteItem(), deleteItem(), SCH_EDIT_FRAME::DeleteItem(), DeleteItemsInList(), DeleteNullTrackSegments(), DIALOG_SCH_EDIT_ONE_FIELD::DIALOG_SCH_EDIT_ONE_FIELD(), DIALOG_ERC::DisplayERC_MarkersList(), DRC::doTrackDrc(), DRC::doTrackKeepoutDrc(), KIGFX::PCB_PAINTER::Draw(), KIGFX::PCB_PAINTER::draw(), DrawMovePin(), DrawMovingBlockOutlines(), drawPickedItems(), EDIT_TOOL::Duplicate(), BOARD::Duplicate(), MODULE::Duplicate(), PCB_EDIT_FRAME::duplicateItems(), DuplicateItemsInList(), SCH_EDIT_FRAME::EditComponent(), SCH_EDIT_FRAME::EditComponentFieldText(), LIB_EDIT_FRAME::EditSymbolText(), SCH_EDIT_FRAME::EndSegment(), PCB_EDIT_FRAME::EraseRedundantTrack(), ExitSheet(), SCH_SCREEN::ExtractWires(), DRC::fillMarker(), find_vias_and_tracks_at(), SCH_EDIT_FRAME::FindComponentAndItem(), NETLIST_EXPORTER::findNextComponent(), NETLIST_EXPORTER::findNextComponentAndCreatePinList(), SCH_SHEET_PATH::FindNextItem(), SCH_SHEET_LIST::FindNextItem(), SCH_SHEET_PATH::FindPreviousItem(), SCH_SHEET_LIST::FindPreviousItem(), POINT_EDITOR::finishItem(), FootprintWriteShape(), FormatProbeItem(), genPlacementRoutingMatrix(), POINT_EDITOR::get45DegConstrainer(), TRACK::GetBestInsertPoint(), BOARD_ITEM::GetBoard(), LIB_PART::GetBodyBoundingBox(), TRACK::GetBoundingBox(), BOARD_CONNECTED_ITEM::GetClearance(), NETLIST_OBJECT::GetComponentParent(), SCH_SCREEN::GetConnection(), SCH_TEXT::GetConnectionPoints(), SCH_TEXT::GetEndPoints(), SCH_SHEET::GetEndPoints(), GetFirstVia(), SCH_SCREEN::GetHierarchicalItems(), TEXTE_PCB::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), BOARD_CONNECTED_ITEM::GetNetClass(), LIB_PART::GetNextDrawItem(), RN_NET::GetNodes(), CONNECTED_POINT::GetPad(), DRAWSEGMENT::GetParentModule(), SCH_SCREEN::GetPin(), LIB_PART::GetPin(), SCH_COMPONENT::GetPinPhysicalPosition(), getRect(), SELECTION::GetTopLeftItem(), CONNECTED_POINT::GetTrack(), LIB_PART::GetUnitBoundingBox(), LIB_EDIT_FRAME::GlobalSetPins(), SELECTION_TOOL::guessSelectionCandidates(), SCH_SCREENS::HasNoFullyDefinedLibIds(), SCH_SHEET::HasUndefinedPins(), SCH_EDIT_FRAME::ImportSheetPin(), DIALOG_LABEL_EDITOR::InitDialog(), ROUTER_TOOL::InlineDrag(), SCH_COLLECTOR::Inspect(), GENERAL_COLLECTOR::Inspect(), SCH_FIND_COLLECTOR::Inspect(), ARRAY_CREATOR::Invoke(), SCH_TEXT::IsDanglingStateChanged(), SCH_COLLECTOR::IsDraggableJunction(), SCH_COLLECTOR::IsNode(), TRACK::IsNull(), SCH_SCREEN::IsTerminalPoint(), BOARD_ITEM::IsTrack(), itemIsIncludedByFilter(), SCH_SHEET::Load(), PNS_PCBNEW_RULE_RESOLVER::localPadClearance(), SCH_EDIT_FRAME::LocateAndShowItem(), SCH_EDIT_FRAME::LocateItem(), SCH_SHEET::LocatePathOfScreen(), Magnetize(), EDIT_POINTS_FACTORY::Make(), SCH_SCREEN::MarkConnections(), MarkItemsInBloc(), BOARD::MarkTrace(), TRACKS_CLEANER::merge_collinear_of_track(), TRACKS_CLEANER::mergeCollinearSegmentIfPossible(), SCH_LINE::MergeOverlap(), FOOTPRINT_EDIT_FRAME::ModeditLocateAndDisplay(), EDIT_TOOL::MoveExact(), moveItemWithMouseCursor(), MoveMarkedItems(), MoveMarkedItemsExactly(), SCH_EDIT_FRAME::OnConvertTextType(), SCH_EDIT_FRAME::OnCopySchematicItemRequest(), SCH_EDIT_FRAME::OnDragItem(), SCH_EDIT_FRAME::OnEditItem(), FOOTPRINT_EDIT_FRAME::OnEditItemRequest(), PCB_EDIT_FRAME::OnEditItemRequest(), LIB_EDIT_FRAME::OnEditPin(), LIB_EDIT_FRAME::OnHotKey(), SCH_EDIT_FRAME::OnHotKey(), PCB_EDIT_FRAME::OnHotkeyCopyItem(), FOOTPRINT_EDIT_FRAME::OnHotkeyDeleteItem(), PCB_EDIT_FRAME::OnHotkeyDeleteItem(), FOOTPRINT_EDIT_FRAME::OnHotkeyDuplicateItem(), PCB_EDIT_FRAME::OnHotkeyDuplicateOrArrayItem(), FOOTPRINT_EDIT_FRAME::OnHotkeyEditItem(), PCB_EDIT_FRAME::OnHotkeyEditItem(), PCB_EDIT_FRAME::OnHotkeyFlipItem(), FOOTPRINT_EDIT_FRAME::OnHotkeyMoveItem(), PCB_EDIT_FRAME::OnHotkeyMoveItem(), FOOTPRINT_EDIT_FRAME::OnHotkeyMoveItemExact(), PCB_EDIT_FRAME::OnHotkeyPlaceItem(), FOOTPRINT_EDIT_FRAME::OnHotkeyRotateItem(), PCB_EDIT_FRAME::OnHotkeyRotateItem(), FOOTPRINT_EDIT_FRAME::OnLeftClick(), LIB_EDIT_FRAME::OnLeftClick(), SCH_EDIT_FRAME::OnLeftClick(), PCB_EDIT_FRAME::OnLeftClick(), LIB_EDIT_FRAME::OnLeftDClick(), SCH_EDIT_FRAME::OnLeftDClick(), PCB_EDIT_FRAME::OnLeftDClick(), SCH_EDIT_FRAME::OnMoveItem(), SCH_EDIT_FRAME::OnOpenLibraryEditor(), SCH_EDIT_FRAME::OnOrient(), FOOTPRINT_EDIT_FRAME::OnRightClick(), LIB_EDIT_FRAME::OnRightClick(), SCH_EDIT_FRAME::OnRightClick(), PCB_EDIT_FRAME::OnRightClick(), SCH_EDIT_FRAME::OnRotate(), SCH_EDIT_FRAME::OnSelectUnit(), SCH_LINE::operator<(), LIB_ITEM::operator<(), SCH_ITEM::operator<(), SCH_COMPONENT::operator<(), SCH_BITMAP::operator=(), SCH_COMPONENT::operator=(), SCH_SHEET::operator=(), LIB_ITEM::operator==(), OrCell_Trace(), SCH_EDIT_FRAME::OrientComponent(), BOARD_COMMIT::parentObject(), MODULE_EDITOR_TOOLS::PasteItems(), SCH_EDIT_FRAME::PasteListOfItems(), PCB_BASE_FRAME::PcbGeneralLocateAndDisplay(), LIB_EDIT_FRAME::PlacePin(), SCH_FIELD::Plot(), BRDITEMS_PLOTTER::Plot_1_EdgeModule(), SCH_EDIT_FRAME::PrepareMoveItem(), GAL_ARRAY_CREATOR::prePushAction(), PCB_EDIT_FRAME::PrintPage(), FOOTPRINT_EDIT_FRAME::Process_Special_Functions(), LIB_EDIT_FRAME::Process_Special_Functions(), SCH_EDIT_FRAME::Process_Special_Functions(), PCB_EDIT_FRAME::Process_Special_Functions(), BOARD_COMMIT::Push(), PCB_BASE_EDIT_FRAME::PutDataInPreviousState(), RedrawWhileMovingCursor(), DIALOG_SYMBOL_REMAP::remapSymbolsToLibTable(), MODULE::Remove(), BOARD::Remove(), RN_DATA::Remove(), TRACKS_CLEANER::remove_duplicates_of_track(), POINT_EDITOR::removeCorner(), POINT_EDITOR::removeCornerCondition(), LIB_PART::RemoveDrawItem(), SCH_SHEET::RemovePin(), FOOTPRINT_EDIT_FRAME::RemoveStruct(), PCB_EDIT_FRAME::RemoveStruct(), SCH_EDIT_FRAME::RepeatDrawItem(), LIB_EDIT_FRAME::RepeatPinItem(), SCH_SCREENS::ReplaceDuplicateTimeStamps(), SCH_SCREEN::ReplaceWires(), SELECTION_TOOL::RequestSelection(), PCB_EDIT_FRAME::Reset_All_Tracks_And_Vias_To_Netclass_Values(), PCB_BASE_FRAME::ResetTextSize(), SCH_EDIT_FRAME::ReSizeSheet(), BOARD_COMMIT::Revert(), SCH_EDIT_FRAME::RotateField(), PCB_BASE_EDIT_FRAME::SaveCopyInUndoList(), SCH_EDIT_FRAME::SaveUndoItemInUndoList(), CONNECTIONS::SearchConnectedTracks(), SCH_SHEET::SearchHierarchy(), SELECTION_TOOL::select(), SELECTION_TOOL::selectable(), SCH_SCREEN::SelectBlockItems(), PCB_EDIT_FRAME::SelectHighLight(), SELECTION_TOOL::selectVisually(), ITEM_PICKER::SetItem(), SetSchItemParent(), DIALOG_LABEL_EDITOR::SetTitle(), PCB_EDIT_FRAME::SetTrackSegmentWidth(), PCB_EDIT_FRAME::Show_1_Ratsnest(), Show_MoveNode(), ShowClearance(), ShowNewTrackWhenMovingCursor(), SortByTimeStamp(), PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope(), LIB_EDIT_FRAME::StartMoveDrawSymbol(), PCB_EDIT_FRAME::StartMoveOneNodeOrSegment(), SCH_NO_CONNECT::SwapData(), SCH_JUNCTION::SwapData(), SCH_BITMAP::SwapData(), SCH_FIELD::SwapData(), SCH_SHEET_PIN::SwapData(), BOARD_ITEM::SwapData(), SCH_COMPONENT::SwapData(), SCH_SHEET::SwapData(), PCB_EDIT_FRAME::SwitchLayer(), BOARD::Test_Connections_To_Copper_Areas(), TestDuplicateSheetNames(), TEXTE_MODULE::TEXTE_MODULE(), TraceSegmentPcb(), TRACK::TransformShapeWithClearanceToPolygon(), SELECTION_TOOL::unselectVisually(), SCH_SHEET_PATH::UpdateAllScreenReferences(), DIALOG_SCH_EDIT_ONE_FIELD::UpdateField(), POINT_EDITOR::updateItem(), POINT_EDITOR::updatePoints(), PCB_BRIGHT_BOX::ViewDraw(), TRACK::Visit(), EDA_ITEM::Visit(), SCH_COMPONENT::Visit(), and SCH_SHEET::Visit().

199  {
200  return m_StructType;
201  }
KICAD_T m_StructType
Run time identification, keep private so it can never be changed after a constructor sets it...
Definition: base_struct.h:160
void GERBER_DRAW_ITEM::UnLink ( )
inline

Function UnLink detaches this object from its owner.

Definition at line 265 of file class_gerber_draw_item.h.

References EDA_ITEM::GetList().

Referenced by DeleteStructure().

266  {
268  wxASSERT( list );
269 
270  if( list )
271  list->Remove( this );
272  }
DHEAD * GetList() const
Definition: base_struct.h:209
const BOX2I EDA_ITEM::ViewBBox ( ) const
overridevirtualinherited

Implements KIGFX::VIEW_ITEM.

Reimplemented in MODULE, D_PAD, EDIT_POINTS, DRAWSEGMENT, DIMENSION, TEXTE_MODULE, MARKER_PCB, KIGFX::WORKSHEET_VIEWITEM, ROUTER_PREVIEW_ITEM, KIGFX::PREVIEW::CENTRELINE_RECT_ITEM, KIGFX::PREVIEW::POLYGON_ITEM, KIGFX::PREVIEW::SELECTION_AREA, KIGFX::ORIGIN_VIEWITEM, KIGFX::PREVIEW::RULER_ITEM, KIGFX::RATSNEST_VIEWITEM, BRIGHT_BOX, and KIGFX::PREVIEW::ARC_ASSISTANT.

Definition at line 267 of file base_struct.cpp.

References EDA_ITEM::GetBoundingBox().

Referenced by SELECTION_TOOL::selectMultiple(), BRIGHT_BOX::ViewBBox(), DIMENSION::ViewBBox(), DRAWSEGMENT::ViewBBox(), BRIGHT_BOX::ViewDraw(), and COMMON_TOOLS::ZoomFitScreen().

268 {
269  // Basic fallback
270  return BOX2I( VECTOR2I( GetBoundingBox().GetOrigin() ),
271  VECTOR2I( GetBoundingBox().GetSize() ) );
272 }
virtual const EDA_RECT GetBoundingBox() const
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes...
BOX2< VECTOR2I > BOX2I
Definition: box2.h:468
VECTOR2< int > VECTOR2I
Definition: vector2d.h:590
virtual void KIGFX::VIEW_ITEM::ViewDraw ( int  aLayer,
VIEW aView 
) const
inlinevirtualinherited

Function ViewDraw() Draws the parts of the object belonging to layer aLayer.

viewDraw() is an alternative way for drawing objects if if there is no PAINTER assigned for the view or if the PAINTER doesn't know how to paint this particular implementation of VIEW_ITEM. The preferred way of drawing is to design an appropriate PAINTER object, the method below is intended only for quick hacks and debugging purposes.

Parameters
aLayercurrent drawing layer
aGalpointer to the GAL device we are drawing on

Reimplemented in EDIT_POINTS, KIGFX::WORKSHEET_VIEWITEM, ROUTER_PREVIEW_ITEM, KIGFX::VIEW_GROUP, KIGFX::PREVIEW::SIMPLE_OVERLAY_ITEM, BRIGHT_BOX, KIGFX::PREVIEW::RULER_ITEM, KIGFX::ORIGIN_VIEWITEM, KIGFX::RATSNEST_VIEWITEM, KIGFX::PREVIEW::ARC_ASSISTANT, and PCB_BRIGHT_BOX.

Definition at line 114 of file view_item.h.

Referenced by KIGFX::VIEW::draw(), and KIGFX::VIEW::updateItemGeometry().

115  {}
void EDA_ITEM::ViewGetLayers ( int  aLayers[],
int &  aCount 
) const
overridevirtualinherited

Implements KIGFX::VIEW_ITEM.

Reimplemented in MODULE, D_PAD, EDIT_POINTS, VIA, BOARD_ITEM, TRACK, TEXTE_MODULE, MARKER_PCB, KIGFX::WORKSHEET_VIEWITEM, ROUTER_PREVIEW_ITEM, KIGFX::PREVIEW::SIMPLE_OVERLAY_ITEM, BRIGHT_BOX, KIGFX::ORIGIN_VIEWITEM, KIGFX::RATSNEST_VIEWITEM, and KIGFX::PREVIEW::RULER_ITEM.

Definition at line 275 of file base_struct.cpp.

276 {
277  // Basic fallback
278  aCount = 1;
279  aLayers[0] = 0;
280 }
virtual unsigned int KIGFX::VIEW_ITEM::ViewGetLOD ( int  aLayer,
VIEW aView 
) const
inlinevirtualinherited

Function ViewGetLOD() Returns the level of detail of the item.

A level of detail is the minimal VIEW scale that is sufficient for an item to be shown on a given layer.

Reimplemented in MODULE, D_PAD, VIA, TRACK, and TEXTE_MODULE.

Definition at line 133 of file view_item.h.

Referenced by KIGFX::VIEW::drawItem::operator()().

134  {
135  // By default always show the item
136  return 0;
137  }
SEARCH_RESULT EDA_ITEM::Visit ( INSPECTOR  inspector,
void *  testData,
const KICAD_T  scanTypes[] 
)
virtualinherited

Function Visit may be re-implemented for each derived class in order to handle all the types given by its member data.

Implementations should call inspector->Inspect() on types in scanTypes[], and may use IterateForward() to do so on lists of such data.

Parameters
inspectorAn INSPECTOR instance to use in the inspection.
testDataArbitrary data used by the inspector.
scanTypesWhich KICAD_T types are of interest and the order is significant too, terminated by EOT.
Returns
SEARCH_RESULT SEARCH_QUIT if the Iterator is to stop the scan, else SCAN_CONTINUE, and determined by the inspector.

Reimplemented in BOARD, SCH_SHEET, MODULE, SCH_COMPONENT, and TRACK.

Definition at line 151 of file base_struct.cpp.

References EOT, EDA_ITEM::GetClass(), SEARCH_CONTINUE, SEARCH_QUIT, and EDA_ITEM::Type().

Referenced by GENERAL_COLLECTOR::Collect(), PCB_TYPE_COLLECTOR::Collect(), and EDA_ITEM::IterateForward().

152 {
153  KICAD_T stype;
154 
155 #if 0 && defined(DEBUG)
156  std::cout << GetClass().mb_str() << ' ';
157 #endif
158 
159  for( const KICAD_T* p = scanTypes; (stype = *p) != EOT; ++p )
160  {
161  // If caller wants to inspect my type
162  if( stype == Type() )
163  {
164  if( SEARCH_QUIT == inspector( this, testData ) )
165  return SEARCH_QUIT;
166 
167  break;
168  }
169  }
170 
171  return SEARCH_CONTINUE;
172 }
KICAD_T Type() const
Function Type()
Definition: base_struct.h:198
search types array terminator (End Of Types)
Definition: typeinfo.h:94
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:90
virtual wxString GetClass() const =0
Function GetClass returns the class name.

Member Data Documentation

int GERBER_DRAW_ITEM::m_DCode
wxRealPoint GERBER_DRAW_ITEM::m_drawScale
private
STATUS_FLAGS EDA_ITEM::m_Flags
protectedinherited

Flag bits for editing and other uses.

Definition at line 175 of file base_struct.h.

Referenced by LIB_CIRCLE::BeginEdit(), LIB_RECTANGLE::BeginEdit(), LIB_POLYLINE::BeginEdit(), LIB_TEXT::BeginEdit(), LIB_ARC::BeginEdit(), LIB_FIELD::BeginEdit(), LIB_CIRCLE::calcEdit(), LIB_POLYLINE::calcEdit(), LIB_RECTANGLE::calcEdit(), LIB_TEXT::calcEdit(), LIB_ARC::calcEdit(), LIB_FIELD::calcEdit(), LIB_TEXT::Clone(), LIB_CIRCLE::ContinueEdit(), LIB_RECTANGLE::ContinueEdit(), LIB_POLYLINE::ContinueEdit(), LIB_TEXT::ContinueEdit(), LIB_ARC::ContinueEdit(), LIB_FIELD::ContinueEdit(), SCH_LINE::Draw(), TRACK::Draw(), DRAWSEGMENT::Draw(), MODULE::Draw(), D_PAD::Draw(), SEGZONE::Draw(), LIB_CIRCLE::drawGraphic(), LIB_POLYLINE::drawGraphic(), LIB_RECTANGLE::drawGraphic(), LIB_BEZIER::drawGraphic(), LIB_ARC::drawGraphic(), DRAWSEGMENT::DRAWSEGMENT(), LIB_CIRCLE::EndEdit(), LIB_RECTANGLE::EndEdit(), LIB_POLYLINE::EndEdit(), LIB_TEXT::EndEdit(), LIB_ARC::EndEdit(), LIB_FIELD::EndEdit(), LIB_ITEM::EndEdit(), EDA_ITEM::GetFlags(), TRACK::GetMsgPanelInfoBase_Common(), SCH_JUNCTION::HitTest(), SCH_LINE::HitTest(), SCH_COMPONENT::HitTest(), LIB_ITEM::InEditMode(), EDA_ITEM::initVars(), SCH_ITEM::IsConnected(), SCH_COMPONENT::Load(), SCH_LINE::Move(), EDA_ITEM::operator=(), SCH_COMPONENT::SCH_COMPONENT(), LIB_PIN::SetConversion(), LIB_PIN::SetLength(), LIB_PIN::SetName(), LIB_PIN::SetNameTextSize(), LIB_PIN::SetNumberTextSize(), LIB_PIN::SetOrientation(), LIB_PIN::SetPartNumber(), LIB_PIN::SetPinPosition(), LIB_PIN::SetShape(), LIB_PIN::SetType(), and LIB_PIN::SetVisible().

bool EDA_ITEM::m_forceVisible
protectedinherited

Set to true to override the visibility setting of the item.

Definition at line 172 of file base_struct.h.

Referenced by SCH_FIELD::Draw(), EDA_ITEM::initVars(), and EDA_ITEM::operator=().

bool GERBER_DRAW_ITEM::m_LayerNegative
private
wxPoint GERBER_DRAW_ITEM::m_layerOffset
private

Definition at line 105 of file class_gerber_draw_item.h.

Referenced by GetABPosition(), GetXYPosition(), and SetLayerParameters().

DHEAD* EDA_ITEM::m_List
protectedinherited

which DLIST I am on.

Definition at line 166 of file base_struct.h.

Referenced by EDA_ITEM::GetList(), EDA_ITEM::initVars(), and BOARD_ITEM::SwapData().

double GERBER_DRAW_ITEM::m_lyrRotation
private
bool GERBER_DRAW_ITEM::m_mirrorA
private
bool GERBER_DRAW_ITEM::m_mirrorB
private
GBR_NETLIST_METADATA GERBER_DRAW_ITEM::m_netAttributes
private

the string given by a TO attribute set in aperture (dcode).

Stored in each item, because TO is a dynamic object attribute

Definition at line 107 of file class_gerber_draw_item.h.

Referenced by GetMsgPanelInfo(), GetNetAttributes(), and SetNetAttributes().

std::vector<wxPoint> GERBER_DRAW_ITEM::m_PolyCorners
bool GERBER_DRAW_ITEM::m_swapAxis
private
bool GERBER_DRAW_ITEM::m_UnitsMetric

Definition at line 72 of file class_gerber_draw_item.h.

Referenced by GERBER_DRAW_ITEM(), and SetLayerParameters().


The documentation for this class was generated from the following files: