185 if( (
unsigned)ndx < (
unsigned)
GetCount() )
227 static const std::vector<KICAD_T>
Zones;
253 static const std::vector<KICAD_T>
Tracks;
339#if defined(USE_MATCH_LAYER)
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
BASE_SET & set(size_t pos)
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
An abstract base class whose derivatives may be passed to a GENERAL_COLLECTOR telling it what should ...
virtual bool IgnoreThroughVias() const =0
virtual bool IsLayerVisible(PCB_LAYER_ID layer) const =0
virtual bool IgnoreFPTextOnFront() const =0
virtual double OnePixelInIU() const =0
virtual bool IgnoreFPTextOnBack() const =0
virtual bool IgnoreLockedItems() const =0
virtual bool IgnoreZoneFills() const =0
virtual bool IgnoreMicroVias() const =0
virtual bool IgnoreFootprintsOnBack() const =0
virtual bool IgnoreBlindBuriedVias() const =0
virtual int Accuracy() const =0
virtual bool IgnoreThroughHolePads() const =0
virtual bool IgnorePadsOnBack() const =0
virtual bool IgnoreFPReferences() const =0
virtual bool IgnorePadsOnFront() const =0
virtual bool IgnoreFootprintsOnFront() const =0
virtual bool IgnorePads() const
virtual bool IgnoreTracks() const =0
virtual bool IncludeSecondary() const =0
Determine if the secondary criteria or 2nd choice items should be included.
virtual bool IgnoreFPValues() const =0
virtual ~COLLECTORS_GUIDE()
virtual PCB_LAYER_ID GetPreferredLayer() const =0
An abstract class that will find and hold all the objects according to an inspection done by the Insp...
int GetCount() const
Return the number of objects in the list.
void SetScanTypes(const std::vector< KICAD_T > &aTypes)
Record the list of KICAD_T types to consider for collection by the Inspect() function.
std::vector< EDA_ITEM * > m_list
A base class for most all the KiCad significant classes used in schematics and boards.
A general implementation of a COLLECTORS_GUIDE.
void SetIgnoreBlindBuriedVias(bool ignore)
void SetIgnoreTracks(bool ignore)
bool m_ignoreFPReferences
bool IgnoreFootprintsOnBack() const override
bool m_ignoreFPTextOnBack
void SetIgnoreFootprintsOnFront(bool ignore)
bool IgnorePadsOnFront() const override
void SetIgnoreFPTextOnFront(bool ignore)
bool IgnoreLockedItems() const override
void SetIgnoreMicroVias(bool ignore)
LSET m_visibleLayers
bit-mapped layer visible bits
void SetIgnoreZoneFills(bool ignore)
int Accuracy() const override
bool IgnoreTracks() const override
GENERAL_COLLECTORS_GUIDE(LSET aVisibleLayerMask, PCB_LAYER_ID aPreferredLayer, KIGFX::VIEW *aView)
Grab stuff from global preferences and uses reasonable defaults.
double OnePixelInIU() const override
bool IncludeSecondary() const override
Determine if the secondary criteria, or 2nd choice items should be included.
bool IgnoreFPTextOnBack() const override
bool m_ignoreBlindBuriedVias
void SetIgnorePadsOnBack(bool ignore)
void SetLayerVisible(PCB_LAYER_ID aLayerId, bool isVisible)
void SetIgnoreLockedItems(bool ignore)
bool IgnoreBlindBuriedVias() const override
void SetIgnoreFPTextOnBack(bool ignore)
bool IgnoreFPValues() const override
bool m_ignoreFootprintsOnBack
bool IgnoreFootprintsOnFront() const override
void SetPreferredLayer(PCB_LAYER_ID aLayer)
bool IgnoreThroughVias() const override
void SetIgnoreThroughVias(bool ignore)
void SetIgnoreThroughHolePads(bool ignore)
void SetIncludeSecondary(bool include)
void SetLayerVisibleBits(LSET aLayerBits)
bool m_ignoreThroughHolePads
bool IsLayerVisible(PCB_LAYER_ID aLayerId) const override
void SetIgnoreFPReferences(bool ignore)
bool IgnoreThroughHolePads() const override
bool m_ignoreFootprintsOnFront
bool IgnoreMicroVias() const override
void SetIgnoreFPValues(bool ignore)
bool m_ignoreFPTextOnFront
bool IgnoreZoneFills() const override
void SetIgnorePadsOnFront(bool ignore)
void SetIgnoreFootprintsOnBack(bool ignore)
bool IgnoreFPTextOnFront() const override
bool IgnorePadsOnBack() const override
void SetAccuracy(int aValue)
PCB_LAYER_ID m_preferredLayer
PCB_LAYER_ID GetPreferredLayer() const override
bool IgnoreFPReferences() const override
Used when the right click button is pressed, or when the select tool is in effect.
static const std::vector< KICAD_T > BoardLevelItems
A scan list for all primary board items, omitting items which are subordinate to a FOOTPRINT,...
void SetGuide(const COLLECTORS_GUIDE *aGuide)
Record which COLLECTORS_GUIDE to use.
static const std::vector< KICAD_T > PadsOrTracks
A scan list for PADs, TRACKs, or VIAs.
void Append2nd(EDA_ITEM *item)
INSPECT_RESULT Inspect(EDA_ITEM *aTestItem, void *aTestData) override
The examining function within the INSPECTOR which is passed to the Iterate function.
const COLLECTORS_GUIDE * GetGuide() const
static const std::vector< KICAD_T > Zones
A scan list for zones outlines only.
std::vector< EDA_ITEM * > m_List2nd
A place to hold collected objects which don't match precisely the search criteria,...
static const std::vector< KICAD_T > Footprints
A scan list for only FOOTPRINTs.
static const std::vector< KICAD_T > AllBoardItems
A scan list for all editable board items.
static const std::vector< KICAD_T > Tracks
A scan list for only TRACKs and ARCs.
void Collect(BOARD_ITEM *aItem, const std::vector< KICAD_T > &aScanList, const VECTOR2I &aRefPos, const COLLECTORS_GUIDE &aGuide)
Scan a BOARD_ITEM using this class's Inspector method, which does the collection.
static const std::vector< KICAD_T > Dimensions
A scan list for dimensions.
static const std::vector< KICAD_T > FootprintItems
A scan list for primary footprint items.
const COLLECTORS_GUIDE * m_Guide
Determine which items are to be collected by Inspect().
static const std::vector< KICAD_T > DraggableItems
A scan list for items that can be dragged.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
VECTOR2D ToWorld(const VECTOR2D &aCoord, bool aAbsolute=true) const
Converts a screen space point/vector to a point/vector in world space coordinates.
LSET is a set of PCB_LAYER_IDs.
Collect BOARD_ITEM objects.
BOARD_ITEM * operator[](int ndx) const override
Overload the COLLECTOR::operator[](int) to return a BOARD_ITEM instead of an EDA_ITEM.
Collect all BOARD_ITEM objects on a given layer.
void Collect(BOARD_ITEM *aBoard, const std::vector< KICAD_T > &aTypes)
Test a BOARD_ITEM using this class's Inspector method, which does the collection.
INSPECT_RESULT Inspect(EDA_ITEM *testItem, void *testData) override
The examining function within the INSPECTOR which is passed to the iterate function.
PCB_LAYER_COLLECTOR(PCB_LAYER_ID aLayerId=UNDEFINED_LAYER)
void SetLayerId(PCB_LAYER_ID aLayerId)
Collect all BOARD_ITEM objects of a given set of KICAD_T type(s).
void Collect(BOARD_ITEM *aBoard, const std::vector< KICAD_T > &aTypes)
Collect BOARD_ITEM objects using this class's Inspector method, which does the collection.
INSPECT_RESULT Inspect(EDA_ITEM *testItem, void *testData) override
The examining function within the INSPECTOR which is passed to the Iterate function.
PCB_LAYER_ID
A quick note on layer IDs: