64 const wxString& aCommitMsg,
int aCommitFlags )
66 aCommit->
Push( aCommitMsg, aCommitFlags );
90 bool aStatusItemsOnly )
92 return std::vector<EDA_ITEM*>();
164#ifdef GENERATOR_ORDER
165 props.
set(
"update_order", m_updateOrder );
176#ifdef GENERATOR_ORDER
177 aProps.
get_to(
"update_order", m_updateOrder );
186#ifdef GENERATOR_ORDER
187 return { {
_HKI(
"Update Order" ), wxString::FromCDouble( GetUpdateOrder() ) } };
196 return wxString(
_(
"Generator" ) );
202 return wxS(
"PCB_GENERATOR" );
212#ifdef GENERATOR_ORDER
213static struct PCB_GENERATOR_DESC
222 const wxString groupTab =
_HKI(
"Generator Properties" );
225 &PCB_GENERATOR::SetUpdateOrder,
226 &PCB_GENERATOR::GetUpdateOrder ),
229} _PCB_GENERATOR_DESC;
constexpr EDA_IU_SCALE pcbIUScale
virtual void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Revert the commit by restoring the modified items state.
virtual void Revert() override
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
void SetParentGroup(PCB_GROUP *aGroup)
PCB_GROUP * GetParentGroup() const
Information pertinent to a Pcbnew printed circuit board.
COMMIT & Remove(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Notify observers that aItem has been removed.
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Create an undo entry for an item that has been already modified.
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T Type() const
Returns the type of object.
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)
virtual void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
virtual void Remove(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit)
virtual void EditRevert(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit)
wxString GetClass() const override
Return the class name.
virtual bool UpdateEditPoints(std::shared_ptr< EDIT_POINTS > aEditPoints)
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)
virtual bool MakeEditPoints(std::shared_ptr< EDIT_POINTS > aEditPoints) const
bool AddItem(BOARD_ITEM *aItem) override
Add item to group.
virtual void EditPush(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit, const wxString &aCommitMsg=wxEmptyString, int aCommitFlags=0)
static bool ClassOf(const EDA_ITEM *aItem)
PCB_GENERATOR * DeepClone() const
virtual void EditStart(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit)
virtual std::vector< EDA_ITEM * > GetPreviewItems(GENERATOR_TOOL *aTool, PCB_BASE_EDIT_FRAME *aFrame, bool aStatusItemsOnly=false)
virtual bool Update(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit)
void Move(const VECTOR2I &aMoveVector) override
Move this object.
virtual std::vector< std::pair< wxString, wxVariant > > GetRowData()
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
virtual const STRING_ANY_MAP GetProperties() const
virtual wxString GetGeneratorType() const
virtual bool UpdateFromEditPoints(std::shared_ptr< EDIT_POINTS > aEditPoints, BOARD_COMMIT *aCommit)
A set of BOARD_ITEMs (i.e., without duplicates).
std::unordered_set< BOARD_ITEM * > m_items
PCB_GROUP * DeepClone() const
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.
virtual bool RemoveItem(BOARD_ITEM *aItem)
Remove item from group.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
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
A quick note on layer IDs:
@ PCB_GENERATOR_T
class PCB_GENERATOR, generator on a layer
@ PCB_GROUP_T
class PCB_GROUP, a set of BOARD_ITEMs