KiCad PCB EDA Suite
BOARD_ITEM_DESC Struct Reference

Public Member Functions


Detailed Description

Definition at line 164 of file class_board_item.cpp.

Constructor & Destructor Documentation



Definition at line 166 of file class_board_item.cpp.

167  {
170  if( layerEnum.Choices().GetCount() == 0 )
171  {
172  layerEnum.Undefined( UNDEFINED_LAYER );
174  for( LSEQ seq = LSET::AllLayersMask().Seq(); seq; ++seq )
175  layerEnum.Map( *seq, LSET::Name( *seq ) );
176  }
182  propMgr.AddProperty( new PROPERTY<BOARD_ITEM, int>( _( "Position X" ),
184  propMgr.AddProperty( new PROPERTY<BOARD_ITEM, int>( _( "Position Y" ),
186  propMgr.AddProperty( new PROPERTY_ENUM<BOARD_ITEM, PCB_LAYER_ID>( _( "Layer" ),
188  propMgr.AddProperty( new PROPERTY<BOARD_ITEM, bool>( _( "Locked" ),
190  }
static PROPERTY_MANAGER & Instance()
Definition: property_mgr.h:61
#define TYPE_HASH(x)
Macro to generate unique identifier for a type
Definition: property.h:53
virtual void SetLayer(PCB_LAYER_ID aLayer)
Function SetLayer sets the layer this item is on.
BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class,...
ENUM_MAP & Undefined(T aValue)
Definition: property.h:531
static ENUM_MAP< T > & Instance()
Definition: property.h:517
virtual void SetLocked(bool aLocked)
Function SetLocked modifies 'lock' status for of the item.
wxPGChoices & Choices()
Definition: property.h:557
#define REGISTER_TYPE(x)
Helper macro to map type hashes to names
Definition: property_mgr.h:244
Display value expressed in distance units (mm/inch)
Definition: property.h:47
int GetY() const
static const wxChar * Name(PCB_LAYER_ID aLayerId)
Function Name returns the fixed name association with aLayerId.
Definition: lset.cpp:81
void InheritsAfter(TYPE_ID aDerived, TYPE_ID aBase)
Declares an inheritance relationship between types.
void SetY(int aY)
static LSET AllLayersMask()
Definition: lset.cpp:756
void SetX(int aX)
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
virtual bool IsLocked() const
Function IsLocked.
int GetX() const
#define _(s)
Definition: 3d_actions.cpp:33
void AddProperty(PROPERTY_BASE *aProperty)
Registers a property.
EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boards.
Definition: base_struct.h:159
Provides class metadata.
Definition: property_mgr.h:58
ENUM_MAP & Map(T aValue, const wxString &aName)
Definition: property.h:523
virtual PCB_LAYER_ID GetLayer() const
Function GetLayer returns the primary layer this item is on.

References _, PROPERTY_MANAGER::AddProperty(), LSET::AllLayersMask(), ENUM_MAP< T >::Choices(), DISTANCE, BOARD_ITEM::GetLayer(), BOARD_ITEM::GetX(), BOARD_ITEM::GetY(), PROPERTY_MANAGER::InheritsAfter(), PROPERTY_MANAGER::Instance(), ENUM_MAP< T >::Instance(), BOARD_ITEM::IsLocked(), ENUM_MAP< T >::Map(), LSET::Name(), REGISTER_TYPE, BOARD_ITEM::SetLayer(), BOARD_ITEM::SetLocked(), BOARD_ITEM::SetX(), BOARD_ITEM::SetY(), TYPE_HASH, ENUM_MAP< T >::Undefined(), and UNDEFINED_LAYER.

The documentation for this struct was generated from the following file: