KiCad PCB EDA Suite
GERBER_DRAW_ITEM Class Reference

#include <gerber_draw_item.h>

Inheritance diagram for GERBER_DRAW_ITEM:
EDA_ITEM KIGFX::VIEW_ITEM INSPECTABLE

Public Member Functions

 GERBER_DRAW_ITEM (GERBER_FILE_IMAGE *aGerberparams)
 
 ~GERBER_DRAW_ITEM ()
 
void SetNetAttributes (const GBR_NETLIST_METADATA &aNetAttributes)
 
const GBR_NETLIST_METADATAGetNetAttributes () const
 
int GetLayer () const
 Return the layer this item is on. More...
 
bool GetLayerPolarity () const
 
bool GetTextD_CodePrms (int &aSize, VECTOR2I &aPos, EDA_ANGLE &aOrientation)
 Return the best size and orientation to display the D_Code on screen. More...
 
bool HasNegativeItems ()
 Optimize screen refresh (when no items are in background color refresh can be faster). More...
 
void 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 MoveXY (const VECTOR2I &aMoveVector)
 Move this object. More...
 
VECTOR2I GetPosition () const override
 Return the position of this object. More...
 
void SetPosition (const VECTOR2I &aPos) override
 
VECTOR2I GetABPosition (const VECTOR2I &aXYPosition) const
 Return the image position of aPosition for this object. More...
 
VECTOR2I GetXYPosition (const VECTOR2I &aABPosition) const
 Return the image position of aPosition for this object. More...
 
D_CODEGetDcodeDescr () const
 Return the GetDcodeDescr of this object, or NULL. More...
 
const BOX2I GetBoundingBox () const override
 Return the orthogonal bounding box of this object for display purposes. More...
 
void Print (wxDC *aDC, const VECTOR2I &aOffset, GBR_DISPLAY_OPTIONS *aOptions)
 
void ConvertSegmentToPolygon ()
 Convert a line to an equivalent polygon. More...
 
void ConvertSegmentToPolygon (SHAPE_POLY_SET *aPolygon) const
 
void PrintGerberPoly (wxDC *aDC, const COLOR4D &aColor, const VECTOR2I &aOffset, bool aFilledShape)
 Print the polygon stored in m_PolyCorners. More...
 
int Shape () const
 
void GetMsgPanelInfo (EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
 Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes. More...
 
wxString ShowGBRShape () const
 
bool HitTest (const VECTOR2I &aRefPos, int aAccuracy=0) const override
 Test if the given wxPoint is within the bounds of this object. More...
 
bool HitTest (const BOX2I &aRefArea, bool aContained, int aAccuracy=0) const override
 Test if the given wxRect intersect this object. More...
 
wxString GetClass () const override
 
virtual void ViewGetLayers (int aLayers[], int &aCount) const override
 
virtual const BOX2I ViewBBox () const override
 
double ViewGetLOD (int aLayer, KIGFX::VIEW *aView) const override
 
INSPECT_RESULT Visit (INSPECTOR inspector, void *testData, const std::vector< KICAD_T > &aScanTypes) override
 Return a user-visible description string of this item. More...
 
virtual wxString GetItemDescription (UNITS_PROVIDER *aUnitsProvider) const override
 Return a pointer to an image to be used in menus. More...
 
BITMAPS GetMenuImage () const override
 Return a pointer to an image to be used in menus. More...
 
KICAD_T Type () const
 Returns the type of object. More...
 
EDA_ITEMGetParent () const
 
virtual void SetParent (EDA_ITEM *aParent)
 
bool IsModified () const
 
bool IsNew () const
 
bool IsMoving () const
 
bool IsSelected () const
 
bool IsEntered () const
 
bool IsBrightened () const
 
bool IsRollover () const
 
void SetSelected ()
 
void SetBrightened ()
 
void ClearSelected ()
 
void ClearBrightened ()
 
void SetModified ()
 
int GetState (EDA_ITEM_FLAGS type) const
 
void SetState (EDA_ITEM_FLAGS type, bool state)
 
EDA_ITEM_FLAGS GetStatus () const
 
void SetStatus (EDA_ITEM_FLAGS aStatus)
 
void SetFlags (EDA_ITEM_FLAGS aMask)
 
void XorFlags (EDA_ITEM_FLAGS aMask)
 
void ClearFlags (EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
 
EDA_ITEM_FLAGS GetFlags () const
 
bool HasFlag (EDA_ITEM_FLAGS aFlag) const
 
EDA_ITEM_FLAGS GetEditFlags () const
 
void ClearTempFlags ()
 
void ClearEditFlags ()
 
virtual bool RenderAsBitmap (double aWorldScale) const
 
void SetIsShownAsBitmap (bool aBitmap)
 
bool IsShownAsBitmap () const
 
virtual bool IsType (const std::vector< KICAD_T > &aScanTypes) const
 Check whether the item is one of the listed types. More...
 
void SetForceVisible (bool aEnable)
 Set and clear force visible flag used to force the item to be drawn even if it's draw attribute is set to not visible. More...
 
bool IsForceVisible () const
 
virtual wxString GetFriendlyName () const
 
virtual const VECTOR2I GetFocusPosition () const
 Similar to GetPosition, but allows items to return their visual center rather than their anchor. More...
 
virtual VECTOR2I GetSortPosition () const
 Return the coordinates that should be used for sorting this element visually compared to other elements. More...
 
virtual EDA_ITEMClone () const
 Create a duplicate of this item with linked list members set to NULL. More...
 
wxString GetTypeDesc () const
 Return a translated description of the type for this EDA_ITEM for display in user facing messages. More...
 
virtual bool Matches (const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const
 Compare the item against the search criteria in aSearchData. More...
 
virtual bool Replace (const EDA_SEARCH_DATA &aSearchData, void *aAuxData=nullptr)
 Perform a text replace using the find and replace criteria in aSearchData on items that support text find and replace. More...
 
virtual bool IsReplaceable () const
 Override this method in any derived object that supports test find and replace. More...
 
bool operator< (const EDA_ITEM &aItem) const
 Test if another item is less than this object. More...
 
virtual void ViewDraw (int aLayer, VIEW *aView) const
 Draw the parts of the object belonging to layer aLayer. More...
 
VIEW_ITEM_DATA * viewPrivData () const
 
void ClearViewPrivData ()
 
bool Set (PROPERTY_BASE *aProperty, wxAny &aValue)
 
template<typename T >
bool Set (PROPERTY_BASE *aProperty, T aValue)
 
template<typename T >
bool Set (const wxString &aProperty, T aValue)
 
wxAny Get (PROPERTY_BASE *aProperty) const
 
template<typename T >
Get (PROPERTY_BASE *aProperty) const
 
template<typename T >
std::optional< T > Get (const wxString &aProperty) const
 

Static Public Member Functions

template<class T >
static INSPECT_RESULT IterateForward (std::deque< T > &aList, INSPECTOR inspector, void *testData, const std::vector< KICAD_T > &scanTypes)
 This changes first parameter to avoid the DList and use the main queue instead. More...
 
template<class T >
static INSPECT_RESULT IterateForward (std::vector< T > &aList, INSPECTOR inspector, void *testData, const std::vector< KICAD_T > &scanTypes)
 Change first parameter to avoid the DList and use std::vector instead. More...
 
static bool Replace (const EDA_SEARCH_DATA &aSearchData, wxString &aText)
 Perform a text replace on aText using the find and replace criteria in aSearchData on items that support text find and replace. More...
 
static bool Sort (const EDA_ITEM *aLeft, const EDA_ITEM *aRight)
 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
 
VECTOR2I m_Start
 
VECTOR2I m_End
 
VECTOR2I m_ArcCentre
 
SHAPE_POLY_SET m_Polygon
 
wxSize m_Size
 
bool m_Flashed
 
int m_DCode
 
wxString m_AperFunction
 
GERBER_FILE_IMAGEm_GerberImageFile
 
SHAPE_POLY_SET m_AbsolutePolygon
 
const KIID m_Uuid
 

Protected Member Functions

bool Matches (const wxString &aText, const EDA_SEARCH_DATA &aSearchData) const
 Compare aText against search criteria in aSearchData. More...
 

Protected Attributes

EDA_ITEM_FLAGS m_status
 
EDA_ITEMm_parent
 Linked list: Link (parent struct) More...
 
bool m_forceVisible
 
EDA_ITEM_FLAGS m_flags
 

Private Attributes

bool m_LayerNegative
 
bool m_swapAxis
 
bool m_mirrorA
 
bool m_mirrorB
 
VECTOR2I m_drawScale
 
VECTOR2I m_layerOffset
 
double m_lyrRotation
 
GBR_NETLIST_METADATA m_netAttributes
 the string given by a TO attribute set in aperture (dcode). More...
 
KICAD_T m_structType
 Run time identification, keep private so it can never be changed after a ctor sets it. More...
 
VIEW_ITEM_DATA * m_viewPrivData
 

Detailed Description

Definition at line 64 of file gerber_draw_item.h.

Constructor & Destructor Documentation

◆ GERBER_DRAW_ITEM()

GERBER_DRAW_ITEM::GERBER_DRAW_ITEM ( GERBER_FILE_IMAGE aGerberparams)

Definition at line 41 of file gerber_draw_item.cpp.

41 :
43{
44 m_GerberImageFile = aGerberImageFile;
46 m_Flashed = false;
47 m_DCode = 0;
48 m_UnitsMetric = false;
49 m_LayerNegative = false;
50 m_swapAxis = false;
51 m_mirrorA = false;
52 m_mirrorB = false;
53 m_drawScale.x = m_drawScale.y = 1.0;
54 m_lyrRotation = 0;
55
58}
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType)
Definition: eda_item.cpp:36
void SetLayerParameters()
Initialize parameters from Image and Layer parameters found in the gerber file: m_UnitsMetric,...
GERBER_FILE_IMAGE * m_GerberImageFile
@ GBR_SEGMENT
@ GERBER_DRAW_ITEM_T
Definition: typeinfo.h:214

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, SetLayerParameters(), VECTOR2< T >::x, and VECTOR2< T >::y.

◆ ~GERBER_DRAW_ITEM()

GERBER_DRAW_ITEM::~GERBER_DRAW_ITEM ( )

Definition at line 61 of file gerber_draw_item.cpp.

62{
63}

Member Function Documentation

◆ ClearBrightened()

void EDA_ITEM::ClearBrightened ( )
inlineinherited

Definition at line 119 of file eda_item.h.

void ClearFlags(EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
Definition: eda_item.h:141
#define BRIGHTENED
item is drawn with a bright contour

References BRIGHTENED, and EDA_ITEM::ClearFlags().

Referenced by SCH_EDIT_FRAME::FocusOnItem(), PCB_BASE_FRAME::FocusOnItems(), EE_SELECTION_TOOL::unhighlight(), PL_SELECTION_TOOL::unhighlight(), PCB_SELECTION_TOOL::unhighlightInternal(), and SCH_EDITOR_CONTROL::UpdateNetHighlighting().

◆ ClearEditFlags()

◆ ClearFlags()

void EDA_ITEM::ClearFlags ( EDA_ITEM_FLAGS  aMask = EDA_ITEM_ALL_FLAGS)
inlineinherited

Definition at line 141 of file eda_item.h.

141{ m_flags &= ~aMask; }
EDA_ITEM_FLAGS m_flags
Definition: eda_item.h:498

References EDA_ITEM::m_flags.

Referenced by FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), PNS_KICAD_IFACE::AddItem(), SCH_EDIT_FRAME::AddItemToScreenAndUndoList(), SCH_MOVE_TOOL::AlignElements(), SCH_EDIT_TOOL::BreakWire(), FOOTPRINT::BuildCourtyardCaches(), EDA_ITEM::ClearBrightened(), EDA_ITEM::ClearEditFlags(), EDA_ITEM::ClearSelected(), EDA_ITEM::ClearTempFlags(), SCH_EDIT_FRAME::ConvertPart(), SYMBOL_EDITOR_EDIT_TOOL::Copy(), FOOTPRINT_EDITOR_CONTROL::CreateFootprint(), SYMBOL_EDITOR_PIN_TOOL::CreateImagePins(), MICROWAVE_TOOL::createMicrowaveInductor(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), PCB_TOOL_BASE::doInteractiveItemPlacement(), KIGFX::SCH_PAINTER::draw(), SCH_ITEM::Duplicate(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), PCB_EDIT_FRAME::ExchangeFootprint(), PCB_SELECTION_TOOL::ExitGroup(), SYMBOL_EDIT_FRAME::GetSymbolFromRedoList(), SYMBOL_EDIT_FRAME::GetSymbolFromUndoList(), FOOTPRINT_EDITOR_CONTROL::ImportFootprint(), DRC_INTERACTIVE_COURTYARD_CLEARANCE::Init(), EE_COLLECTOR::Inspect(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromBoard(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromLibrary(), FOOTPRINT_EDITOR_CONTROL::NewFootprint(), DIALOG_SYMBOL_PROPERTIES::OnUnitChoice(), FOOTPRINT_EDIT_FRAME::OpenProjectFiles(), PCB_BASE_FRAME::PlaceFootprint(), SYMBOL_EDITOR_PIN_TOOL::PlacePin(), BOARD_COMMIT::Push(), PCB_SELECTION_TOOL::RebuildSelection(), PAD_TOOL::RecombinePad(), SCH_EDIT_TOOL::RepeatDrawItem(), SYMBOL_EDIT_FRAME::RollbackSymbolFromUndo(), DRC_TEST_PROVIDER_DISALLOW::Run(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), SCH_SEXPR_PLUGIN_CACHE::savePin(), EE_SELECTION_TOOL::selectMultiple(), SCH_EDIT_FRAME::SelectUnit(), EDA_ITEM::SetIsShownAsBitmap(), BOARD_COMMIT::Stage(), DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow(), SCH_DRAWING_TOOLS::TwoClickPlace(), and EE_SELECTION_TOOL::unhighlight().

◆ ClearSelected()

◆ ClearTempFlags()

void EDA_ITEM::ClearTempFlags ( )
inlineinherited

Definition at line 153 of file eda_item.h.

154 {
156 }
#define IS_LINKED
Used in calculation to mark linked items (temporary use)
#define SELECTED_BY_DRAG
Item was algorithmically selected as a dragged item.
#define SKIP_STRUCT
flag indicating that the structure should be ignored
#define CANDIDATE
flag indicating that the structure is connected

References CANDIDATE, EDA_ITEM::ClearFlags(), IS_LINKED, SELECTED_BY_DRAG, and SKIP_STRUCT.

Referenced by PCB_EDIT_FRAME::OpenProjectFiles(), and SCH_EDIT_FRAME::PutDataInPreviousState().

◆ ClearViewPrivData()

void KIGFX::VIEW_ITEM::ClearViewPrivData ( )
inlineinherited

Definition at line 143 of file view_item.h.

144 {
145 m_viewPrivData = nullptr;
146 }
VIEW_ITEM_DATA * m_viewPrivData
Definition: view_item.h:151

References KIGFX::VIEW_ITEM::m_viewPrivData.

Referenced by KIGFX::VIEW::OnDestroy().

◆ Clone()

EDA_ITEM * EDA_ITEM::Clone ( ) const
virtualinherited

Create 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 LIB_FIELD, LIB_PIN, LIB_SHAPE, LIB_TEXT, LIB_TEXTBOX, SCH_BITMAP, SCH_BUS_WIRE_ENTRY, SCH_BUS_BUS_ENTRY, SCH_FIELD, SCH_JUNCTION, SCH_LABEL, SCH_DIRECTIVE_LABEL, SCH_GLOBALLABEL, SCH_HIERLABEL, SCH_LINE, SCH_MARKER, SCH_NO_CONNECT, SCH_PIN, SCH_SHAPE, SCH_SHEET, SCH_SHEET_PIN, SCH_SYMBOL, SCH_TEXT, SCH_TEXTBOX, KIGFX::ORIGIN_VIEWITEM, PCB_GROUP, FOOTPRINT, FP_SHAPE, FP_TEXT, FP_TEXTBOX, NETINFO_ITEM, PAD, PCB_BITMAP, PCB_DIM_ALIGNED, PCB_DIM_ORTHOGONAL, PCB_DIM_RADIAL, PCB_DIM_LEADER, PCB_DIM_CENTER, PCB_MARKER, PCB_SHAPE, PCB_TARGET, PCB_TEXT, PCB_TEXTBOX, PCB_TRACK, PCB_ARC, PCB_VIA, ZONE, and FP_ZONE.

Definition at line 82 of file eda_item.cpp.

83{
84 wxCHECK_MSG( false, nullptr, wxT( "Clone not implemented in derived class " ) + GetClass() +
85 wxT( ". Bad programmer!" ) );
86}
virtual wxString GetClass() const =0
Return the class name.

References EDA_ITEM::GetClass().

Referenced by SCH_EDIT_FRAME::AddCopyForRepeatItem(), DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES(), BOARD_ITEM::Duplicate(), SCH_ITEM::Duplicate(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), PCB_DIMENSION_BASE::GetEffectiveShape(), LIB_SYMBOL::LIB_SYMBOL(), BOARD_COMMIT::makeImage(), new_clone(), LIB_SYMBOL::operator=(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), SCH_LIB_PLUGIN_CACHE::removeSymbol(), PCB_BASE_EDIT_FRAME::saveCopyInUndoList(), CLIPBOARD_IO::SaveSelection(), LIB_SYMBOL::SetConversion(), LIB_SYMBOL::SetUnitCount(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace().

◆ ConvertSegmentToPolygon() [1/2]

void GERBER_DRAW_ITEM::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

Parameters
aPolygonis the SHAPE_POLY_SET to fill. If null (usual case), m_Polygon will be used

Definition at line 590 of file gerber_draw_item.cpp.

591{
593}
SHAPE_POLY_SET m_Polygon
void ConvertSegmentToPolygon()
Convert a line to an equivalent polygon.

References ConvertSegmentToPolygon(), and m_Polygon.

Referenced by ConvertSegmentToPolygon(), KIGFX::GERBVIEW_PAINTER::draw(), GetBoundingBox(), and Print().

◆ ConvertSegmentToPolygon() [2/2]

void GERBER_DRAW_ITEM::ConvertSegmentToPolygon ( SHAPE_POLY_SET aPolygon) const

Definition at line 526 of file gerber_draw_item.cpp.

527{
528 aPolygon->RemoveAllContours();
529 aPolygon->NewOutline();
530
531 VECTOR2I start = m_Start;
532 VECTOR2I end = m_End;
533
534 // make calculations more easy if ensure start.x < end.x
535 // (only 2 quadrants to consider)
536 if( start.x > end.x )
537 std::swap( start, end );
538
539 // calculate values relative to start point:
540 VECTOR2I delta = end - start;
541
542 // calculate corners for the first quadrant only (delta.x and delta.y > 0 )
543 // currently, delta.x already is > 0.
544 // make delta.y > 0
545 bool change = delta.y < 0;
546
547 if( change )
548 delta.y = -delta.y;
549
550 // Now create the full polygon.
551 // Due to previous changes, the shape is always something like
552 // 3 4
553 // 2 5
554 // 1 6
555 VECTOR2I corner;
556 corner.x -= m_Size.x/2;
557 corner.y -= m_Size.y/2;
558 VECTOR2I close = corner;
559 aPolygon->Append( VECTOR2I( corner ) ); // Lower left corner, start point (1)
560 corner.y += m_Size.y;
561 aPolygon->Append( VECTOR2I( corner ) ); // upper left corner, start point (2)
562
563 if( delta.x || delta.y )
564 {
565 corner += delta;
566 aPolygon->Append( VECTOR2I( corner ) ); // upper left corner, end point (3)
567 }
568
569 corner.x += m_Size.x;
570 aPolygon->Append( VECTOR2I( corner ) ); // upper right corner, end point (4)
571 corner.y -= m_Size.y;
572 aPolygon->Append( VECTOR2I( corner ) ); // lower right corner, end point (5)
573
574 if( delta.x || delta.y )
575 {
576 corner -= delta;
577 aPolygon->Append( VECTOR2I( corner ) ); // lower left corner, start point (6)
578 }
579
580 aPolygon->Append( VECTOR2I( close ) ); // close the shape
581
582 // Create final polygon:
583 if( change )
584 aPolygon->Mirror( false, true );
585
586 aPolygon->Move( VECTOR2I( start ) );
587}
int Append(int x, int y, int aOutline=-1, int aHole=-1, bool aAllowDuplication=false)
Add a new vertex to the contour indexed by aOutline and aHole (defaults to the outline of the last po...
void Mirror(bool aX=true, bool aY=false, const VECTOR2I &aRef={ 0, 0 })
Mirror the line points about y or x (or both)
int NewOutline()
Creates a new hole in a given outline.
void Move(const VECTOR2I &aVector) override
constexpr int delta
VECTOR2< int > VECTOR2I
Definition: vector2d.h:618

References SHAPE_POLY_SET::Append(), delta, m_End, m_Size, m_Start, SHAPE_POLY_SET::Mirror(), SHAPE_POLY_SET::Move(), SHAPE_POLY_SET::NewOutline(), SHAPE_POLY_SET::RemoveAllContours(), VECTOR2< T >::x, and VECTOR2< T >::y.

◆ Get() [1/3]

template<typename T >
std::optional< T > INSPECTABLE::Get ( const wxString &  aProperty) const
inlineinherited

Definition at line 104 of file inspectable.h.

105 {
107 TYPE_ID thisType = TYPE_HASH( *this );
108 PROPERTY_BASE* prop = propMgr.GetProperty( thisType, aProperty );
109 std::optional<T> ret;
110
111 if( prop )
112 {
113 const void* object = propMgr.TypeCast( this, thisType, prop->OwnerHash() );
114
115 if( object )
116 ret = prop->get<T>( object );
117 }
118
119 return ret;
120 }
virtual size_t OwnerHash() const =0
Return type-id of the Owner class.
T get(const void *aObject) const
Definition: property.h:316
Provide class metadata.Helper macro to map type hashes to names.
Definition: property_mgr.h:74
static PROPERTY_MANAGER & Instance()
Definition: property_mgr.h:76
PROPERTY_BASE * GetProperty(TYPE_ID aType, const wxString &aProperty) const
Return a property for a specific type.
const void * TypeCast(const void *aSource, TYPE_ID aBase, TYPE_ID aTarget) const
Cast a type to another type.
#define TYPE_HASH(x)
Definition: property.h:62
size_t TYPE_ID
Unique type identifier.
Definition: property_mgr.h:46

References PROPERTY_BASE::get(), PROPERTY_MANAGER::GetProperty(), PROPERTY_MANAGER::Instance(), PROPERTY_BASE::OwnerHash(), TYPE_HASH, and PROPERTY_MANAGER::TypeCast().

◆ Get() [2/3]

wxAny INSPECTABLE::Get ( PROPERTY_BASE aProperty) const
inlineinherited

Definition at line 84 of file inspectable.h.

85 {
87 const void* object = propMgr.TypeCast( this, TYPE_HASH( *this ), aProperty->OwnerHash() );
88 return object ? aProperty->getter( object ) : wxAny();
89 }
virtual wxAny getter(const void *aObject) const =0

References PROPERTY_BASE::getter(), PROPERTY_MANAGER::Instance(), PROPERTY_BASE::OwnerHash(), TYPE_HASH, and PROPERTY_MANAGER::TypeCast().

Referenced by BOOST_AUTO_TEST_CASE(), CLASS_D_DESC::CLASS_D_DESC(), EDA_SHAPE_DESC::EDA_SHAPE_DESC(), PROPERTIES_PANEL::getItemValue(), PCB_EXPR_VAR_REF::GetValue(), and PAD_DESC::PAD_DESC().

◆ Get() [3/3]

template<typename T >
T INSPECTABLE::Get ( PROPERTY_BASE aProperty) const
inlineinherited

Definition at line 92 of file inspectable.h.

93 {
95 const void* object = propMgr.TypeCast( this, TYPE_HASH( *this ), aProperty->OwnerHash() );
96
97 if( !object )
98 throw std::runtime_error( "Could not cast INSPECTABLE to the requested type" );
99
100 return aProperty->get<T>( object );
101 }

References PROPERTY_BASE::get(), PROPERTY_MANAGER::Instance(), PROPERTY_BASE::OwnerHash(), TYPE_HASH, and PROPERTY_MANAGER::TypeCast().

◆ GetABPosition()

VECTOR2I GERBER_DRAW_ITEM::GetABPosition ( const VECTOR2I aXYPosition) const

Return 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
aXYPositionis position in X,Y gerber axis
Returns
The given position in plotter A,B axis.

Definition at line 133 of file gerber_draw_item.cpp.

134{
135 /* Note: RS274Xrevd_e is obscure about the order of transforms:
136 * For instance: Rotation must be made after or before mirroring ?
137 * Note: if something is changed here, GetYXPosition must reflect changes
138 */
139 VECTOR2I abPos = aXYPosition + m_GerberImageFile->m_ImageJustifyOffset;
140
141 if( m_swapAxis )
142 std::swap( abPos.x, abPos.y );
143
145 abPos.x = KiROUND( abPos.x * m_drawScale.x );
146 abPos.y = KiROUND( abPos.y * m_drawScale.y );
148
149 if( !rotation.IsZero() )
150 RotatePoint( abPos, -rotation );
151
152 // Negate A axis if mirrored
153 if( m_mirrorA )
154 abPos.x = -abPos.x;
155
156 // abPos.y must be negated when no mirror, because draw axis is top to bottom
157 if( !m_mirrorB )
158 abPos.y = -abPos.y;
159
160 return abPos;
161}
int m_ImageRotation
Image rotation (0, 90, 180, 270 only) in degrees.
VECTOR2I m_ImageOffset
Coord Offset, from IO command.
VECTOR2I m_ImageJustifyOffset
Image Justify Offset on XY axis (default = 0,0)
@ DEGREES_T
Definition: eda_angle.h:31
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
Definition: trigo.cpp:183
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: util.h:85

References DEGREES_T, EDA_ANGLE::IsZero(), 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(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by AM_PRIMITIVE::ConvertBasicShapeToPolygon(), KIGFX::GERBVIEW_PAINTER::draw(), D_CODE::DrawFlashedPolygon(), D_CODE::DrawFlashedShape(), KIGFX::GERBVIEW_PAINTER::drawFlashedShape(), KIGFX::GERBVIEW_PAINTER::drawPolygon(), GBR_TO_PCB_EXPORTER::export_flashed_copper_item(), GBR_TO_PCB_EXPORTER::export_non_copper_item(), GetBoundingBox(), GetTextD_CodePrms(), HitTest(), Print(), and PrintGerberPoly().

◆ GetBoundingBox()

const BOX2I GERBER_DRAW_ITEM::GetBoundingBox ( ) const
overridevirtual

Return 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 249 of file gerber_draw_item.cpp.

250{
251 // return a rectangle which is (pos,dim) in nature. therefore the +1
252 BOX2I bbox( m_Start, VECTOR2I( 1, 1 ) );
253 D_CODE* code = GetDcodeDescr();
254
255 // TODO(JE) GERBER_DRAW_ITEM maybe should actually be a number of subclasses.
256 // Until/unless that is changed, we need to do different things depending on
257 // what is actually being represented by this GERBER_DRAW_ITEM.
258
259 switch( m_Shape )
260 {
261 case GBR_POLYGON:
262 {
263 BOX2I bb = m_Polygon.BBox();
264 bbox.Inflate( bb.GetWidth() / 2, bb.GetHeight() / 2 );
265 bbox.SetOrigin( bb.GetOrigin() );
266 break;
267 }
268
269 case GBR_CIRCLE:
270 {
271 double radius = GetLineLength( m_Start, m_End );
272 bbox.Inflate( radius, radius );
273 break;
274 }
275
276 case GBR_ARC:
277 {
278 EDA_ANGLE angle( atan2( double( m_End.y - m_ArcCentre.y ),
279 double( m_End.x - m_ArcCentre.x ) )
280 - atan2( double( m_Start.y - m_ArcCentre.y ),
281 double( m_Start.x - m_ArcCentre.x ) ),
282 RADIANS_T );
283
284 if( m_End == m_Start ) // Arc with the end point = start point is expected to be a circle.
286 else
287 angle.Normalize();
288
290 bbox = arc.BBox( m_Size.x / 2 ); // m_Size.x is the line thickness
291 break;
292 }
293
294 case GBR_SPOT_CIRCLE:
295 {
296 if( code )
297 {
298 int radius = code->m_Size.x >> 1;
299 bbox.Inflate( radius, radius );
300 }
301
302 break;
303 }
304
305 case GBR_SPOT_RECT:
306 {
307 if( code )
308 bbox.Inflate( code->m_Size.x / 2, code->m_Size.y / 2 );
309
310 break;
311 }
312
313 case GBR_SPOT_OVAL:
314 {
315 if( code )
316 bbox.Inflate( code->m_Size.x /2, code->m_Size.y / 2 );
317
318 break;
319 }
320
321 case GBR_SPOT_MACRO:
322 case GBR_SPOT_POLY:
323 {
324 if( code )
325 {
326 if( code->m_Polygon.OutlineCount() == 0 )
327 code->ConvertShapeToPolygon( this );
328
329 bbox.Inflate( code->m_Polygon.BBox().GetWidth() / 2,
330 code->m_Polygon.BBox().GetHeight() / 2 );
331 }
332
333 break;
334 }
335
336 case GBR_SEGMENT:
337 {
338 if( code && code->m_Shape == APT_RECT )
339 {
340 if( m_Polygon.OutlineCount() == 0 )
341 {
342 // We cannot initialize m_Polygon, because we are in a const function.
343 // So use a temporary polygon
344 SHAPE_POLY_SET poly_shape;
345 ConvertSegmentToPolygon( &poly_shape );
346 bbox = poly_shape.BBox();
347 }
348
349 else
350 {
351 bbox = m_Polygon.BBox();
352 }
353 }
354 else
355 {
356 int radius = ( m_Size.x + 1 ) / 2;
357
358 int ymax = std::max( m_Start.y, m_End.y ) + radius;
359 int xmax = std::max( m_Start.x, m_End.x ) + radius;
360
361 int ymin = std::min( m_Start.y, m_End.y ) - radius;
362 int xmin = std::min( m_Start.x, m_End.x ) - radius;
363
364 bbox = BOX2I( VECTOR2I( xmin, ymin ), VECTOR2I( xmax - xmin + 1, ymax - ymin + 1 ) );
365 }
366
367 break;
368 }
369 default:
370 wxASSERT_MSG( false, wxT( "GERBER_DRAW_ITEM shape is unknown!" ) );
371 break;
372 }
373
374 // calculate the corners coordinates in current Gerber axis orientations
375 VECTOR2I org = GetABPosition( bbox.GetOrigin() );
376 VECTOR2I end = GetABPosition( bbox.GetEnd() );
377
378 // Set the corners position:
379 bbox.SetOrigin( org );
380 bbox.SetEnd( end );
381 bbox.Normalize();
382
383 return bbox;
384}
BOX2< VECTOR2I > BOX2I
Definition: box2.h:847
void SetOrigin(const Vec &pos)
Definition: box2.h:202
const Vec & GetOrigin() const
Definition: box2.h:183
coord_type GetHeight() const
Definition: box2.h:188
coord_type GetWidth() const
Definition: box2.h:187
BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
Definition: box2.h:506
A gerber DCODE (also called Aperture) definition.
Definition: dcode.h:80
APERTURE_T m_Shape
shape ( Line, rectangle, circle , oval .. )
Definition: dcode.h:190
SHAPE_POLY_SET m_Polygon
Definition: dcode.h:204
wxSize m_Size
Horizontal and vertical dimensions.
Definition: dcode.h:189
void ConvertShapeToPolygon(const GERBER_DRAW_ITEM *aParent)
Convert a shape to an equivalent polygon.
Definition: dcode.cpp:297
D_CODE * GetDcodeDescr() const
Return the GetDcodeDescr of this object, or NULL.
VECTOR2I GetABPosition(const VECTOR2I &aXYPosition) const
Return the image position of aPosition for this object.
Represent a set of closed polygons.
int OutlineCount() const
Return the number of vertices in a given outline/hole.
const BOX2I BBox(int aClearance=0) const override
Compute a bounding box of the shape, with a margin of aClearance a collision.
@ APT_RECT
Definition: dcode.h:50
@ RADIANS_T
Definition: eda_angle.h:32
static constexpr EDA_ANGLE & ANGLE_360
Definition: eda_angle.h:418
@ GBR_SPOT_OVAL
@ GBR_SPOT_POLY
@ GBR_SPOT_RECT
@ GBR_CIRCLE
@ GBR_POLYGON
@ GBR_SPOT_CIRCLE
@ GBR_ARC
@ GBR_SPOT_MACRO
static DIRECTION_45::AngleType angle(const VECTOR2I &a, const VECTOR2I &b)
double GetLineLength(const VECTOR2I &aPointA, const VECTOR2I &aPointB)
Return the length of a line segment defined by aPointA and aPointB.
Definition: trigo.h:188

References PNS::angle(), ANGLE_360, APT_RECT, SHAPE_ARC::BBox(), SHAPE_POLY_SET::BBox(), ConvertSegmentToPolygon(), D_CODE::ConvertShapeToPolygon(), GBR_ARC, GBR_CIRCLE, GBR_POLYGON, GBR_SEGMENT, GBR_SPOT_CIRCLE, GBR_SPOT_MACRO, GBR_SPOT_OVAL, GBR_SPOT_POLY, GBR_SPOT_RECT, GetABPosition(), GetDcodeDescr(), BOX2< Vec >::GetEnd(), BOX2< Vec >::GetHeight(), GetLineLength(), BOX2< Vec >::GetOrigin(), BOX2< Vec >::GetWidth(), BOX2< Vec >::Inflate(), m_ArcCentre, m_End, D_CODE::m_Polygon, m_Polygon, D_CODE::m_Shape, m_Shape, D_CODE::m_Size, m_Size, m_Start, BOX2< Vec >::Normalize(), SHAPE_POLY_SET::OutlineCount(), RADIANS_T, BOX2< Vec >::SetEnd(), BOX2< Vec >::SetOrigin(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by KIGFX::GERBVIEW_PAINTER::draw(), HitTest(), and ViewBBox().

◆ GetClass()

wxString GERBER_DRAW_ITEM::GetClass ( ) const
inlineoverridevirtual
Returns
the class name string.

Implements EDA_ITEM.

Definition at line 202 of file gerber_draw_item.h.

203 {
204 return wxT( "GERBER_DRAW_ITEM" );
205 }

◆ GetDcodeDescr()

D_CODE * GERBER_DRAW_ITEM::GetDcodeDescr ( ) const

Return the GetDcodeDescr of this object, or NULL.

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

Definition at line 237 of file gerber_draw_item.cpp.

238{
239 if( ( m_DCode < FIRST_DCODE ) || ( m_DCode > LAST_DCODE ) )
240 return nullptr;
241
242 if( m_GerberImageFile == nullptr )
243 return nullptr;
244
246}
D_CODE * GetDCODE(int aDCODE) const
Return a pointer to the D_CODE within this GERBER for the given aDCODE.
#define FIRST_DCODE
Definition: dcode.h:69
#define LAST_DCODE
Definition: dcode.h:70

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

Referenced by AM_PRIMITIVE::ConvertBasicShapeToPolygon(), AM_PRIMITIVE::ConvertShapeToPolygon(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::drawApertureMacro(), KIGFX::GERBVIEW_PAINTER::drawFlashedShape(), GBR_TO_PCB_EXPORTER::export_flashed_copper_item(), GBR_TO_PCB_EXPORTER::export_non_copper_item(), fillFlashedGBRITEM(), GetBoundingBox(), KIGFX::GERBVIEW_RENDER_SETTINGS::GetColor(), GetMsgPanelInfo(), GetTextD_CodePrms(), GERBVIEW_CONTROL::HighlightControl(), HitTest(), AM_PRIMITIVE::IsAMPrimitiveExposureOn(), Print(), ShowGBRShape(), and ViewGetLOD().

◆ GetEditFlags()

EDA_ITEM_FLAGS EDA_ITEM::GetEditFlags ( ) const
inlineinherited

Definition at line 145 of file eda_item.h.

146 {
147 constexpr int mask =
149
150 return m_flags & mask;
151 }
#define IS_PASTED
Modifier on IS_NEW which indicates it came from clipboard.
#define IS_CHANGED
Item was edited, and modified.
#define IS_NEW
New item, just created.
#define IS_BROKEN
Is a segment just broken by BreakSegment.
#define STRUCT_DELETED
flag indication structures to be erased
#define IS_MOVING
Item being moved.

References IS_BROKEN, IS_CHANGED, IS_MOVING, IS_NEW, IS_PASTED, EDA_ITEM::m_flags, and STRUCT_DELETED.

Referenced by SCH_EDIT_TOOL::ChangeTextType(), EDA_ITEM::ClearEditFlags(), SCH_EDIT_FRAME::DeleteJunction(), SCH_EDIT_TOOL::editFieldText(), SYMBOL_EDITOR_PIN_TOOL::EditPinProperties(), SCH_EDITOR_CONTROL::EditWithSymbolEditor(), SCH_SYMBOL::GetMsgPanelInfo(), SELECTION_CONDITIONS::Idle(), SELECTION_CONDITIONS::IdleSelection(), SYMBOL_EDITOR_MOVE_TOOL::Main(), PCB_POINT_EDITOR::OnSelectionChange(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), SCH_EDIT_FRAME::SelectUnit(), DIALOG_IMAGE_PROPERTIES::TransferDataFromWindow(), DIALOG_LABEL_PROPERTIES::TransferDataFromWindow(), DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_DIMENSION_PROPERTIES::TransferDataFromWindow(), DIALOG_FOOTPRINT_PROPERTIES::TransferDataFromWindow(), DIALOG_TARGET_PROPERTIES::TransferDataFromWindow(), and DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow().

◆ GetFlags()

◆ GetFocusPosition()

virtual const VECTOR2I EDA_ITEM::GetFocusPosition ( ) const
inlinevirtualinherited

Similar to GetPosition, but allows items to return their visual center rather than their anchor.

Reimplemented in BOARD, PCB_SHAPE, and PCB_TRACK.

Definition at line 256 of file eda_item.h.

256{ return GetPosition(); }
virtual VECTOR2I GetPosition() const
Definition: eda_item.h:249

References EDA_ITEM::GetPosition().

Referenced by SCH_EDIT_FRAME::FocusOnItem().

◆ GetFriendlyName()

wxString EDA_ITEM::GetFriendlyName ( ) const
virtualinherited

Reimplemented in PCB_SHAPE, PCB_TRACK, and ZONE.

Definition at line 310 of file eda_item.cpp.

311{
312 return GetTypeDesc();
313}
wxString GetTypeDesc() const
Return a translated description of the type for this EDA_ITEM for display in user facing messages.
Definition: eda_item.cpp:301

References EDA_ITEM::GetTypeDesc().

Referenced by PROPERTIES_PANEL::rebuildProperties().

◆ GetItemDescription()

wxString GERBER_DRAW_ITEM::GetItemDescription ( UNITS_PROVIDER aUnitsProvider) const
overridevirtual

Return 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 from EDA_ITEM.

Definition at line 984 of file gerber_draw_item.cpp.

985{
986 wxString layerName = GERBER_FILE_IMAGE_LIST::GetImagesList().GetDisplayName( GetLayer(), true );
987
988 return wxString::Format( _( "%s (D%d) on layer %d: %s" ),
989 ShowGBRShape(),
990 m_DCode,
991 GetLayer() + 1,
992 layerName );
993}
wxString ShowGBRShape() const
int GetLayer() const
Return the layer this item is on.
static GERBER_FILE_IMAGE_LIST & GetImagesList()
const wxString GetDisplayName(int aIdx, bool aNameOnly=false, bool aFullName=false)
Get the display name for the layer at aIdx.
#define _(s)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200

References _, Format(), GERBER_FILE_IMAGE_LIST::GetDisplayName(), GERBER_FILE_IMAGE_LIST::GetImagesList(), GetLayer(), m_DCode, and ShowGBRShape().

◆ GetLayer()

int GERBER_DRAW_ITEM::GetLayer ( ) const

Return the layer this item is on.

Definition at line 81 of file gerber_draw_item.cpp.

82{
83 // Return the layer this item is on, or 0 if the m_GerberImageFile is null.
85}
int m_GraphicLayer
Graphic layer Number.

References m_GerberImageFile, and GERBER_FILE_IMAGE::m_GraphicLayer.

Referenced by GetItemDescription(), GetMsgPanelInfo(), GERBVIEW_SELECTION_TOOL::selectable(), and ViewGetLayers().

◆ GetLayerPolarity()

bool GERBER_DRAW_ITEM::GetLayerPolarity ( ) const
inline

◆ GetMenuImage()

BITMAPS GERBER_DRAW_ITEM::GetMenuImage ( ) const
overridevirtual

Return 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 from EDA_ITEM.

Definition at line 737 of file gerber_draw_item.cpp.

738{
739 if( m_Flashed )
740 return BITMAPS::pad;
741
742 switch( m_Shape )
743 {
744 case GBR_SEGMENT:
745 case GBR_ARC:
746 case GBR_CIRCLE:
747 return BITMAPS::add_line;
748
749 case GBR_SPOT_OVAL:
750 case GBR_SPOT_CIRCLE:
751 case GBR_SPOT_RECT:
752 case GBR_SPOT_POLY:
753 case GBR_SPOT_MACRO:
754 // should be handles by m_Flashed == true
755 return BITMAPS::pad;
756
757 case GBR_POLYGON:
759 }
760
761 return BITMAPS::info;
762}
@ add_graphical_polygon

References add_graphical_polygon, add_line, GBR_ARC, GBR_CIRCLE, GBR_POLYGON, GBR_SEGMENT, GBR_SPOT_CIRCLE, GBR_SPOT_MACRO, GBR_SPOT_OVAL, GBR_SPOT_POLY, GBR_SPOT_RECT, info, m_Flashed, m_Shape, and pad.

◆ GetMsgPanelInfo()

void GERBER_DRAW_ITEM::GetMsgPanelInfo ( EDA_DRAW_FRAME aFrame,
std::vector< MSG_PANEL_ITEM > &  aList 
)
overridevirtual

Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.

Parameters
aListis the list to populate.

Reimplemented from EDA_ITEM.

Definition at line 616 of file gerber_draw_item.cpp.

617{
618 wxString msg;
619 wxString text;
620
621 msg = ShowGBRShape();
622 aList.emplace_back( _( "Type" ), msg );
623
624 // Display D_Code value with its attributes for items using a DCode:
625 if( m_Shape == GBR_POLYGON ) // Has no DCode, but can have an attribute
626 {
627 msg = _( "Attribute" );
628
629 if( m_AperFunction.IsEmpty() )
630 text = _( "No attribute" );
631 else
633 }
634 else
635 {
636 msg.Printf( _( "D Code %d" ), m_DCode );
637 D_CODE* apertDescr = GetDcodeDescr();
638
639 if( !apertDescr || apertDescr->m_AperFunction.IsEmpty() )
640 text = _( "No attribute" );
641 else
642 text = apertDescr->m_AperFunction;
643 }
644
645 aList.emplace_back( msg, text );
646
647 // Display graphic layer name
649 aList.emplace_back( _( "Graphic Layer" ), msg );
650
651 // Display item position
656
657 if( m_Flashed )
658 {
659 msg.Printf( wxT( "(%.4f, %.4f)" ), xStart, yStart );
660 aList.emplace_back( _( "Position" ), msg );
661 }
662 else
663 {
664 msg.Printf( wxT( "(%.4f, %.4f)" ), xStart, yStart );
665 aList.emplace_back( _( "Start" ), msg );
666
667 msg.Printf( wxT( "(%.4f, %.4f)" ), xEnd, yEnd );
668 aList.emplace_back( _( "End" ), msg );
669 }
670
671 // Display item rotation
672 // The full rotation is Image rotation + m_lyrRotation
673 // but m_lyrRotation is specific to this object
674 // so we display only this parameter
675 msg.Printf( wxT( "%f" ), m_lyrRotation );
676 aList.emplace_back( _( "Rotation" ), msg );
677
678 // Display item polarity (item specific)
679 msg = m_LayerNegative ? _("Clear") : _("Dark");
680 aList.emplace_back( _( "Polarity" ), msg );
681
682 // Display mirroring (item specific)
683 msg.Printf( wxT( "A:%s B:%s" ), m_mirrorA ? _( "Yes" ) : _( "No" ),
684 m_mirrorB ? _( "Yes" ) : _( "No" ) );
685 aList.emplace_back( _( "Mirror" ), msg );
686
687 // Display AB axis swap (item specific)
688 msg = m_swapAxis ? wxT( "A=Y B=X" ) : wxT( "A=X B=Y" );
689 aList.emplace_back( _( "AB axis" ), msg );
690
691 // Display net info, if exists
693 return;
694
695 // Build full net info:
696 wxString net_msg;
697 wxString cmp_pad_msg;
698
700 {
701 net_msg = _( "Net:" );
702 net_msg << wxS( " " );
703
704 if( m_netAttributes.m_Netname.IsEmpty() )
705 net_msg << _( "<no net>" );
706 else
708 }
709
711 {
713 {
714 cmp_pad_msg.Printf( _( "Cmp: %s Pad: %s" ),
717 }
718 else
719 {
720 cmp_pad_msg.Printf( _( "Cmp: %s Pad: %s Fct %s" ),
724 }
725 }
726
728 {
729 cmp_pad_msg = _( "Cmp:" );
730 cmp_pad_msg << wxS( " " ) << m_netAttributes.m_Cmpref;
731 }
732
733 aList.emplace_back( net_msg, cmp_pad_msg );
734}
constexpr EDA_IU_SCALE gerbIUScale
Definition: base_units.h:108
wxString m_AperFunction
the aperture attribute (created by a TA.AperFunction command).
Definition: dcode.h:201
const wxString & GetValue() const
int m_NetAttribType
the type of net info (used to define the gerber string to create)
wxString m_Cmpref
the component reference parent of the data
@ GBR_NETINFO_NET
print info associated to a net (TO.N attribute)
@ GBR_NETINFO_UNSPECIFIED
idle command (no command)
@ GBR_NETINFO_CMP
print info associated to a component (TO.C attribute)
@ GBR_NETINFO_PAD
print info associated to a flashed pad (TO.P attribute)
GBR_DATA_FIELD m_PadPinFunction
for a pad: the pin function (defined in schematic)
GBR_DATA_FIELD m_Padname
for a flashed pad: the pad name ((TO.P attribute)
wxString m_Netname
for items associated to a net: the netname
GBR_NETLIST_METADATA m_netAttributes
the string given by a TO attribute set in aperture (dcode).
EDA_UNITS GetUserUnits() const
double ToUserUnit(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnit, double aValue)
Function To_User_Unit convert aValue in internal units to the appropriate user units defined by aUnit...
Definition: eda_units.cpp:201
wxString UnescapeString(const wxString &aSource)

References _, GBR_NETLIST_METADATA::GBR_NETINFO_CMP, GBR_NETLIST_METADATA::GBR_NETINFO_NET, GBR_NETLIST_METADATA::GBR_NETINFO_PAD, GBR_NETLIST_METADATA::GBR_NETINFO_UNSPECIFIED, GBR_POLYGON, gerbIUScale, GetDcodeDescr(), GERBER_FILE_IMAGE_LIST::GetDisplayName(), GERBER_FILE_IMAGE_LIST::GetImagesList(), GetLayer(), UNITS_PROVIDER::GetUserUnits(), GBR_DATA_FIELD::GetValue(), GBR_DATA_FIELD::IsEmpty(), D_CODE::m_AperFunction, m_AperFunction, GBR_NETLIST_METADATA::m_Cmpref, m_DCode, m_End, m_Flashed, 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, GBR_NETLIST_METADATA::m_PadPinFunction, m_Shape, m_Start, m_swapAxis, ShowGBRShape(), text, EDA_UNIT_UTILS::UI::ToUserUnit(), UnescapeString(), VECTOR2< T >::x, and VECTOR2< T >::y.

◆ GetNetAttributes()

const GBR_NETLIST_METADATA & GERBER_DRAW_ITEM::GetNetAttributes ( ) const
inline

◆ GetParent()

◆ GetPosition()

VECTOR2I GERBER_DRAW_ITEM::GetPosition ( ) const
inlineoverridevirtual

Return the position of this object.

This function exists mainly to satisfy the virtual GetPosition() in parent class

Returns
The position of this object.

Reimplemented from EDA_ITEM.

Definition at line 122 of file gerber_draw_item.h.

122{ return m_Start; }

References m_Start.

◆ GetSortPosition()

virtual VECTOR2I EDA_ITEM::GetSortPosition ( ) const
inlinevirtualinherited

Return the coordinates that should be used for sorting this element visually compared to other elements.

For instance, for lines the midpoint might be a better sorting point than either end.

Returns
X,Y coordinate of the sort point

Reimplemented in SCH_LINE.

Definition at line 265 of file eda_item.h.

265{ return GetPosition(); }

References EDA_ITEM::GetPosition().

◆ GetState()

int EDA_ITEM::GetState ( EDA_ITEM_FLAGS  type) const
inlineinherited

Definition at line 123 of file eda_item.h.

124 {
125 return m_status & type;
126 }
EDA_ITEM_FLAGS m_status
Definition: eda_item.h:495

References EDA_ITEM::m_status.

◆ GetStatus()

EDA_ITEM_FLAGS EDA_ITEM::GetStatus ( ) const
inlineinherited

Definition at line 136 of file eda_item.h.

136{ return m_status; }

References EDA_ITEM::m_status.

◆ GetTextD_CodePrms()

bool GERBER_DRAW_ITEM::GetTextD_CodePrms ( int &  aSize,
VECTOR2I aPos,
EDA_ANGLE aOrientation 
)

Return the best size and orientation to display the D_Code on screen.

Parameters
aSizeis a reference to return the text size
aPosis a reference to return the text position
aOrientationis a reference to return the text orientation
Returns
true if the parameters can be calculated, false for unknown D_Code

Definition at line 88 of file gerber_draw_item.cpp.

89{
90 // calculate the best size and orientation of the D_Code text
91
92 if( m_DCode <= 0 )
93 return false; // No D_Code for this item
94
95 if( m_Flashed || m_Shape == GBR_ARC )
96 aPos = m_Start;
97 else // it is a line:
98 aPos = ( m_Start + m_End) / 2;
99
100 aPos = GetABPosition( aPos );
101
102 int size; // the best size for the text
103
104 if( GetDcodeDescr() )
105 size = GetDcodeDescr()->GetShapeDim( this );
106 else
107 size = std::min( m_Size.x, m_Size.y );
108
109 aOrientation = ANGLE_HORIZONTAL;
110
111 if( m_Flashed )
112 {
113 // A reasonable size for text is min_dim/3 because most of time this text has 3 chars.
114 aSize = size / 3;
115 }
116 else // this item is a line
117 {
120
121 aOrientation = angle.Normalize90();
122
123 // A reasonable size for text is size/2 because text needs margin below and above it.
124 // a margin = size/4 seems good, expecting the line len is large enough to show 3 chars,
125 // that is the case most of time.
126 aSize = size / 2;
127 }
128
129 return true;
130}
int GetShapeDim(GERBER_DRAW_ITEM *aParent)
Calculate a value that can be used to evaluate the size of text when displaying the D-Code of an item...
Definition: dcode.cpp:115
static constexpr EDA_ANGLE & ANGLE_HORIZONTAL
Definition: eda_angle.h:408

References PNS::angle(), ANGLE_HORIZONTAL, delta, GBR_ARC, GetABPosition(), GetDcodeDescr(), D_CODE::GetShapeDim(), m_DCode, m_End, m_Flashed, m_Shape, m_Size, and m_Start.

Referenced by KIGFX::GERBVIEW_PAINTER::draw().

◆ GetTypeDesc()

wxString EDA_ITEM::GetTypeDesc ( ) const
inherited

Return a translated description of the type for this EDA_ITEM for display in user facing messages.

Definition at line 301 of file eda_item.cpp.

302{
303 //@see EDA_ITEM_DESC for definition of ENUM_MAP<KICAD_T>
304 wxString typeDescr = ENUM_MAP<KICAD_T>::Instance().ToString( Type() );
305
306 return wxGetTranslation( typeDescr );
307}
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:97
static ENUM_MAP< T > & Instance()
Definition: property.h:573

References ENUM_MAP< T >::Instance(), and EDA_ITEM::Type().

Referenced by PCB_GROUP::AddItem(), EDIT_TOOL::doMoveSelection(), and EDA_ITEM::GetFriendlyName().

◆ GetXYPosition()

VECTOR2I GERBER_DRAW_ITEM::GetXYPosition ( const VECTOR2I aABPosition) const

Return 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
The given position in X,Y axis.

Definition at line 164 of file gerber_draw_item.cpp.

165{
166 // do the inverse transform made by GetABPosition
167 VECTOR2I xyPos = aABPosition;
168
169 if( m_mirrorA )
170 xyPos.x = -xyPos.x;
171
172 if( !m_mirrorB )
173 xyPos.y = -xyPos.y;
174
176
177 if( !rotation.IsZero() )
178 RotatePoint( xyPos, rotation );
179
180 xyPos.x = KiROUND( xyPos.x / m_drawScale.x );
181 xyPos.y = KiROUND( xyPos.y / m_drawScale.y );
183
184 if( m_swapAxis )
185 std::swap( xyPos.x, xyPos.y );
186
188}

References DEGREES_T, EDA_ANGLE::IsZero(), 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(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by HitTest().

◆ HasFlag()

◆ HasNegativeItems()

bool GERBER_DRAW_ITEM::HasNegativeItems ( )

Optimize screen refresh (when no items are in background color refresh can be faster).

Returns
true if this item or at least one shape (when using aperture macros must be drawn in background color.

Definition at line 397 of file gerber_draw_item.cpp.

398{
400
401 // if isClear is true, this item has negative shape
402 return isClear;
403}
bool m_ImageNegative
true = Negative image

References m_GerberImageFile, GERBER_FILE_IMAGE::m_ImageNegative, and m_LayerNegative.

◆ HitTest() [1/2]

bool GERBER_DRAW_ITEM::HitTest ( const BOX2I aRefArea,
bool  aContained,
int  aAccuracy = 0 
) const
overridevirtual

Test if the given wxRect intersect this object.

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

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

Reimplemented from EDA_ITEM.

Definition at line 882 of file gerber_draw_item.cpp.

883{
885
886 if( aRefArea.Contains( pos ) )
887 return true;
888
889 pos = GetABPosition( m_End );
890
891 if( aRefArea.Contains( pos ) )
892 return true;
893
894 return false;
895}
bool Contains(const Vec &aPoint) const
Definition: box2.h:141

References BOX2< Vec >::Contains(), GetABPosition(), m_End, and m_Start.

◆ HitTest() [2/2]

bool GERBER_DRAW_ITEM::HitTest ( const VECTOR2I aRefPos,
int  aAccuracy = 0 
) const
overridevirtual

Test 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 765 of file gerber_draw_item.cpp.

766{
767 // In case the item has a very tiny width defined, allow it to be selected
768 const int MIN_HIT_TEST_RADIUS = gerbIUScale.mmToIU( 0.01 );
769
770 // calculate aRefPos in XY Gerber axis:
771 VECTOR2I ref_pos = GetXYPosition( aRefPos );
772
773 SHAPE_POLY_SET poly;
774
775 switch( m_Shape )
776 {
777 case GBR_POLYGON:
778 poly = m_Polygon;
779 return poly.Contains( VECTOR2I( ref_pos ), 0, aAccuracy );
780
781 case GBR_SPOT_POLY:
782 poly = GetDcodeDescr()->m_Polygon;
783 poly.Move( VECTOR2I( m_Start ) );
784 return poly.Contains( VECTOR2I( ref_pos ), 0, aAccuracy );
785
786 case GBR_SPOT_RECT:
787 return GetBoundingBox().Contains( aRefPos );
788
789 case GBR_SPOT_OVAL:
790 {
791 BOX2I bbox = GetBoundingBox();
792
793 if( ! bbox.Contains( aRefPos ) )
794 return false;
795
796 // This is similar to a segment with thickness = min( m_Size.x, m_Size.y )
797 int radius = std::min( m_Size.x, m_Size.y )/2;
798 VECTOR2I start, end;
799
800 if( m_Size.x > m_Size.y ) // Horizontal oval
801 {
802 int len = m_Size.y - m_Size.x;
803 start.x = -len/2;
804 end.x = len/2;
805 }
806 else // Vertical oval
807 {
808 int len = m_Size.x - m_Size.y;
809 start.y = -len/2;
810 end.y = len/2;
811 }
812
813 start += bbox.Centre();
814 end += bbox.Centre();
815
816 if( radius < MIN_HIT_TEST_RADIUS )
817 radius = MIN_HIT_TEST_RADIUS;
818
819 return TestSegmentHit( aRefPos, start, end, radius );
820 }
821
822 case GBR_ARC:
823 {
824 double radius = GetLineLength( m_Start, m_ArcCentre );
825 VECTOR2D test_radius = VECTOR2D( ref_pos ) - VECTOR2D( m_ArcCentre );
826
827 int size = ( ( m_Size.x < MIN_HIT_TEST_RADIUS ) ? MIN_HIT_TEST_RADIUS : m_Size.x );
828
829 // Are we close enough to the radius?
830 bool radius_hit = ( std::fabs( test_radius.EuclideanNorm() - radius) < size );
831
832 if( radius_hit )
833 {
834 // Now check that we are within the arc angle
835
838 EDA_ANGLE start_angle( start );
839 EDA_ANGLE end_angle( end );
840
841 start_angle.Normalize();
842 end_angle.Normalize();
843
844 if( m_Start == m_End )
845 {
846 start_angle = ANGLE_0;
847 end_angle = ANGLE_360;
848 }
849 else if( end_angle < start_angle )
850 {
851 end_angle += ANGLE_360;
852 }
853
854 EDA_ANGLE test_angle( test_radius );
855 test_angle.Normalize();
856
857 return ( test_angle > start_angle && test_angle < end_angle );
858 }
859
860 return false;
861 }
862
863 case GBR_SPOT_MACRO:
864 // Aperture macro polygons are already in absolute coordinates
865 auto p = GetDcodeDescr()->GetMacro()->GetApertureMacroShape( this, m_Start );
866 return p->Contains( VECTOR2I( aRefPos ), -1, aAccuracy );
867 }
868
869 // TODO: a better analyze of the shape (perhaps create a D_CODE::HitTest for flashed items)
870 int radius = std::min( m_Size.x, m_Size.y ) >> 1;
871
872 if( radius < MIN_HIT_TEST_RADIUS )
873 radius = MIN_HIT_TEST_RADIUS;
874
875 if( m_Flashed )
876 return HitTestPoints( m_Start, ref_pos, radius );
877 else
878 return TestSegmentHit( ref_pos, m_Start, m_End, radius );
879}
SHAPE_POLY_SET * GetApertureMacroShape(const GERBER_DRAW_ITEM *aParent, const VECTOR2I &aShapePos)
Calculate the primitive shape for flashed items.
Vec Centre() const
Definition: box2.h:70
APERTURE_MACRO * GetMacro() const
Definition: dcode.h:124
VECTOR2I GetXYPosition(const VECTOR2I &aABPosition) const
Return the image position of aPosition for this object.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
bool Contains(const VECTOR2I &aP, int aSubpolyIndex=-1, int aAccuracy=0, bool aUseBBoxCaches=false) const
Return true if a given subpolygon contains the point aP.
T EuclideanNorm() const
Compute the Euclidean norm of the vector, which is defined as sqrt(x ** 2 + y ** 2).
Definition: vector2d.h:293
static constexpr EDA_ANGLE & ANGLE_0
Definition: eda_angle.h:412
constexpr int mmToIU(double mm) const
Definition: base_units.h:89
bool TestSegmentHit(const VECTOR2I &aRefPoint, const VECTOR2I &aStart, const VECTOR2I &aEnd, int aDist)
Test if aRefPoint is with aDistance on the line defined by aStart and aEnd.
Definition: trigo.cpp:129
bool HitTestPoints(const VECTOR2I &pointA, const VECTOR2I &pointB, double threshold)
Test, if two points are near each other.
Definition: trigo.h:159
VECTOR2< double > VECTOR2D
Definition: vector2d.h:617

References ANGLE_0, ANGLE_360, BOX2< Vec >::Centre(), BOX2< Vec >::Contains(), SHAPE_POLY_SET::Contains(), VECTOR2< T >::EuclideanNorm(), GBR_ARC, GBR_POLYGON, GBR_SPOT_MACRO, GBR_SPOT_OVAL, GBR_SPOT_POLY, GBR_SPOT_RECT, gerbIUScale, APERTURE_MACRO::GetApertureMacroShape(), GetBoundingBox(), GetDcodeDescr(), GetLineLength(), D_CODE::GetMacro(), GetXYPosition(), HitTestPoints(), m_ArcCentre, m_End, m_Flashed, D_CODE::m_Polygon, m_Polygon, m_Shape, m_Size, m_Start, EDA_IU_SCALE::mmToIU(), SHAPE_POLY_SET::Move(), EDA_ANGLE::Normalize(), TestSegmentHit(), VECTOR2< T >::x, and VECTOR2< T >::y.

◆ IsBrightened()

◆ IsEntered()

bool EDA_ITEM::IsEntered ( ) const
inlineinherited

Definition at line 107 of file eda_item.h.

107{ return m_flags & ENTERED; }
#define ENTERED
indicates a group has been entered

References ENTERED, and EDA_ITEM::m_flags.

Referenced by KIGFX::PCB_PAINTER::draw().

◆ IsForceVisible()

bool EDA_ITEM::IsForceVisible ( ) const
inlineinherited

Definition at line 201 of file eda_item.h.

201{ return m_forceVisible; }
bool m_forceVisible
Definition: eda_item.h:497

References EDA_ITEM::m_forceVisible.

Referenced by KIGFX::SCH_PAINTER::draw(), and SCH_FIELD::Print().

◆ IsModified()

bool EDA_ITEM::IsModified ( ) const
inlineinherited

Definition at line 102 of file eda_item.h.

102{ return m_flags & IS_CHANGED; }

References IS_CHANGED, and EDA_ITEM::m_flags.

Referenced by PCB_EDIT_FRAME::OpenProjectFiles().

◆ IsMoving()

◆ IsNew()

◆ IsReplaceable()

virtual bool EDA_ITEM::IsReplaceable ( ) const
inlinevirtualinherited

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 LIB_TEXTBOX, SCH_FIELD, SCH_LABEL, SCH_SHEET, SCH_SHEET_PIN, SCH_SYMBOL, SCH_TEXT, and SCH_TEXTBOX.

Definition at line 420 of file eda_item.h.

420{ return false; }

Referenced by EDA_ITEM::Matches().

◆ IsRollover()

bool EDA_ITEM::IsRollover ( ) const
inlineinherited

Definition at line 110 of file eda_item.h.

111 {
112 return ( m_flags & ( IS_ROLLOVER | IS_MOVING ) ) == IS_ROLLOVER;
113 }
#define IS_ROLLOVER
Rollover active. Used for hyperlink highlighting.

References IS_MOVING, IS_ROLLOVER, and EDA_ITEM::m_flags.

Referenced by KIGFX::SCH_PAINTER::draw().

◆ IsSelected()

bool EDA_ITEM::IsSelected ( ) const
inlineinherited

Definition at line 106 of file eda_item.h.

106{ return m_flags & SELECTED; }

References EDA_ITEM::m_flags, and SELECTED.

Referenced by ALIGN_DISTRIBUTE_TOOL::AlignBottom(), ALIGN_DISTRIBUTE_TOOL::AlignCenterX(), ALIGN_DISTRIBUTE_TOOL::AlignCenterY(), ALIGN_DISTRIBUTE_TOOL::AlignTop(), SCH_EDIT_TOOL::ChangeTextType(), SCH_EDIT_FRAME::ConvertPart(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), ALIGN_DISTRIBUTE_TOOL::doAlignLeft(), ALIGN_DISTRIBUTE_TOOL::doAlignRight(), ALIGN_DISTRIBUTE_TOOL::doDistributeCentersHorizontally(), ALIGN_DISTRIBUTE_TOOL::doDistributeCentersVertically(), ALIGN_DISTRIBUTE_TOOL::doDistributeGapsHorizontally(), ALIGN_DISTRIBUTE_TOOL::doDistributeGapsVertically(), EDIT_TOOL::doMoveSelection(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::PCB_PAINTER::Draw(), DS_PROXY_UNDO_ITEM::DS_PROXY_UNDO_ITEM(), KIGFX::GERBVIEW_RENDER_SETTINGS::GetColor(), KIGFX::DS_RENDER_SETTINGS::GetColor(), KIGFX::PCB_RENDER_SETTINGS::GetColor(), SCH_MOVE_TOOL::getConnectedDragItems(), KIGFX::SCH_PAINTER::getLineWidth(), DIALOG_EXCHANGE_FOOTPRINTS::isMatch(), DIALOG_CHANGE_SYMBOLS::isMatch(), SCH_SCREEN::MarkConnections(), SCH_LINE::MergeOverlap(), SCH_EDIT_TOOL::Mirror(), EDIT_TOOL::MoveExact(), SCH_MOVE_TOOL::moveItem(), KIGFX::SCH_PAINTER::nonCached(), SCH_MOVE_TOOL::orthoLineDrag(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), BOARD_COMMIT::Push(), EE_SELECTION_TOOL::RebuildSelection(), PCB_SELECTION_TOOL::RebuildSelection(), RENDER_3D_OPENGL::renderFootprint(), SCH_EDIT_TOOL::Rotate(), EE_TOOL_BASE< T >::saveCopyInUndoList(), GERBVIEW_SELECTION_TOOL::select(), PCB_SELECTION_TOOL::select(), EE_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), GERBVIEW_SELECTION_TOOL::selectPoint(), KIGFX::SCH_PAINTER::setDeviceColors(), GERBVIEW_SELECTION_TOOL::unselect(), HIERARCHY_PANE::UpdateHierarchySelection(), PCB_BASE_FRAME::UpdateUserUnits(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::visitItem(), and DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::visitItem().

◆ IsShownAsBitmap()

bool EDA_ITEM::IsShownAsBitmap ( ) const
inlineinherited

Definition at line 173 of file eda_item.h.

173{ return m_flags & IS_SHOWN_AS_BITMAP; }
#define IS_SHOWN_AS_BITMAP

References IS_SHOWN_AS_BITMAP, and EDA_ITEM::m_flags.

◆ IsType()

virtual bool EDA_ITEM::IsType ( const std::vector< KICAD_T > &  aScanTypes) const
inlinevirtualinherited

Check whether the item is one of the listed types.

Parameters
aScanTypesList of item types
Returns
true if the item type is contained in the list aScanTypes

Reimplemented in SCH_FIELD, SCH_ITEM, SCH_LABEL_BASE, SCH_LINE, FP_SHAPE, FP_TEXT, FP_TEXTBOX, PAD, PCB_DIMENSION_BASE, PCB_SHAPE, PCB_TEXT, PCB_TEXTBOX, and PCB_VIA.

Definition at line 181 of file eda_item.h.

182 {
183 for( KICAD_T scanType : aScanTypes )
184 {
185 if( scanType == SCH_LOCATE_ANY_T || scanType == m_structType )
186 return true;
187 }
188
189 return false;
190 }
KICAD_T m_structType
Run time identification, keep private so it can never be changed after a ctor sets it.
Definition: eda_item.h:505
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition: typeinfo.h:78
@ SCH_LOCATE_ANY_T
Definition: typeinfo.h:183

References EDA_ITEM::m_structType, and SCH_LOCATE_ANY_T.

Referenced by SCH_EDIT_TOOL::AutoplaceFields(), ROUTER_TOOL::CanInlineDrag(), DIALOG_SCH_FIELD_PROPERTIES::DIALOG_SCH_FIELD_PROPERTIES(), SCH_FIELD::GetCanonicalName(), KIGFX::SCH_PAINTER::getLineWidth(), SCH_FIELD::GetName(), KIGFX::SCH_PAINTER::getRenderColor(), SCH_FIELD::GetShownText(), SCH_LINE_WIRE_BUS_TOOL::IsDrawingBus(), SCH_LINE_WIRE_BUS_TOOL::IsDrawingLine(), SCH_LINE_WIRE_BUS_TOOL::IsDrawingWire(), SCH_ITEM::IsType(), FP_TEXT::IsType(), FP_TEXTBOX::IsType(), PAD::IsType(), PCB_DIMENSION_BASE::IsType(), PCB_SHAPE::IsType(), PCB_TEXT::IsType(), PCB_TEXTBOX::IsType(), PCB_VIA::IsType(), EE_POINT_EDITOR::Main(), PL_POINT_EDITOR::Main(), CONVERT_TOOL::makePolysFromChainedSegs(), EE_SELECTION_TOOL::RequestSelection(), SCH_FIELD::SetId(), SCH_BASE_FRAME::UpdateItem(), and EDA_ITEM::Visit().

◆ IterateForward() [1/2]

template<class T >
static INSPECT_RESULT EDA_ITEM::IterateForward ( std::deque< T > &  aList,
INSPECTOR  inspector,
void *  testData,
const std::vector< KICAD_T > &  scanTypes 
)
inlinestaticinherited

This changes first parameter to avoid the DList and use the main queue instead.

Definition at line 302 of file eda_item.h.

304 {
305 for( const auto& it : aList )
306 {
307 if( static_cast<EDA_ITEM*>( it )->Visit( inspector,
308 testData,
309 scanTypes ) == INSPECT_RESULT::QUIT )
310 {
312 }
313 }
314
316 }
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:85
virtual INSPECT_RESULT Visit(INSPECTOR inspector, void *testData, const std::vector< KICAD_T > &aScanTypes)
May be re-implemented for each derived class in order to handle all the types given by its member dat...
Definition: eda_item.cpp:91

References CONTINUE, QUIT, and EDA_ITEM::Visit().

Referenced by GERBER_FILE_IMAGE::Visit().

◆ IterateForward() [2/2]

template<class T >
static INSPECT_RESULT EDA_ITEM::IterateForward ( std::vector< T > &  aList,
INSPECTOR  inspector,
void *  testData,
const std::vector< KICAD_T > &  scanTypes 
)
inlinestaticinherited

Change first parameter to avoid the DList and use std::vector instead.

Definition at line 322 of file eda_item.h.

324 {
325 for( const auto& it : aList )
326 {
327 if( static_cast<EDA_ITEM*>( it )->Visit( inspector,
328 testData,
329 scanTypes ) == INSPECT_RESULT::QUIT )
330 {
332 }
333 }
334
336 }

References CONTINUE, QUIT, and EDA_ITEM::Visit().

◆ Matches() [1/2]

virtual bool EDA_ITEM::Matches ( const EDA_SEARCH_DATA aSearchData,
void *  aAuxData 
) const
inlinevirtualinherited

Compare 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.
Returns
True if the item's text matches the search criteria in aSearchData.

Reimplemented in SCH_MARKER, LIB_TEXTBOX, SCH_FIELD, SCH_LABEL_BASE, SCH_PIN, SCH_SHEET, SCH_SHEET_PIN, SCH_SYMBOL, SCH_TEXT, SCH_TEXTBOX, FP_TEXT, FP_TEXTBOX, NETINFO_ITEM, PCB_MARKER, PCB_TEXT, PCB_TEXTBOX, and ZONE.

Definition at line 382 of file eda_item.h.

383 {
384 return false;
385 }

Referenced by SCH_DRAWING_TOOLS::DrawShape(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), SCH_FIND_REPLACE_TOOL::HasMatch(), SCH_MARKER::Matches(), LIB_TEXTBOX::Matches(), SCH_FIELD::Matches(), SCH_LABEL_BASE::Matches(), SCH_PIN::Matches(), SCH_SHEET_PIN::Matches(), SCH_TEXT::Matches(), SCH_TEXTBOX::Matches(), FP_TEXT::Matches(), FP_TEXTBOX::Matches(), NETINFO_ITEM::Matches(), PCB_MARKER::Matches(), PCB_TEXT::Matches(), PCB_TEXTBOX::Matches(), ZONE::Matches(), SCH_FIND_REPLACE_TOOL::ReplaceAndFindNext(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), and SCH_FIND_REPLACE_TOOL::UpdateFind().

◆ Matches() [2/2]

bool EDA_ITEM::Matches ( const wxString &  aText,
const EDA_SEARCH_DATA aSearchData 
) const
protectedinherited

Compare 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 117 of file eda_item.cpp.

118{
119 wxString text = aText;
120 wxString searchText = aSearchData.findString;
121
122 // Don't match if searching for replaceable item and the item doesn't support text replace.
123 if( aSearchData.searchAndReplace && !IsReplaceable() )
124 return false;
125
126 if( !aSearchData.matchCase )
127 {
128 text.MakeUpper();
129 searchText.MakeUpper();
130 }
131
133 {
134 int ii = 0;
135
136 while( ii < (int) text.length() )
137 {
138 int next = text.find( searchText, ii );
139
140 if( next == wxNOT_FOUND )
141 return false;
142
143 ii = next;
144 next += searchText.length();
145
146 bool startOK = ( ii == 0 || !wxIsalnum( text.GetChar( ii - 1 ) ) );
147 bool endOK = ( next == (int) text.length() || !wxIsalnum( text.GetChar( next ) ) );
148
149 if( startOK && endOK )
150 return true;
151 else
152 ii++;
153 }
154
155 return false;
156 }
157 else if( aSearchData.matchMode == EDA_SEARCH_MATCH_MODE::WILDCARD )
158 {
159 return text.Matches( searchText );
160 }
161 else
162 {
163 return text.Find( searchText ) != wxNOT_FOUND;
164 }
165}
virtual bool IsReplaceable() const
Override this method in any derived object that supports test find and replace.
Definition: eda_item.h:420
CITER next(CITER it)
Definition: ptree.cpp:126
EDA_SEARCH_MATCH_MODE matchMode

References EDA_SEARCH_DATA::findString, EDA_ITEM::IsReplaceable(), EDA_SEARCH_DATA::matchCase, EDA_SEARCH_DATA::matchMode, next(), EDA_SEARCH_DATA::searchAndReplace, text, WHOLEWORD, and WILDCARD.

◆ MoveXY()

void GERBER_DRAW_ITEM::MoveXY ( const VECTOR2I aMoveVector)

Move this object.

Parameters
aMoveVectorthe move vector for this object, in XY gerber axis.

Definition at line 387 of file gerber_draw_item.cpp.

388{
389 m_Start += aMoveVector;
390 m_End += aMoveVector;
391 m_ArcCentre += aMoveVector;
392
393 m_Polygon.Move( aMoveVector );
394}

References m_ArcCentre, m_End, m_Polygon, m_Start, and SHAPE_POLY_SET::Move().

Referenced by GERBER_FILE_IMAGE::StepAndRepeatItem().

◆ operator<()

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 231 of file eda_item.cpp.

232{
233 wxFAIL_MSG( wxString::Format( wxT( "Less than operator not defined for item type %s." ),
234 GetClass() ) );
235
236 return false;
237}

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

◆ Print()

void GERBER_DRAW_ITEM::Print ( wxDC *  aDC,
const VECTOR2I aOffset,
GBR_DISPLAY_OPTIONS aOptions 
)

Definition at line 406 of file gerber_draw_item.cpp.

407{
408 // used when a D_CODE is not found. default D_CODE to draw a flashed item
409 static D_CODE dummyD_CODE( 0 );
410 bool isFilled;
411 int radius;
412 int halfPenWidth;
413 static bool show_err;
414 D_CODE* d_codeDescr = GetDcodeDescr();
415
416 if( d_codeDescr == nullptr )
417 d_codeDescr = &dummyD_CODE;
418
420
421 /* isDark is true if flash is positive and should use a drawing
422 * color other than the background color, else use the background color
423 * when drawing so that an erasure happens.
424 */
426
427 if( !isDark )
428 {
429 // draw in background color ("negative" color)
430 color = aOptions->m_NegativeDrawColor;
431 }
432
433 isFilled = aOptions->m_DisplayLinesFill;
434
435 switch( m_Shape )
436 {
437 case GBR_POLYGON:
438 isFilled = aOptions->m_DisplayPolygonsFill;
439
440 if( !isDark )
441 isFilled = true;
442
443 PrintGerberPoly( aDC, color, aOffset, isFilled );
444 break;
445
446 case GBR_CIRCLE:
447 radius = KiROUND( GetLineLength( m_Start, m_End ) );
448
449 halfPenWidth = m_Size.x >> 1;
450
451 if( !isFilled )
452 {
453 // draw the border of the pen's path using two circles, each as narrow as possible
454 GRCircle( aDC, GetABPosition( m_Start ), radius - halfPenWidth, 0, color );
455 GRCircle( aDC, GetABPosition( m_Start ), radius + halfPenWidth, 0, color );
456 }
457 else // Filled mode
458 {
459 GRCircle( aDC, GetABPosition( m_Start ), radius, m_Size.x, color );
460 }
461
462 break;
463
464 case GBR_ARC:
465 // Currently, arcs plotted with a rectangular aperture are not supported.
466 // a round pen only is expected.
467 if( !isFilled )
468 {
471 }
472 else
473 {
476 }
477
478 break;
479
480 case GBR_SPOT_CIRCLE:
481 case GBR_SPOT_RECT:
482 case GBR_SPOT_OVAL:
483 case GBR_SPOT_POLY:
484 case GBR_SPOT_MACRO:
485 isFilled = aOptions->m_DisplayFlashedItemsFill;
486 d_codeDescr->DrawFlashedShape( this, aDC, color, m_Start, isFilled );
487 break;
488
489 case GBR_SEGMENT:
490 /* Plot a line from m_Start to m_End.
491 * Usually, a round pen is used, but some Gerber files use a rectangular pen
492 * In fact, any aperture can be used to plot a line.
493 * currently: only a square pen is handled (I believe using a polygon gives a strange plot).
494 */
495 if( d_codeDescr->m_Shape == APT_RECT )
496 {
497 if( m_Polygon.OutlineCount() == 0 )
499
500 PrintGerberPoly( aDC, color, aOffset, isFilled );
501 }
502 else if( !isFilled )
503 {
505 }
506 else
507 {
509 color );
510 }
511
512 break;
513
514 default:
515 if( !show_err )
516 {
517 wxMessageBox( wxT( "Trace_Segment() type error" ) );
518 show_err = true;
519 }
520
521 break;
522 }
523}
int color
Definition: DXF_plotter.cpp:57
void DrawFlashedShape(const GERBER_DRAW_ITEM *aParent, wxDC *aDC, const COLOR4D &aColor, const VECTOR2I &aShapePos, bool aFilledShape)
Draw the dcode shape for flashed items.
Definition: dcode.cpp:153
bool m_DisplayFlashedItemsFill
Option to draw flashed items (filled/sketch)
COLOR4D m_NegativeDrawColor
The color used to draw negative objects, usually the background color, but not always,...
bool m_DisplayPolygonsFill
Option to draw polygons (filled/sketch)
bool m_DisplayLinesFill
Option to draw line items (filled/sketch)
void PrintGerberPoly(wxDC *aDC, const COLOR4D &aColor, const VECTOR2I &aOffset, bool aFilledShape)
Print the polygon stored in m_PolyCorners.
COLOR4D GetPositiveDrawColor() const
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
void GRCSegm(wxDC *DC, const VECTOR2I &A, const VECTOR2I &B, int width, const COLOR4D &Color)
Definition: gr_basic.cpp:192
void GRCircle(wxDC *aDC, const VECTOR2I &aPos, int aRadius, int aWidth, const COLOR4D &aColor)
Definition: gr_basic.cpp:348
void GRFilledSegment(wxDC *aDC, const VECTOR2I &aStart, const VECTOR2I &aEnd, int aWidth, const COLOR4D &aColor)
Definition: gr_basic.cpp:269
void GRArc(wxDC *aDC, const VECTOR2I &aStart, const VECTOR2I &aEnd, const VECTOR2I &aCenter, int aWidth, const COLOR4D &aColor)
Definition: gr_basic.cpp:369

References APT_RECT, color, ConvertSegmentToPolygon(), D_CODE::DrawFlashedShape(), GBR_ARC, GBR_CIRCLE, GBR_POLYGON, GBR_SEGMENT, GBR_SPOT_CIRCLE, GBR_SPOT_MACRO, GBR_SPOT_OVAL, GBR_SPOT_POLY, GBR_SPOT_RECT, GetABPosition(), GetDcodeDescr(), GetLineLength(), GERBER_FILE_IMAGE::GetPositiveDrawColor(), GRArc(), GRCircle(), GRCSegm(), GRFilledSegment(), 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_Polygon, D_CODE::m_Shape, m_Shape, m_Size, m_Start, SHAPE_POLY_SET::OutlineCount(), and PrintGerberPoly().

◆ PrintGerberPoly()

void GERBER_DRAW_ITEM::PrintGerberPoly ( wxDC *  aDC,
const COLOR4D aColor,
const VECTOR2I aOffset,
bool  aFilledShape 
)

Print the polygon stored in m_PolyCorners.

Definition at line 596 of file gerber_draw_item.cpp.

598{
599 std::vector<VECTOR2I> points;
601 int pointCount = poly.PointCount() - 1;
602
603 points.reserve( pointCount );
604
605 for( int ii = 0; ii < pointCount; ii++ )
606 {
607 VECTOR2I p( poly.CPoint( ii ).x, poly.CPoint( ii ).y );
608 points[ii] = p + aOffset;
609 points[ii] = GetABPosition( points[ii] );
610 }
611
612 GRClosedPoly( aDC, pointCount, &points[0], aFilledShape, aColor );
613}
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
int PointCount() const
Return the number of points (vertices) in this line chain.
const VECTOR2I & CPoint(int aIndex) const
Return a reference to a given point in the line chain.
SHAPE_LINE_CHAIN & Outline(int aIndex)
void GRClosedPoly(wxDC *DC, int n, const VECTOR2I *Points, bool Fill, const COLOR4D &Color)
Draw a closed polyline and fill it if Fill, in object space.
Definition: gr_basic.cpp:342

References SHAPE_LINE_CHAIN::CPoint(), GetABPosition(), GRClosedPoly(), m_Polygon, SHAPE_POLY_SET::Outline(), SHAPE_LINE_CHAIN::PointCount(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by Print().

◆ RenderAsBitmap()

virtual bool EDA_ITEM::RenderAsBitmap ( double  aWorldScale) const
inlinevirtualinherited

Reimplemented in SCH_ITEM.

Definition at line 163 of file eda_item.h.

163{ return false; }

◆ Replace() [1/2]

virtual bool EDA_ITEM::Replace ( const EDA_SEARCH_DATA aSearchData,
void *  aAuxData = nullptr 
)
inlinevirtualinherited

Perform 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 LIB_TEXTBOX, SCH_LABEL_BASE, SCH_PIN, SCH_TEXT, SCH_TEXTBOX, SCH_FIELD, and SCH_SHEET_PIN.

Definition at line 409 of file eda_item.h.

410 {
411 return false;
412 }

◆ Replace() [2/2]

bool EDA_ITEM::Replace ( const EDA_SEARCH_DATA aSearchData,
wxString &  aText 
)
staticinherited

Perform 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 168 of file eda_item.cpp.

169{
170 wxString text = aText;
171 wxString searchText = aSearchData.findString;
172 wxString result;
173 bool replaced = false;
174
175 if( !aSearchData.matchCase )
176 {
177 text = text.Upper();
178 searchText = searchText.Upper();
179 }
180
181 int ii = 0;
182
183 while( ii < (int) text.length() )
184 {
185 int next = text.find( searchText, ii );
186
187 if( next == wxNOT_FOUND )
188 {
189 result += aText.Mid( ii, wxString::npos );
190 break;
191 }
192
193 if( next > ii )
194 result += aText.Mid( ii, next - ii );
195
196 ii = next;
197 next += searchText.length();
198
199 bool startOK;
200 bool endOK;
201
203 {
204 startOK = ( ii == 0 || !wxIsalnum( text.GetChar( ii - 1 ) ) );
205 endOK = ( next == (int) text.length() || !wxIsalnum( text.GetChar( next ) ) );
206 }
207 else
208 {
209 startOK = true;
210 endOK = true;
211 }
212
213 if( startOK && endOK )
214 {
215 result += aSearchData.replaceString;
216 replaced = true;
217 ii = next;
218 }
219 else
220 {
221 result += aText.GetChar( ii );
222 ii++;
223 }
224 }
225
226 aText = result;
227 return replaced;
228}
wxString replaceString

References EDA_SEARCH_DATA::findString, EDA_SEARCH_DATA::matchCase, EDA_SEARCH_DATA::matchMode, next(), EDA_SEARCH_DATA::replaceString, text, and WHOLEWORD.

Referenced by EDA_TEXT::Replace(), SCH_FIELD::Replace(), SCH_FIND_REPLACE_TOOL::ReplaceAll(), and SCH_FIND_REPLACE_TOOL::ReplaceAndFindNext().

◆ Set() [1/3]

template<typename T >
bool INSPECTABLE::Set ( const wxString &  aProperty,
aValue 
)
inlineinherited

Definition at line 66 of file inspectable.h.

67 {
69 TYPE_ID thisType = TYPE_HASH( *this );
70 PROPERTY_BASE* prop = propMgr.GetProperty( thisType, aProperty );
71 void* object = nullptr;
72
73 if( prop )
74 {
75 object = propMgr.TypeCast( this, thisType, prop->OwnerHash() );
76
77 if( object )
78 prop->set<T>( object, aValue );
79 }
80
81 return object != nullptr;
82 }
void set(void *aObject, T aValue)
Definition: property.h:289

References PROPERTY_MANAGER::GetProperty(), PROPERTY_MANAGER::Instance(), PROPERTY_BASE::OwnerHash(), PROPERTY_BASE::set(), TYPE_HASH, and PROPERTY_MANAGER::TypeCast().

◆ Set() [2/3]

template<typename T >
bool INSPECTABLE::Set ( PROPERTY_BASE aProperty,
aValue 
)
inlineinherited

Definition at line 54 of file inspectable.h.

55 {
57 void* object = propMgr.TypeCast( this, TYPE_HASH( *this ), aProperty->OwnerHash() );
58
59 if( object )
60 aProperty->set<T>( object, aValue );
61
62 return object != nullptr;
63 }

References PROPERTY_MANAGER::Instance(), PROPERTY_BASE::OwnerHash(), PROPERTY_BASE::set(), TYPE_HASH, and PROPERTY_MANAGER::TypeCast().

◆ Set() [3/3]

bool INSPECTABLE::Set ( PROPERTY_BASE aProperty,
wxAny &  aValue 
)
inlineinherited

Definition at line 42 of file inspectable.h.

43 {
45 void* object = propMgr.TypeCast( this, TYPE_HASH( *this ), aProperty->OwnerHash() );
46
47 if( object )
48 aProperty->setter( object, aValue );
49
50 return object != nullptr;
51 }
virtual void setter(void *aObject, wxAny &aValue)=0

References PROPERTY_MANAGER::Instance(), PROPERTY_BASE::OwnerHash(), PROPERTY_BASE::setter(), TYPE_HASH, and PROPERTY_MANAGER::TypeCast().

Referenced by PCB_PROPERTIES_PANEL::valueChanged().

◆ SetBrightened()

◆ SetFlags()

void EDA_ITEM::SetFlags ( EDA_ITEM_FLAGS  aMask)
inlineinherited

Definition at line 139 of file eda_item.h.

139{ m_flags |= aMask; }

References EDA_ITEM::m_flags.

Referenced by SCH_EAGLE_PLUGIN::addBusEntries(), PCB_BASE_FRAME::AddFootprintToBoard(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), SCH_ALTIUM_PLUGIN::AddTextBox(), SCH_MOVE_TOOL::AlignElements(), PCB_CONTROL::AppendBoard(), SCH_EDIT_FRAME::BreakSegment(), SCH_EDIT_TOOL::BreakWire(), FOOTPRINT::BuildCourtyardCaches(), SCH_EDIT_TOOL::ChangeTextType(), GRAPHICS_CLEANER::cleanupShapes(), ConvertOutlineToPolygon(), SCH_EDIT_FRAME::ConvertPart(), SCH_DRAWING_TOOLS::createNewText(), SCH_DRAWING_TOOLS::createSheetPin(), SCH_EDIT_TOOL::DoDelete(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCBNEW_JOBS_HANDLER::doFpExportSvg(), PCB_TOOL_BASE::doInteractiveItemPlacement(), SCH_LINE_WIRE_BUS_TOOL::doUnfoldBus(), EDIT_TOOL::DragArcTrack(), KIGFX::SCH_PAINTER::draw(), DRAWING_TOOL::DrawArc(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawLine(), DRAWING_TOOL::DrawRectangle(), SCH_DRAWING_TOOLS::DrawShape(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), PCB_SELECTION_TOOL::EnterGroup(), PAD_TOOL::explodePad(), SCH_MOVE_TOOL::getConnectedDragItems(), SYMBOL_EDIT_FRAME::GetSymbolFromRedoList(), SYMBOL_EDIT_FRAME::GetSymbolFromUndoList(), EE_COLLECTOR::Inspect(), CONVERT_TOOL::makePolysFromChainedSegs(), CONVERT_TOOL::makePolysFromClosedGraphics(), CONVERT_TOOL::makePolysFromOpenGraphics(), SCH_SCREEN::MarkConnections(), TRACKS_CLEANER::mergeCollinearSegments(), SCH_MOVE_TOOL::moveItem(), SYMBOL_EDITOR_MOVE_TOOL::moveItem(), DIALOG_SYMBOL_PROPERTIES::OnUnitChoice(), KIGFX::ORIGIN_VIEWITEM::ORIGIN_VIEWITEM(), SCH_MOVE_TOOL::orthoLineDrag(), SCH_ALTIUM_PLUGIN::ParseBezier(), SCH_ALTIUM_PLUGIN::ParseBus(), SCH_ALTIUM_PLUGIN::ParseBusEntry(), SCH_ALTIUM_PLUGIN::ParseHarnessPort(), SCH_ALTIUM_PLUGIN::ParseJunction(), SCH_ALTIUM_PLUGIN::ParseLabel(), SCH_ALTIUM_PLUGIN::ParseLine(), SCH_ALTIUM_PLUGIN::ParseNetLabel(), SCH_ALTIUM_PLUGIN::ParseNoERC(), SCH_ALTIUM_PLUGIN::ParsePolygon(), SCH_ALTIUM_PLUGIN::ParsePolyline(), SCH_ALTIUM_PLUGIN::ParsePort(), SCH_ALTIUM_PLUGIN::ParseRectangle(), SCH_ALTIUM_PLUGIN::ParseRoundRectangle(), SCH_ALTIUM_PLUGIN::ParseSheetSymbol(), SCH_ALTIUM_PLUGIN::ParseSignalHarness(), SCH_ALTIUM_PLUGIN::ParseWire(), SCH_EDITOR_CONTROL::Paste(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), BOARD_EDITOR_CONTROL::PlaceFootprint(), PL_DRAWING_TOOLS::PlaceItem(), DRAWING_TOOL::PlaceText(), SCH_SYMBOL::Plot(), BACK_ANNOTATE::processNetNameChange(), SCH_EDIT_FRAME::PutDataInPreviousState(), PCB_SELECTION_TOOL::RebuildSelection(), BOARD::Remove(), FOOTPRINT::Remove(), SCH_EDIT_TOOL::RepeatDrawItem(), SCH_EDIT_TOOL::Rotate(), SYMBOL_EDIT_FRAME::SaveCopyInUndoList(), EE_SELECTION_TOOL::SelectAll(), EE_SELECTION_TOOL::selectMultiple(), SCH_EDIT_FRAME::SelectUnit(), EDA_ITEM::SetBrightened(), EDA_ITEM::SetIsShownAsBitmap(), EDA_ITEM::SetModified(), EDA_ITEM::SetSelected(), SCH_DRAWING_TOOLS::SingleClickPlace(), BOARD_COMMIT::Stage(), SCH_LINE_WIRE_BUS_TOOL::startSegments(), DS_DATA_ITEM::SyncDrawItems(), DS_DATA_ITEM_BITMAP::SyncDrawItems(), DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow(), DIALOG_DIMENSION_PROPERTIES::TransferDataFromWindow(), DIALOG_TARGET_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace().

◆ SetForceVisible()

void EDA_ITEM::SetForceVisible ( bool  aEnable)
inlineinherited

Set and clear 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 199 of file eda_item.h.

199{ m_forceVisible = aEnable; }

References EDA_ITEM::m_forceVisible.

Referenced by SCH_FIND_REPLACE_TOOL::FindNext(), and SCH_FIND_REPLACE_TOOL::UpdateFind().

◆ SetIsShownAsBitmap()

void EDA_ITEM::SetIsShownAsBitmap ( bool  aBitmap)
inlineinherited

Definition at line 165 of file eda_item.h.

166 {
167 if( aBitmap )
169 else
171 }

References EDA_ITEM::ClearFlags(), IS_SHOWN_AS_BITMAP, and EDA_ITEM::SetFlags().

◆ SetLayerParameters()

void GERBER_DRAW_ITEM::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 191 of file gerber_draw_item.cpp.

192{
194 m_swapAxis = m_GerberImageFile->m_SwapAxis; // false if A = X, B = Y;
195
196 // true if A =Y, B = Y
197 m_mirrorA = m_GerberImageFile->m_MirrorA; // true: mirror / axe A
198 m_mirrorB = m_GerberImageFile->m_MirrorB; // true: mirror / axe B
199 m_drawScale = m_GerberImageFile->m_Scale; // A and B scaling factor
200 m_layerOffset = m_GerberImageFile->m_Offset; // Offset from OF command
201
202 // Rotation from RO command:
205}
bool m_SwapAxis
false if A = X and B = Y (default); true if A = Y, B = X
double m_LocalRotation
Local rotation added to m_ImageRotation.
VECTOR2I m_Offset
Coord Offset, from OF command.
bool m_MirrorB
true: mirror / axis B (Y)
bool m_GerbMetric
false = Inches, true = metric
bool m_MirrorA
true: mirror / axis A (X)
VECTOR2I m_Scale
scale (X and Y) of layer.
GERBER_LAYER & GetLayerParams()

References GERBER_FILE_IMAGE::GetLayerParams(), m_drawScale, m_GerberImageFile, GERBER_FILE_IMAGE::m_GerbMetric, m_LayerNegative, GERBER_LAYER::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().

◆ SetLayerPolarity()

void GERBER_DRAW_ITEM::SetLayerPolarity ( bool  aNegative)
inline

Definition at line 106 of file gerber_draw_item.h.

106{ m_LayerNegative = aNegative; }

References m_LayerNegative.

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

◆ SetModified()

◆ SetNetAttributes()

◆ SetParent()

virtual void EDA_ITEM::SetParent ( EDA_ITEM aParent)
inlinevirtualinherited

Reimplemented in LIB_SYMBOL, and PCB_DIMENSION_BASE.

Definition at line 100 of file eda_item.h.

100{ m_parent = aParent; }

References EDA_ITEM::m_parent.

Referenced by BOARD::Add(), FOOTPRINT::Add(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), BOARD_NETLIST_UPDATER::addNewFootprint(), SCH_SHEET::AddPin(), PAD::AddPrimitive(), PAD::AddPrimitiveAnnotationBox(), PAD::AddPrimitiveArc(), PAD::AddPrimitiveCircle(), PAD::AddPrimitiveCurve(), PAD::AddPrimitivePoly(), PAD::AddPrimitiveRect(), PAD::AddPrimitiveSegment(), SYMBOL_EDITOR_CONTROL::AddSymbolToSchematic(), SCH_SCREEN::Append(), LIB_FIELD::Copy(), SYMBOL_EDIT_FRAME::CreateNewSymbol(), SCH_DRAWING_TOOLS::createNewText(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), PCBNEW_JOBS_HANDLER::doFpExportSvg(), SCH_LINE_WIRE_BUS_TOOL::doUnfoldBus(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), PCB_EDIT_FRAME::ExchangeFootprint(), LIB_SYMBOL::Flatten(), FOOTPRINT::FOOTPRINT(), PCB_PLUGIN::FootprintSave(), DISPLAY_FOOTPRINTS_FRAME::GetFootprint(), CADSTAR_SCH_ARCHIVE_LOADER::getKiCadSchText(), LIB_SYMBOL::LIB_SYMBOL(), SCH_LEGACY_PLUGIN_CACHE::loadAliases(), CADSTAR_SCH_ARCHIVE_LOADER::loadChildSheets(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromBoard(), SCH_SEXPR_PLUGIN::loadHierarchy(), SCH_LEGACY_PLUGIN::loadHierarchy(), KI_TEST::LoadHierarchy(), LIB_SYMBOL::operator=(), FOOTPRINT::operator=(), PCB_PARSER::parseFOOTPRINT_unchecked(), SCH_SEXPR_PARSER::ParseSchematic(), SCH_SEXPR_PARSER::ParseSymbol(), SCH_EDITOR_CONTROL::Paste(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), PCB_CONTROL::Paste(), pasteFootprintItemsToFootprintEditor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), BACK_ANNOTATE::processNetNameChange(), BOARD_COMMIT::Push(), SCH_LIB_PLUGIN_CACHE::removeSymbol(), PCB_BASE_EDIT_FRAME::saveCopyInUndoList(), SaveCopyOfZones(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), CLIPBOARD_IO::SaveSelection(), SCH_SHEET_PIN::SCH_SHEET_PIN(), LIB_SYMBOL::SetFields(), PCB_DIMENSION_BASE::SetParent(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_LINE_WIRE_BUS_TOOL::startSegments(), SCH_LABEL_BASE::SwapData(), SCH_SHEET::SwapData(), SCH_SYMBOL::SwapData(), BOARD_ITEM::SwapItemData(), DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow(), and SCH_DRAWING_TOOLS::TwoClickPlace().

◆ SetPosition()

void GERBER_DRAW_ITEM::SetPosition ( const VECTOR2I aPos)
inlineoverridevirtual

Reimplemented from EDA_ITEM.

Definition at line 123 of file gerber_draw_item.h.

123{ m_Start = aPos; }

References m_Start.

◆ SetSelected()

◆ SetState()

void EDA_ITEM::SetState ( EDA_ITEM_FLAGS  type,
bool  state 
)
inlineinherited

Definition at line 128 of file eda_item.h.

129 {
130 if( state )
131 m_status |= type; // state = ON or OFF
132 else
133 m_status &= ~type;
134 }

References EDA_ITEM::m_status.

Referenced by LEGACY_PLUGIN::loadTrackList(), and TRACKS_CLEANER::mergeCollinearSegments().

◆ SetStatus()

void EDA_ITEM::SetStatus ( EDA_ITEM_FLAGS  aStatus)
inlineinherited

Definition at line 137 of file eda_item.h.

137{ m_status = aStatus; }

References EDA_ITEM::m_status.

Referenced by BOARD_NETLIST_UPDATER::UpdateNetlist().

◆ Shape()

int GERBER_DRAW_ITEM::Shape ( ) const
inline

Definition at line 175 of file gerber_draw_item.h.

175{ return m_Shape; }

References m_Shape.

◆ ShowGBRShape()

wxString GERBER_DRAW_ITEM::ShowGBRShape ( ) const

Definition at line 208 of file gerber_draw_item.cpp.

209{
210 switch( m_Shape )
211 {
212 case GBR_SEGMENT: return _( "Line" );
213 case GBR_ARC: return _( "Arc" );
214 case GBR_CIRCLE: return _( "Circle" );
215 case GBR_SPOT_OVAL: return wxT( "spot_oval" );
216 case GBR_SPOT_CIRCLE: return wxT( "spot_circle" );
217 case GBR_SPOT_RECT: return wxT( "spot_rect" );
218 case GBR_SPOT_POLY: return wxT( "spot_poly" );
219 case GBR_POLYGON: return wxT( "polygon" );
220
221 case GBR_SPOT_MACRO:
222 {
223 wxString name = wxT( "apt_macro" );
224 D_CODE* dcode = GetDcodeDescr();
225
226 if( dcode && dcode->GetMacro() )
227 name << wxT(" ") << dcode->GetMacro()->m_AmName;
228
229 return name;
230 }
231
232 default: return wxT( "??" );
233 }
234}
const char * name
Definition: DXF_plotter.cpp:56
wxString m_AmName
The name of the aperture macro as defined like AMVB_RECTANGLE* (name is VB_RECTANGLE)

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(), APERTURE_MACRO::m_AmName, m_Shape, and name.

Referenced by GetItemDescription(), and GetMsgPanelInfo().

◆ Sort()

static bool EDA_ITEM::Sort ( const EDA_ITEM aLeft,
const EDA_ITEM aRight 
)
inlinestaticinherited

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 438 of file eda_item.h.

438{ return *aLeft < *aRight; }

◆ Type()

KICAD_T EDA_ITEM::Type ( ) const
inlineinherited

Returns the type of object.

This attribute should never be changed after a ctor sets it, so there is no public "setter" method.

Returns
the type of object.

Definition at line 97 of file eda_item.h.

97{ return m_structType; }

References EDA_ITEM::m_structType.

Referenced by CN_CONNECTIVITY_ALGO::Add(), BOARD::Add(), FOOTPRINT::Add(), CN_CLUSTER::Add(), KIGFX::PCB_VIEW::Add(), PCB_POINT_EDITOR::addCorner(), PCB_GROUP::AddItem(), CONNECTION_SUBGRAPH::AddItem(), DRC_TEST_PROVIDER_SOLDER_MASK::addItemToRTrees(), SCH_EDIT_FRAME::AddItemToScreenAndUndoList(), ZONE_FILLER::addKnockout(), SCH_SHEET::AddPin(), ALIGN_DISTRIBUTE_TOOL::AlignBottom(), ALIGN_DISTRIBUTE_TOOL::AlignCenterX(), ALIGN_DISTRIBUTE_TOOL::AlignCenterY(), SCH_MOVE_TOOL::AlignElements(), ALIGN_DISTRIBUTE_TOOL::AlignTop(), CN_ITEM::AnchorCount(), SCH_SCREEN::Append(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), PNS::TOPOLOGY::AssembleTuningPath(), SCH_LABEL_BASE::AutoplaceFields(), EE_SELECTION_TOOL::autostartEvent(), DIALOG_NET_INSPECTOR::buildNewItem(), SCH_SCREENS::buildScreenList(), BOARD_INSPECTION_TOOL::calculateSelectionRatsnest(), PCB_POINT_EDITOR::canAddCorner(), SCH_BUS_WIRE_ENTRY::CanConnect(), SCH_BUS_BUS_ENTRY::CanConnect(), SCH_JUNCTION::CanConnect(), SCH_LABEL_BASE::CanConnect(), SCH_LINE::CanConnect(), SCH_NO_CONNECT::CanConnect(), SCH_SHEET::CanConnect(), SCH_SYMBOL::CanConnect(), SCH_EDIT_TOOL::ChangeTextType(), KI_TEST::CheckFootprint(), KI_TEST::CheckFpShape(), KI_TEST::CheckFpZone(), CN_VISITOR::checkZoneItemConnection(), LIB_TEXTBOX::ClassOf(), SCH_BITMAP::ClassOf(), SCH_BUS_WIRE_ENTRY::ClassOf(), SCH_BUS_BUS_ENTRY::ClassOf(), SCH_FIELD::ClassOf(), SCH_JUNCTION::ClassOf(), SCH_LABEL::ClassOf(), SCH_DIRECTIVE_LABEL::ClassOf(), SCH_GLOBALLABEL::ClassOf(), SCH_HIERLABEL::ClassOf(), SCH_LINE::ClassOf(), SCH_MARKER::ClassOf(), SCH_NO_CONNECT::ClassOf(), SCH_PIN::ClassOf(), SCH_SCREEN::ClassOf(), SCH_SHEET::ClassOf(), SCH_SHEET_PIN::ClassOf(), SCH_SYMBOL::ClassOf(), SCH_TEXT::ClassOf(), SCH_TEXTBOX::ClassOf(), PCB_GROUP::ClassOf(), BOARD::ClassOf(), BOARD_CONNECTED_ITEM::ClassOf(), FOOTPRINT::ClassOf(), FP_SHAPE::ClassOf(), FP_TEXT::ClassOf(), FP_TEXTBOX::ClassOf(), NETINFO_ITEM::ClassOf(), PAD::ClassOf(), PCB_BITMAP::ClassOf(), PCB_DIM_ALIGNED::ClassOf(), PCB_DIM_ORTHOGONAL::ClassOf(), PCB_DIM_RADIAL::ClassOf(), PCB_DIM_LEADER::ClassOf(), PCB_DIM_CENTER::ClassOf(), PCB_MARKER::ClassOf(), PCB_SHAPE::ClassOf(), PCB_TARGET::ClassOf(), PCB_TEXT::ClassOf(), PCB_TEXTBOX::ClassOf(), PCB_TRACK::ClassOf(), PCB_ARC::ClassOf(), PCB_VIA::ClassOf(), ZONE::ClassOf(), CONNECTION_GRAPH::collectAllDriverValues(), collidesWithArea(), LIB_ITEM::compare(), LIB_FIELD::compare(), LIB_PIN::compare(), LIB_TEXT::compare(), LIB_TEXTBOX::compare(), LIB_SYMBOL::Compare(), PCB_GRID_HELPER::computeAnchors(), EE_GRID_HELPER::computeAnchors(), TEARDROP_MANAGER::ComputePointsOnPadVia(), SCH_BUS_WIRE_ENTRY::ConnectionPropagatesTo(), SCH_LINE::ConnectionPropagatesTo(), EE_RTREE::contains(), BOARD::ConvertKIIDsToCrossReferences(), SCHEMATIC::ConvertKIIDsToRefs(), PAD_TOOL::copyPadSettings(), FOOTPRINT::CoverageRatio(), BOARD_ADAPTER::createLayers(), PCB_BASE_FRAME::CreateNewFootprint(), SCH_DRAWING_TOOLS::createNewText(), ZONE_CREATE_HELPER::createNewZone(), BOARD_ADAPTER::createTrack(), DRC_TOOL::CrossProbe(), SCH_SCREEN::DeleteItem(), DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES(), DIALOG_LABEL_PROPERTIES::DIALOG_LABEL_PROPERTIES(), DIALOG_SCH_FIELD_PROPERTIES::DIALOG_SCH_FIELD_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TEXTBOX_PROPERTIES::DIALOG_TEXTBOX_PROPERTIES(), BOARD_COMMIT::dirtyIntersectingZones(), ALIGN_DISTRIBUTE_TOOL::doAlignLeft(), ALIGN_DISTRIBUTE_TOOL::doAlignRight(), SCH_EDITOR_CONTROL::doCopy(), SCH_EDIT_TOOL::DoDelete(), ALIGN_DISTRIBUTE_TOOL::doDistributeCentersHorizontally(), ALIGN_DISTRIBUTE_TOOL::doDistributeCentersVertically(), ALIGN_DISTRIBUTE_TOOL::doDistributeGapsHorizontally(), ALIGN_DISTRIBUTE_TOOL::doDistributeGapsVertically(), APPEARANCE_CONTROLS::doesBoardItemNeedRebuild(), DIALOG_GLOBAL_DELETION::DoGlobalDeletions(), EDIT_TOOL::doMoveSelection(), EDIT_TOOL::DragArcTrack(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::Draw(), DRAWING_TOOL::DrawDimension(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawVia(), CONNECTION_SUBGRAPH::driverName(), CN_ITEM::Dump(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), EDIT_TOOL::Duplicate(), FOOTPRINT::DuplicateItem(), EDA_ITEM_DESC::EDA_ITEM_DESC(), SCH_EDIT_TOOL::EditField(), SCH_EDIT_TOOL::editFieldText(), SYMBOL_EDITOR_EDIT_TOOL::editTextBoxProperties(), SYMBOL_EDITOR_EDIT_TOOL::editTextProperties(), CONNECTION_GRAPH::ercCheckBusToBusConflicts(), CONNECTION_GRAPH::ercCheckBusToBusEntryConflicts(), CONNECTION_GRAPH::ercCheckBusToNetConflicts(), CONNECTION_GRAPH::ercCheckFloatingWires(), CONNECTION_GRAPH::ercCheckLabels(), CONNECTION_GRAPH::ercCheckMultipleDrivers(), CONNECTION_GRAPH::ercCheckNoConnects(), DRC_ENGINE::EvalRules(), DRC_ENGINE::EvalZoneConnection(), EDIT_TOOL::FilletTracks(), PCB_SELECTION_TOOL::FilterCollectorForFreePads(), PCB_SELECTION_TOOL::FilterCollectorForHierarchy(), PCB_SELECTION_TOOL::FilterCollectorForMarkers(), PCB_SELECTION_TOOL::FindItem(), NETLIST_EXPORTER_BASE::findNextSymbol(), CADSTAR_ARCHIVE_PARSER::FixTextPositionNoAlignment(), PCB_BASE_FRAME::FocusOnItems(), EDIT_TOOL::FootprintFilter(), PCB_PLUGIN::Format(), PCB_PLUGIN::format(), SCH_SEXPR_PLUGIN::Format(), SCH_LEGACY_PLUGIN::Format(), FormatProbeItem(), FP_TEXT::FP_TEXT(), PCB_POINT_EDITOR::get45DegConstrainer(), CN_ITEM::GetAnchor(), BOARD_ITEM::GetBoard(), SCH_FIELD::GetBoundingBox(), SCH_LABEL_BASE::GetBoundingBox(), PCB_TRACK::GetBoundingBox(), SCH_FIELD::GetCanonicalName(), getClosestGroup(), KIGFX::GERBVIEW_RENDER_SETTINGS::GetColor(), KIGFX::DS_RENDER_SETTINGS::GetColor(), KIGFX::PCB_RENDER_SETTINGS::GetColor(), SCH_MOVE_TOOL::getConnectedDragItems(), SCH_MOVE_TOOL::getConnectedItems(), FOOTPRINT::GetCoverageArea(), CONNECTION_GRAPH::getDefaultConnection(), SCH_FIELD::GetDrawRotation(), getDrilledHoleShape(), CONNECTION_SUBGRAPH::GetDriverPriority(), getFieldFunc(), PCB_TRACK::GetFriendlyName(), getInferredSymbols(), PCB_TRACK::GetItemDescription(), PL_EDITOR_FRAME::GetLayoutFromRedoList(), PL_EDITOR_FRAME::GetLayoutFromUndoList(), SCH_FIELD::GetMenuImage(), getMinDist(), SCH_LABEL_BASE::GetMsgPanelInfo(), PCB_DIMENSION_BASE::GetMsgPanelInfo(), PCB_TRACK::GetMsgPanelInfo(), SCH_FIELD::GetName(), SCH_SCREEN::GetNeededJunctions(), CONNECTION_SUBGRAPH::GetNetclassForDriver(), CONNECTIVITY_DATA::GetNetItems(), BOARD_ITEM::GetParentFootprint(), SCH_SYMBOL::GetPinPhysicalPosition(), SCH_FIELD::GetPosition(), KIGFX::SCH_PAINTER::getRenderColor(), ALIGN_DISTRIBUTE_TOOL::GetSelections(), SCH_FIELD::GetShownText(), CONVERT_TOOL::getStartEndPoints(), KIGFX::SCH_PAINTER::getTextThickness(), EDA_ITEM::GetTypeDesc(), PCB_EXPR_TYPE_REF::GetValue(), PCB_SELECTION_TOOL::grabUnconnected(), GROUP_TOOL::Group(), PCB_SELECTION_TOOL::GuessSelectionCandidates(), hasDrilledHole(), hash_fp_item(), EE_SELECTION_TOOL::highlight(), PCB_SELECTION_TOOL::highlightInternal(), BOARD_INSPECTION_TOOL::HighlightItem(), BOARD_INSPECTION_TOOL::highlightNet(), highlightNet(), SCH_FIELD::HitTest(), SCH_LABEL_BASE::HitTest(), PCB_SELECTION_TOOL::hitTestDistance(), SCH_EDIT_TOOL::Init(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), DRC_RTREE::Insert(), EE_RTREE::insert(), EE_COLLECTOR::Inspect(), GENERAL_COLLECTOR::Inspect(), BOARD_INSPECTION_TOOL::InspectClearance(), BOARD_INSPECTION_TOOL::InspectConstraints(), BOARD_INSPECTION_TOOL::InspectDRCError(), ARRAY_CREATOR::Invoke(), CONNECTIVITY_DATA::IsConnectedOnLayer(), isCopper(), SCH_LINE_WIRE_BUS_TOOL::IsDrawingLineWireOrBus(), PNS_KICAD_IFACE_BASE::IsFlashedOnLayer(), CADSTAR_PCB_ARCHIVE_LOADER::isFootprint(), SCH_FIELD::IsHypertext(), isKeepoutZone(), isMaskAperture(), isNPTHPad(), PCB_TRACK::IsNull(), isNullAperture(), SCH_LINE::IsParallel(), isPlatedFunc(), SCH_FIELD::IsReplaceable(), PNS::ROUTER::isStartingPointRoutable(), SCH_ITEM::IsType(), itemIsIncludedByFilter(), PCB_SELECTION_TOOL::itemPassesFilter(), CLIPBOARD_IO::Load(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromBoard(), CADSTAR_SCH_ARCHIVE_LOADER::loadHierarchicalSheetPins(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), EE_SELECTION_TOOL::Main(), SCH_MOVE_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), EDIT_POINTS_FACTORY::Make(), NETLIST_EXPORTER_XML::makeListOfNets(), PCB_POINT_EDITOR::makePoints(), CONVERT_TOOL::makePolysFromChainedSegs(), SCH_SCREEN::MarkConnections(), CONNECTIVITY_DATA::MarkItemNetAsDirty(), CN_CONNECTIVITY_ALGO::markItemNetAsDirty(), SCH_FIELD::Matches(), memberOfFunc(), SCH_LINE::MergeOverlap(), SCH_EDIT_TOOL::Mirror(), EDIT_TOOL::MoveExact(), SCH_MOVE_TOOL::moveItem(), DIALOG_DRC::OnDRCItemSelected(), FOOTPRINT_EDIT_FRAME::OnEditItemRequest(), PCB_EDIT_FRAME::OnEditItemRequest(), EDA_3D_CANVAS::OnMouseMove(), CN_VISITOR::operator()(), BOARD_ITEM::ptr_cmp::operator()(), BOARD::cmp_items::operator()(), BOARD::cmp_drawings::operator()(), PCB_SHAPE::cmp_drawings::operator()(), FOOTPRINT::cmp_drawings::operator()(), KI_TEST::kitest_cmp_drawings::operator()(), PCB_TRACK::cmp_tracks::operator()(), LIB_ITEM::operator<(), SCH_ITEM::operator<(), SCH_BUS_ENTRY_BASE::operator<(), SCH_FIELD::operator<(), SCH_JUNCTION::operator<(), SCH_LINE::operator<(), SCH_SHEET::operator<(), SCH_SYMBOL::operator<(), SCH_TEXT::operator<(), SCH_TEXTBOX::operator<(), PCB_BITMAP::operator=(), SCH_BITMAP::operator=(), SCH_SYMBOL::operator=(), SCH_SHEET::operator=(), LIB_ITEM::operator==(), PAD::PAD(), EDIT_TOOL::PadFilter(), BOARD_COMMIT::parentObject(), SCH_SEXPR_PARSER::parseSchField(), SCH_EDITOR_CONTROL::Paste(), PCB_CONTROL::Paste(), DRAWING_TOOL::PlaceImportedGraphics(), SCH_FIELD::Plot(), SCH_LABEL_BASE::Plot(), BRDITEMS_PLOTTER::PlotPcbGraphicItem(), SCH_FIELD::Print(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::processItem(), BACK_ANNOTATE::processNetNameChange(), CONNECTION_GRAPH::processSubGraphs(), SCH_EDIT_TOOL::Properties(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), BOARD_COMMIT::Push(), PCB_BASE_EDIT_FRAME::PutDataInPreviousState(), PCB_GRID_HELPER::queryVisible(), BOARD_REANNOTATE_TOOL::ReannotateDuplicates(), SCH_CONNECTION::recacheName(), SCH_BASE_FRAME::RefreshZoomDependentItems(), BOARD::Remove(), CN_CONNECTIVITY_ALGO::Remove(), FOOTPRINT::Remove(), EE_RTREE::remove(), SCH_SCREEN::Remove(), KIGFX::PCB_VIEW::Remove(), PCB_POINT_EDITOR::removeCorner(), PCB_POINT_EDITOR::removeCornerCondition(), LIB_SYMBOL::RemoveDrawItem(), SCH_SHEET::RemovePin(), SCH_EDIT_TOOL::RepeatDrawItem(), SCH_FIELD::Replace(), SCH_FIND_REPLACE_TOOL::ReplaceAll(), PCB_SELECTION_TOOL::RequestSelection(), CONNECTION_GRAPH::resolveAllDrivers(), SCHEMATIC::ResolveCrossReference(), PCB_PARSER::resolveGroups(), SCH_LABEL_BASE::ResolveTextVar(), BOARD::ResolveTextVar(), DS_PROXY_UNDO_ITEM::Restore(), BOARD_COMMIT::Revert(), PL_EDITOR_FRAME::RollbackFromUndo(), SCH_EDIT_TOOL::Rotate(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::Run(), DRC_TEST_PROVIDER_TEXT_DIMS::Run(), DRC_TEST_PROVIDER_MATCHED_LENGTH::runInternal(), EE_TOOL_BASE< T >::saveCopyInUndoList(), PCB_BASE_EDIT_FRAME::saveCopyInUndoList(), SCH_LEGACY_PLUGIN_CACHE::saveField(), SCH_SEXPR_PLUGIN_CACHE::saveField(), SCH_LEGACY_PLUGIN_CACHE::savePin(), SCH_SEXPR_PLUGIN_CACHE::savePin(), CLIPBOARD_IO::SaveSelection(), SCH_SEXPR_PLUGIN_CACHE::saveSymbolDrawItem(), SCH_LEGACY_PLUGIN_CACHE::saveText(), SCH_SEXPR_PLUGIN_CACHE::saveText(), SCH_SEXPR_PLUGIN::saveText(), SCH_SEXPR_PLUGIN_CACHE::saveTextBox(), SCH_ITEM::Schematic(), SCH_SCREEN::Schematic(), PCB_SELECTION_TOOL::select(), PCB_SELECTION_TOOL::Selectable(), EE_SELECTION_TOOL::Selectable(), PCB_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectSameSheet(), PCB_SELECTION_TOOL::selectUnconnected(), PCB_EDIT_FRAME::SetActiveLayer(), PCB_POINT_EDITOR::setAltConstraint(), SCH_FIELD::SetId(), ITEM_PICKER::SetItem(), SCH_FIELD::SetPosition(), PCB_EDIT_FRAME::SetTrackSegmentWidth(), PCB_EDIT_FRAME::ShowFindDialog(), SCH_EDIT_FRAME::ShowFindReplaceDialog(), BOARD_COMMIT::Stage(), PNS::LINE_PLACER::Start(), SCH_EDIT_TOOL::Swap(), PCB_GROUP::swapData(), FOOTPRINT::swapData(), PAD::swapData(), PCB_DIM_ALIGNED::swapData(), PCB_DIM_ORTHOGONAL::swapData(), PCB_DIM_RADIAL::swapData(), PCB_DIM_LEADER::swapData(), PCB_DIM_CENTER::swapData(), PCB_TARGET::swapData(), PCB_TEXT::swapData(), PCB_TEXTBOX::swapData(), PCB_TRACK::swapData(), PCB_ARC::swapData(), PCB_VIA::swapData(), ZONE::swapData(), PCB_BITMAP::swapData(), SCH_BITMAP::SwapData(), SCH_FIELD::SwapData(), SCH_JUNCTION::SwapData(), SCH_NO_CONNECT::SwapData(), SCH_SHEET::SwapData(), SCH_SHEET_PIN::SwapData(), SCH_SYMBOL::SwapData(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::testAgainstEdge(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstItem(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testItemAgainstZone(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstZones(), DRC_TEST_PROVIDER_SOLDER_MASK::testMaskItemAgainstZones(), ERC_TESTER::TestMultUnitPinConflicts(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem(), ERC_TESTER::TestPinToPin(), ERC_TESTER::TestSimilarLabels(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackAgainstItem(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackClearances(), CONNECTIVITY_DATA::TestTrackEndpointDangling(), DIALOG_LABEL_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LABEL_PROPERTIES::TransferDataToWindow(), DIALOG_SYMBOL_FIELDS_TABLE::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataToWindow(), PCB_TRACK::TransformShapeToPolygon(), SCH_LINE_WIRE_BUS_TOOL::TrimOverLappingWires(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), EE_SELECTION_TOOL::unhighlight(), PCB_SELECTION_TOOL::unhighlightInternal(), KIGFX::PCB_VIEW::Update(), SCH_SHEET_PATH::UpdateAllScreenReferences(), DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog(), DIALOG_SCH_FIELD_PROPERTIES::UpdateField(), PL_POINT_EDITOR::updateItem(), PCB_POINT_EDITOR::updateItem(), EE_TOOL_BASE< T >::updateItem(), SCH_BASE_FRAME::UpdateItem(), PCB_CONTROL::UpdateMessagePanel(), SCH_EDITOR_CONTROL::UpdateNetHighlighting(), EE_POINT_EDITOR::updateParentItem(), SCH_EDITOR_CONTROL::updatePastedSheet(), EE_POINT_EDITOR::updatePoints(), PL_POINT_EDITOR::updatePoints(), PCB_POINT_EDITOR::updatePoints(), SCH_BUS_ENTRY_BASE::ViewGetLayers(), PCB_GROUP::Visit(), SCH_SHEET::Visit(), Visit(), PCB_TRACK::Visit(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::visitItem(), and NETLIST_EXPORTER_CADSTAR::writeListOfNets().

◆ ViewBBox()

const BOX2I GERBER_DRAW_ITEM::ViewBBox ( ) const
overridevirtual

Reimplemented from EDA_ITEM.

Definition at line 927 of file gerber_draw_item.cpp.

928{
929 return GetBoundingBox();
930}

References GetBoundingBox().

Referenced by KIGFX::GERBVIEW_PAINTER::draw().

◆ ViewDraw()

virtual void KIGFX::VIEW_ITEM::ViewDraw ( int  aLayer,
VIEW aView 
) const
inlinevirtualinherited

Draw the parts of the object belonging to layer aLayer.

An alternative way for drawing objects 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
aLayeris the current drawing layer.
aViewis a pointer to the VIEW device we are drawing on.

Reimplemented in DS_PROXY_VIEW_ITEM, KIGFX::PREVIEW::SIMPLE_OVERLAY_ITEM, EDIT_POINTS, RATSNEST_VIEW_ITEM, ROUTER_PREVIEW_ITEM, MY_DRAWING, KIGFX::PREVIEW::ARC_ASSISTANT, KIGFX::PREVIEW::RULER_ITEM, KIGFX::PREVIEW::SELECTION_AREA, KIGFX::PREVIEW::TWO_POINT_ASSISTANT, KIGFX::ORIGIN_VIEWITEM, KIGFX::VIEW_GROUP, and KIGFX::VIEW_OVERLAY.

Definition at line 106 of file view_item.h.

107 {}

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

◆ ViewGetLayers()

void GERBER_DRAW_ITEM::ViewGetLayers ( int  aLayers[],
int &  aCount 
) const
overridevirtual

Reimplemented from EDA_ITEM.

Definition at line 918 of file gerber_draw_item.cpp.

919{
920 aCount = 2;
921
922 aLayers[0] = GERBER_DRAW_LAYER( GetLayer() );
923 aLayers[1] = GERBER_DCODE_LAYER( aLayers[0] );
924}
#define GERBER_DCODE_LAYER(x)
Definition: layer_ids.h:425
#define GERBER_DRAW_LAYER(x)
Definition: layer_ids.h:423

References GERBER_DCODE_LAYER, GERBER_DRAW_LAYER, and GetLayer().

◆ ViewGetLOD()

double GERBER_DRAW_ITEM::ViewGetLOD ( int  aLayer,
KIGFX::VIEW aView 
) const
overridevirtual

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 aScanTypes, 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.
aScanTypesWhich KICAD_T types are of interest and the order in which they should be processed.
Returns
#SEARCH_RESULT SEARCH_QUIT if the Iterator is to stop the scan, else #SCAN_CONTINUE, and determined by the inspector.

Reimplemented from KIGFX::VIEW_ITEM.

Definition at line 933 of file gerber_draw_item.cpp.

934{
935 // DCodes will be shown only if zoom is appropriate:
936 // Returns the level of detail of the item.
937 // A level of detail (LOD) is the minimal VIEW scale that
938 // is sufficient for an item to be shown on a given layer.
939 if( IsDCodeLayer( aLayer ) )
940 {
941 int size = 0;
942
943 switch( m_Shape )
944 {
945 case GBR_SPOT_MACRO:
946 size = GetDcodeDescr()->m_Polygon.BBox().GetWidth();
947 break;
948
949 case GBR_ARC:
951 break;
952
953 default:
954 size = m_Size.x;
955 }
956
957 // the level of details is chosen experimentally, to show
958 // only a readable text:
959 double level = (double) gerbIUScale.mmToIU( 3 );
960 return level / ( size + 1 );
961 }
962
963 // Other layers are shown without any conditions
964 return 0.0;
965}
bool IsDCodeLayer(int aLayer)
Definition: layer_ids.h:1001

References SHAPE_POLY_SET::BBox(), GBR_ARC, GBR_SPOT_MACRO, gerbIUScale, GetDcodeDescr(), GetLineLength(), BOX2< Vec >::GetWidth(), IsDCodeLayer(), m_ArcCentre, D_CODE::m_Polygon, m_Shape, m_Size, m_Start, and EDA_IU_SCALE::mmToIU().

◆ viewPrivData()

◆ Visit()

INSPECT_RESULT GERBER_DRAW_ITEM::Visit ( INSPECTOR  inspector,
void *  testData,
const std::vector< KICAD_T > &  aScanTypes 
)
overridevirtual

Return a user-visible description string of this item.

This description is used in disambiguation menus, the message panel, ERC/DRC reports, etc.

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 from EDA_ITEM.

Definition at line 968 of file gerber_draw_item.cpp.

970{
971 for( KICAD_T scanType : aScanTypes )
972 {
973 if( scanType == Type() )
974 {
975 if( INSPECT_RESULT::QUIT == inspector( this, testData ) )
977 }
978 }
979
981}

References CONTINUE, QUIT, and EDA_ITEM::Type().

◆ XorFlags()

void EDA_ITEM::XorFlags ( EDA_ITEM_FLAGS  aMask)
inlineinherited

Definition at line 140 of file eda_item.h.

140{ m_flags ^= aMask; }

References EDA_ITEM::m_flags.

Referenced by EE_SELECTION_TOOL::selectMultiple().

Member Data Documentation

◆ m_AbsolutePolygon

SHAPE_POLY_SET GERBER_DRAW_ITEM::m_AbsolutePolygon

Definition at line 261 of file gerber_draw_item.h.

Referenced by KIGFX::GERBVIEW_PAINTER::draw().

◆ m_AperFunction

wxString GERBER_DRAW_ITEM::m_AperFunction

◆ m_ArcCentre

◆ m_DCode

◆ m_drawScale

VECTOR2I GERBER_DRAW_ITEM::m_drawScale
private

◆ m_End

◆ m_flags

◆ m_Flashed

◆ m_forceVisible

bool EDA_ITEM::m_forceVisible
protectedinherited

◆ m_GerberImageFile

◆ m_LayerNegative

bool GERBER_DRAW_ITEM::m_LayerNegative
private

◆ m_layerOffset

VECTOR2I GERBER_DRAW_ITEM::m_layerOffset
private

Definition at line 272 of file gerber_draw_item.h.

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

◆ m_lyrRotation

double GERBER_DRAW_ITEM::m_lyrRotation
private

◆ m_mirrorA

bool GERBER_DRAW_ITEM::m_mirrorA
private

◆ m_mirrorB

bool GERBER_DRAW_ITEM::m_mirrorB
private

◆ m_netAttributes

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 274 of file gerber_draw_item.h.

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

◆ m_parent

◆ m_Polygon

◆ m_Shape

◆ m_Size

◆ m_Start

◆ m_status

◆ m_structType

KICAD_T EDA_ITEM::m_structType
privateinherited

Run time identification, keep private so it can never be changed after a ctor sets it.

See comment near SetType() regarding virtual functions.

Definition at line 505 of file eda_item.h.

Referenced by EDA_ITEM::IsType(), EDA_ITEM::operator=(), and EDA_ITEM::Type().

◆ m_swapAxis

bool GERBER_DRAW_ITEM::m_swapAxis
private

◆ m_UnitsMetric

bool GERBER_DRAW_ITEM::m_UnitsMetric

Definition at line 231 of file gerber_draw_item.h.

Referenced by GERBER_DRAW_ITEM(), and SetLayerParameters().

◆ m_Uuid

const KIID EDA_ITEM::m_Uuid
inherited

Definition at line 492 of file eda_item.h.

Referenced by FIELDS_EDITOR_GRID_DATA_MODEL::AddColumn(), SCH_SYMBOL::AddHierarchicalReference(), SCH_SHEET::addInstance(), RC_ITEM::AddItem(), SCH_EDIT_FRAME::AnnotateSymbols(), FIELDS_EDITOR_GRID_DATA_MODEL::ApplyData(), SCH_SHEET_PATH::Cmp(), SCHEMATIC::ConvertRefsToKIIDs(), MICROWAVE_TOOL::createMicrowaveInductor(), SCH_EDIT_FRAME::CreateScreens(), ZONE_FILLER_TOOL::DirtyZone(), DRAWING_TOOL::DrawVia(), LIB_SYMBOL::Duplicate(), BOARD_ITEM::Duplicate(), FOOTPRINT::Duplicate(), SCH_ITEM::Duplicate(), FOOTPRINT::DuplicateItem(), PCB_EDIT_FRAME::ExchangeFootprint(), PAD_TOOL::explodePad(), SCH_SHEET_LIST::FillItemMap(), BOARD::FillItemMap(), SCH_EDITOR_CONTROL::FindSymbolAndItem(), SCH_EDIT_FRAME::FocusOnItem(), PCB_PLUGIN::format(), SCH_SEXPR_PLUGIN::Format(), SCH_PIN::GetDefaultNetName(), SCH_SHEET_PATH::GetItem(), BOARD::GetItem(), PAD::GetMsgPanelInfo(), DIALOG_BOARD_REANNOTATE::GetNewRefDes(), SCH_SHEET::getPageNumber(), FP_SHAPE::GetParentAsString(), FP_TEXT::GetParentAsString(), FP_TEXTBOX::GetParentAsString(), PAD::GetParentAsString(), SCH_MARKER::GetUUID(), PCB_MARKER::GetUUID(), FIELDS_EDITOR_GRID_DATA_MODEL::GetValue(), FIELDS_EDITOR_GRID_DATA_MODEL::groupMatch(), ZONE::HigherPriority(), SCH_SHEET_PATH::IsContainedWithin(), SCH_ALTIUM_PLUGIN::Load(), SCH_EAGLE_PLUGIN::Load(), LEGACY_PLUGIN::loadFOOTPRINT(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromBoard(), PCB_EDIT_FRAME::LoadFootprints(), SCH_LEGACY_PLUGIN::loadHierarchy(), LEGACY_PLUGIN::loadPCB_TARGET(), LEGACY_PLUGIN::loadPCB_TEXT(), SCH_EDIT_FRAME::LoadSheetFromFile(), SYMBOL_EDIT_FRAME::LoadSymbolFromSchematic(), LEGACY_PLUGIN::loadTrackList(), PNS::LOGGER::Log(), NETLIST_EXPORTER_XML::makeSymbols(), SCH_EDIT_FRAME::mapExistingAnnotation(), BOARD_ITEM::ptr_cmp::operator()(), BOARD::cmp_items::operator()(), BOARD::cmp_drawings::operator()(), PCB_SHAPE::cmp_drawings::operator()(), FOOTPRINT::cmp_drawings::operator()(), FOOTPRINT::cmp_zones::operator()(), FOOTPRINT::cmp_pads::operator()(), PCB_TRACK::cmp_tracks::operator()(), SCH_ITEM::operator<(), SCH_SYMBOL::operator<(), PAD::PAD(), SCH_SEXPR_PARSER::ParseSchematic(), SCH_EDITOR_CONTROL::Paste(), SCH_SHEET_PATH::PathAsString(), PCB_VIA::PCB_VIA(), SCH_EDIT_FRAME::RecalculateConnections(), FIELDS_EDITOR_GRID_DATA_MODEL::RemoveColumn(), SCH_SYMBOL::RemoveInstance(), SCH_SCREENS::ReplaceDuplicateTimeStamps(), SCH_SYMBOL::ReplaceInstanceSheetPath(), PCB_PARSER::resolveGroups(), SCH_SEXPR_PLUGIN::saveBitmap(), SCH_SEXPR_PLUGIN::saveBusEntry(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), SCH_SEXPR_PLUGIN::saveJunction(), SCH_SEXPR_PLUGIN::saveLine(), SCH_SEXPR_PLUGIN::saveNoConnect(), SCH_EDIT_FRAME::SaveProject(), SCH_SEXPR_PLUGIN::saveShape(), SCH_LEGACY_PLUGIN::saveSheet(), SCH_SEXPR_PLUGIN::saveSheet(), SCH_LEGACY_PLUGIN::saveSymbol(), SCH_SEXPR_PLUGIN::saveSymbol(), SCH_SEXPR_PLUGIN::saveText(), SCH_SEXPR_PLUGIN::saveTextBox(), SCH_REFERENCE::SCH_REFERENCE(), SCH_SHEET::SCH_SHEET(), SCH_SYMBOL::SCH_SYMBOL(), RC_ITEM::SetItems(), SCH_SHEET::setPageNumber(), FIELDS_EDITOR_GRID_DATA_MODEL::SetValue(), SCH_DRAWING_TOOLS::SingleClickPlace(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::testAgainstEdge(), testGroupEqual(), DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow(), SCH_EDITOR_CONTROL::updatePastedSheet(), SCH_SHEET_LIST::UpdateSymbolInstanceData(), and NETLIST_EXPORTER_ORCADPCB2::WriteNetlist().

◆ m_viewPrivData

VIEW_ITEM_DATA* KIGFX::VIEW_ITEM::m_viewPrivData
privateinherited

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