26#include <unordered_set>
41class STATUS_MIN_MAX_POPUP;
92 virtual std::vector<std::pair<wxString, const BOARD_ITEM*>>
GetTemplateItems()
const {
return {}; }
100 virtual void SetTemplateItem(
const wxString& aName, std::unique_ptr<BOARD_ITEM> aItem ) {}
102#define STATUS_ITEMS_ONLY true
106 bool aStatusItemsOnly =
false );
142 virtual std::vector<std::pair<wxString, wxVariant>>
GetRowData();
152 void Show(
int nestLevel, std::ostream& os )
const override { ShowDummy( os ); }
159#ifdef GENERATOR_ORDER
160 int GetUpdateOrder()
const {
return m_updateOrder; }
161 void SetUpdateOrder(
int aValue ) { m_updateOrder = aValue; }
189#ifdef GENERATOR_ORDER
190 int m_updateOrder = 0;
227 m_outline.Mirror( aCentre, aFlipDirection );
234 m_outline.Mirror( aCentre, aMirrorDirection );
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
BOARD_ITEM(BOARD_ITEM *aParent, KICAD_T idtype, PCB_LAYER_ID aLayer=F_Cu)
Information pertinent to a Pcbnew printed circuit board.
A base class for most all the KiCad significant classes used in schematics and boards.
EDIT_POINTS is a VIEW_ITEM that manages EDIT_POINTs and EDIT_LINEs and draws them.
LSET is a set of PCB_LAYER_IDs.
Common, abstract interface for edit frames.
void SetOutline(const SHAPE_POLY_SET &aOutline)
PCB_GENERATOR_POLY(BOARD_ITEM *aParent, PCB_LAYER_ID aLayer)
void Mirror(const VECTOR2I &aCentre, FLIP_DIRECTION aMirrorDirection) override
Mirror this object relative to a given horizontal axis the layer is not changed.
const SHAPE_POLY_SET & Outline() const
void Move(const VECTOR2I &aMoveVector) override
Move this object.
void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
SHAPE_POLY_SET & Outline()
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
virtual ACTION_MENU * GetChildContextMenu(TOOL_INTERACTIVE *aTool) const
Get a context menu when interacting with a generator child.
virtual void Remove(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit)=0
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
virtual void EditCancel(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit)=0
virtual void SetProperties(const STRING_ANY_MAP &aProps)
void baseMirror(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection)
virtual wxString GetCommitMessage() const =0
void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
PCB_LAYER_ID GetLayer() const override
Return the primary layer this item is on.
virtual void EditStart(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit)=0
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
wxString GetClass() const override
Return the class name.
virtual bool UpdateFromEditPoints(EDIT_POINTS &aEditPoints)
virtual bool ChildrenAreIndividuallySelectable() const
void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
virtual std::vector< std::pair< wxString, const BOARD_ITEM * > > GetTemplateItems() const
Named template items used by the generator.
PCB_GENERATOR(BOARD_ITEM *aParent, PCB_LAYER_ID aLayer)
bool IsDirty() const
Dirty flag system to for determining if generator output is not up to date It is up to each generator...
friend class GENERATORS_MGR
void Mirror(const VECTOR2I &aCentre, FLIP_DIRECTION aMirrorDirection) override
Mirror this object relative to a given horizontal axis the layer is not changed.
virtual void ShowPropertiesDialog(PCB_BASE_EDIT_FRAME *aEditFrame)
virtual bool LayerFollowsMembers() const
virtual bool Update(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit)=0
virtual wxString GetPluralName() const =0
static bool ClassOf(const EDA_ITEM *aItem)
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
virtual bool MakeEditPoints(EDIT_POINTS &aEditPoints) const
PCB_GENERATOR * DeepClone() const
void SetPosition(const VECTOR2I &aPos) override
virtual bool ChildrenAreReadOnly() const
virtual std::vector< ZONE * > GetZonesNeedingRefillAfterUpdate() const
Zones that need to be refilled after the generator runs Update()
virtual void EditFinish(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit)=0
virtual bool UpdateEditPoints(EDIT_POINTS &aEditPoints)
virtual std::vector< EDA_ITEM * > GetPreviewItems(GENERATOR_TOOL *aTool, PCB_BASE_EDIT_FRAME *aFrame, bool aStatusItemsOnly=false)
VECTOR2I GetPosition() const override
void Move(const VECTOR2I &aMoveVector) override
Move this object.
virtual bool CanDuplicate() const
virtual void OnZoneFillChanged(const std::vector< ZONE * > &aZones)
Callback to be informed zones have changed.
virtual std::vector< std::pair< wxString, wxVariant > > GetRowData()
virtual void SetTemplateItem(const wxString &aName, std::unique_ptr< BOARD_ITEM > aItem)
Insert a template item (from board file loading)
virtual const STRING_ANY_MAP GetProperties() const
virtual wxString GetGeneratorType() const
PCB_GROUP(BOARD_ITEM *aParent)
Represent a set of closed polygons.
A name/value tuple with unique names and wxAny values.
Handle a list of polygons defining a copper zone.
PCB_LAYER_ID
A quick note on layer IDs:
Class to handle a set of BOARD_ITEMs.
VECTOR2< int32_t > VECTOR2I