61 bool aStatusItemsOnly )
63 return std::vector<EDA_ITEM*>();
152#ifdef GENERATOR_ORDER
153 props.
set(
"update_order", m_updateOrder );
164#ifdef GENERATOR_ORDER
165 aProps.
get_to(
"update_order", m_updateOrder );
174#ifdef GENERATOR_ORDER
175 return { {
_HKI(
"Update Order" ), wxString::FromCDouble( GetUpdateOrder() ) } };
184 return wxString(
_(
"Generator" ) );
190 return wxS(
"PCB_GENERATOR" );
200#ifdef GENERATOR_ORDER
201static struct PCB_GENERATOR_DESC
210 const wxString groupTab =
_HKI(
"Generator Properties" );
213 &PCB_GENERATOR::SetUpdateOrder,
214 &PCB_GENERATOR::GetUpdateOrder ),
217} _PCB_GENERATOR_DESC;
constexpr EDA_IU_SCALE pcbIUScale
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)
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
std::unordered_set< EDA_ITEM * > m_items
void AddItem(EDA_ITEM *aItem)
Add item to group.
KICAD_T Type() const
Returns the type of object.
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
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.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
virtual void SetProperties(const STRING_ANY_MAP &aProps)
void baseMirror(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection)
virtual void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
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)
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.
PCB_GENERATOR(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.
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
virtual bool UpdateEditPoints(EDIT_POINTS &aEditPoints)
virtual std::vector< EDA_ITEM * > GetPreviewItems(GENERATOR_TOOL *aTool, PCB_BASE_EDIT_FRAME *aFrame, bool aStatusItemsOnly=false)
void Move(const VECTOR2I &aMoveVector) override
Move this object.
virtual std::vector< std::pair< wxString, wxVariant > > GetRowData()
virtual const STRING_ANY_MAP GetProperties() const
virtual wxString GetGeneratorType() const
void Mirror(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Mirror this object relative to a given horizontal axis the layer is not changed.
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
void Move(const VECTOR2I &aMoveVector) override
Move this object.
void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
PCB_GROUP(BOARD_ITEM *aParent)
Provide class metadata.Helper macro to map type hashes to names.
void InheritsAfter(TYPE_ID aDerived, TYPE_ID aBase)
Declare an inheritance relationship between types.
static PROPERTY_MANAGER & Instance()
PROPERTY_BASE & AddProperty(PROPERTY_BASE *aProperty, const wxString &aGroup=wxEmptyString)
Register a property.
void AddTypeCast(TYPE_CAST_BASE *aCast)
Register a type converter.
A name/value tuple with unique names and wxAny values.
bool get_to(const std::string &aKey, T &aVar) const
void set(const std::string &aKey, const T &aVar)
PCB_LAYER_ID FlipLayer(PCB_LAYER_ID aLayerId, int aCopperLayersCount)
PCB_LAYER_ID
A quick note on layer IDs:
constexpr void MIRROR(T &aPoint, const T &aMirrorRef)
Updates aPoint with the mirror of aPoint relative to the aMirrorRef.
@ TOP_BOTTOM
Flip top to bottom (around the X axis)
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
Calculate the new point of coord coord pX, pY, for a rotation center 0, 0.
@ PCB_GENERATOR_T
class PCB_GENERATOR, generator on a layer
@ PCB_GROUP_T
class PCB_GROUP, a set of BOARD_ITEMs
VECTOR2< int32_t > VECTOR2I