KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_group.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2020 Joshua Redstone redstone at gmail.com
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24#include "pcb_group.h"
25
26#include <bitmaps.h>
27#include <eda_draw_frame.h>
29#include <board.h>
30#include <board_item.h>
31#include <confirm.h>
32#include <footprint.h>
33#include <pcb_generator.h>
34#include <string_utils.h>
35#include <widgets/msgpanel.h>
36#include <view/view.h>
37#include <api/api_enums.h>
38#include <api/api_utils.h>
39#include <api/api_pcb_utils.h>
40#include <api/board/board_types.pb.h>
41#include <google/protobuf/any.pb.h>
42
43#include <wx/debug.h>
44
46 BOARD_ITEM( aParent, PCB_GROUP_T )
47{
48}
49
50
52 BOARD_ITEM( aParent, idtype, aLayer )
53{
54}
55
56void PCB_GROUP::Serialize( google::protobuf::Any &aContainer ) const
57{
58 using namespace kiapi::board::types;
59 Group group;
60
61 group.mutable_id()->set_value( m_Uuid.AsStdString() );
62 group.set_name( GetName().ToUTF8() );
63
64 for( EDA_ITEM* item : GetItems() )
65 {
66 kiapi::common::types::KIID* itemId = group.add_items();
67 itemId->set_value( item->m_Uuid.AsStdString() );
68 }
69
70 aContainer.PackFrom( group );
71}
72
73
74bool PCB_GROUP::Deserialize( const google::protobuf::Any &aContainer )
75{
76 kiapi::board::types::Group group;
77
78 if( !aContainer.UnpackTo( &group ) )
79 return false;
80
81 const_cast<KIID&>( m_Uuid ) = KIID( group.id().value() );
82 SetName( wxString( group.name().c_str(), wxConvUTF8 ) );
83
84 BOARD* board = GetBoard();
85
86 if( !board )
87 return false;
88
89 for( const kiapi::common::types::KIID& itemId : group.items() )
90 {
91 KIID id( itemId.value() );
92
93 if( BOARD_ITEM* item = board->ResolveItem( id, true ) )
94 AddItem( item );
95 }
96
97 return true;
98}
99
100std::unordered_set<BOARD_ITEM*> PCB_GROUP::GetBoardItems() const
101{
102 std::unordered_set<BOARD_ITEM*> items;
103
104 for( EDA_ITEM* item : m_items )
105 {
106 if( item->IsBOARD_ITEM() )
107 items.insert( static_cast<BOARD_ITEM*>( item ) );
108 }
109
110 return items;
111}
112
113
114/*
115 * @return if not in the footprint editor and aItem is in a footprint, returns the
116 * footprint's parent group. Otherwise, returns the aItem's parent group.
117 */
118EDA_GROUP* getClosestGroup( BOARD_ITEM* aItem, bool isFootprintEditor )
119{
120 if( !isFootprintEditor && aItem->GetParent() && aItem->GetParent()->Type() == PCB_FOOTPRINT_T )
121 return aItem->GetParent()->GetParentGroup();
122 else
123 return aItem->GetParentGroup();
124}
125
126
128EDA_GROUP* getNestedGroup( BOARD_ITEM* aItem, EDA_GROUP* aScope, bool isFootprintEditor )
129{
130 EDA_GROUP* group = getClosestGroup( aItem, isFootprintEditor );
131
132 if( group == aScope )
133 return nullptr;
134
135 while( group && group->AsEdaItem()->GetParentGroup() && group->AsEdaItem()->GetParentGroup() != aScope )
136 group = group->AsEdaItem()->GetParentGroup();
137
138 return group;
139}
140
141
142EDA_GROUP* PCB_GROUP::TopLevelGroup( BOARD_ITEM* aItem, EDA_GROUP* aScope, bool isFootprintEditor )
143{
144 return getNestedGroup( aItem, aScope, isFootprintEditor );
145}
146
147
148bool PCB_GROUP::WithinScope( BOARD_ITEM* aItem, PCB_GROUP* aScope, bool isFootprintEditor )
149{
150 EDA_GROUP* group = getClosestGroup( aItem, isFootprintEditor );
151
152 if( group && group == aScope )
153 return true;
154
155 EDA_GROUP* nested = getNestedGroup( aItem, aScope, isFootprintEditor );
156
157 return nested && nested->AsEdaItem()->GetParentGroup() && ( nested->AsEdaItem()->GetParentGroup() == aScope );
158}
159
160
162{
163 return GetBoundingBox().Centre();
164}
165
166
167void PCB_GROUP::SetPosition( const VECTOR2I& aNewpos )
168{
169 VECTOR2I delta = aNewpos - GetPosition();
170
171 Move( delta );
172}
173
174
175void PCB_GROUP::SetLocked( bool aLockState )
176{
177 BOARD_ITEM::SetLocked( aLockState );
178
180 [&]( BOARD_ITEM* child )
181 {
182 child->SetLocked( aLockState );
183 },
185}
186
187
189{
190 // Use copy constructor to get the same uuid and other fields
191 PCB_GROUP* newGroup = new PCB_GROUP( *this );
192 return newGroup;
193}
194
195
197{
198 // Use copy constructor to get the same uuid and other fields
199 PCB_GROUP* newGroup = new PCB_GROUP( *this );
200 newGroup->m_items.clear();
201
202 for( EDA_ITEM* member : m_items )
203 {
204 if( member->Type() == PCB_GROUP_T )
205 newGroup->AddItem( static_cast<PCB_GROUP*>( member )->DeepClone() );
206 else if( member->Type() == PCB_GENERATOR_T )
207 newGroup->AddItem( static_cast<PCB_GENERATOR*>( member )->DeepClone() );
208 else
209 newGroup->AddItem( static_cast<BOARD_ITEM*>( member->Clone() ) );
210 }
211
212 return newGroup;
213}
214
215
216PCB_GROUP* PCB_GROUP::DeepDuplicate( bool addToParentGroup, BOARD_COMMIT* aCommit ) const
217{
218 PCB_GROUP* newGroup = static_cast<PCB_GROUP*>( Duplicate( addToParentGroup, aCommit ) );
219 newGroup->m_items.clear();
220
221 for( EDA_ITEM* member : m_items )
222 {
223 if( member->Type() == PCB_GROUP_T )
224 newGroup->AddItem( static_cast<PCB_GROUP*>( member )->DeepDuplicate( IGNORE_PARENT_GROUP ) );
225 else
226 newGroup->AddItem( static_cast<BOARD_ITEM*>( member )->Duplicate( IGNORE_PARENT_GROUP ) );
227 }
228
229 return newGroup;
230}
231
232
234{
235 assert( aImage->Type() == PCB_GROUP_T );
236 PCB_GROUP* image = static_cast<PCB_GROUP*>( aImage );
237
238 std::swap( *this, *image );
239
240 // A group doesn't own its children (they're owned by the board), so undo doesn't do a
241 // deep clone when making an image. However, it's still safest to update the parentGroup
242 // pointers of the group's children. We must do it in the right order in case any of the
243 // children are shared (ie: image first, "this" second so that any shared children end up
244 // with "this").
245 image->RunOnChildren(
246 [&]( BOARD_ITEM* child )
247 {
248 child->SetParentGroup( image );
249 },
251
253 [&]( BOARD_ITEM* child )
254 {
255 child->SetParentGroup( this );
256 },
258}
259
260
261bool PCB_GROUP::HitTest( const VECTOR2I& aPosition, int aAccuracy ) const
262{
263 // Groups are selected by promoting a selection of one of their children
264 return false;
265}
266
267
268bool PCB_GROUP::HitTest( const BOX2I& aRect, bool aContained, int aAccuracy ) const
269{
270 // Groups are selected by promoting a selection of one of their children
271 return false;
272}
273
274
275bool PCB_GROUP::HitTest( const SHAPE_LINE_CHAIN& aPoly, bool aContained ) const
276{
277 // Groups are selected by promoting a selection of one of their children
278 return false;
279}
280
281
283{
284 BOX2I bbox;
285
286 for( EDA_ITEM* item : m_items )
287 {
288 if( item->Type() == PCB_FOOTPRINT_T )
289 bbox.Merge( static_cast<FOOTPRINT*>( item )->GetBoundingBox( true ) );
290 else
291 bbox.Merge( item->GetBoundingBox() );
292 }
293
294 bbox.Inflate( pcbIUScale.mmToIU( 0.25 ) ); // Give a min size to the bbox
295
296 return bbox;
297}
298
299
300std::shared_ptr<SHAPE> PCB_GROUP::GetEffectiveShape( PCB_LAYER_ID aLayer, FLASHING aFlash ) const
301{
302 std::shared_ptr<SHAPE_COMPOUND> shape = std::make_shared<SHAPE_COMPOUND>();
303
304 for( BOARD_ITEM* item : GetBoardItems() )
305 shape->AddShape( item->GetEffectiveShape( aLayer, aFlash )->Clone() );
306
307 return shape;
308}
309
310
311INSPECT_RESULT PCB_GROUP::Visit( INSPECTOR aInspector, void* aTestData,
312 const std::vector<KICAD_T>& aScanTypes )
313{
314 for( KICAD_T scanType : aScanTypes )
315 {
316 if( scanType == Type() )
317 {
318 if( INSPECT_RESULT::QUIT == aInspector( this, aTestData ) )
320 }
321 }
322
324}
325
326
328{
329 LSET aSet;
330
331 for( EDA_ITEM* item : m_items )
332 aSet |= static_cast<BOARD_ITEM*>( item )->GetLayerSet();
333
334 return aSet;
335}
336
337
339{
340 // A group is on a layer if any item is on the layer
341 for( EDA_ITEM* item : m_items )
342 {
343 if( static_cast<BOARD_ITEM*>( item )->IsOnLayer( aLayer ) )
344 return true;
345 }
346
347 return false;
348}
349
350
351std::vector<int> PCB_GROUP::ViewGetLayers() const
352{
353 return { LAYER_ANCHOR };
354}
355
356
357double PCB_GROUP::ViewGetLOD( int aLayer, const KIGFX::VIEW* aView ) const
358{
359 if( aView->IsLayerVisible( LAYER_ANCHOR ) )
360 return LOD_SHOW;
361
362 return LOD_HIDE;
363}
364
365
366void PCB_GROUP::Move( const VECTOR2I& aMoveVector )
367{
368 for( EDA_ITEM* member : m_items )
369 static_cast<BOARD_ITEM*>( member )->Move( aMoveVector );
370}
371
372
373void PCB_GROUP::Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle )
374{
375 for( EDA_ITEM* item : m_items )
376 static_cast<BOARD_ITEM*>( item )->Rotate( aRotCentre, aAngle );
377}
378
379
380void PCB_GROUP::Flip( const VECTOR2I& aCentre, FLIP_DIRECTION aFlipDirection )
381{
382 for( EDA_ITEM* item : m_items )
383 static_cast<BOARD_ITEM*>( item )->Flip( aCentre, aFlipDirection );
384}
385
386
387void PCB_GROUP::Mirror( const VECTOR2I& aCentre, FLIP_DIRECTION aFlipDirection )
388{
389 for( EDA_ITEM* item : m_items )
390 static_cast<BOARD_ITEM*>( item )->Mirror( aCentre, aFlipDirection );
391}
392
393
394wxString PCB_GROUP::GetItemDescription( UNITS_PROVIDER* aUnitsProvider, bool aFull ) const
395{
396 if( m_name.empty() )
397 return wxString::Format( _( "Unnamed Group, %zu members" ), m_items.size() );
398 else
399 return wxString::Format( _( "Group '%s', %zu members" ), m_name, m_items.size() );
400}
401
402
404{
405 return BITMAPS::module;
406}
407
408
409void PCB_GROUP::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
410{
411 aList.emplace_back( _( "Group" ), m_name.empty() ? _( "<unnamed>" ) : m_name );
412 aList.emplace_back( _( "Members" ), wxString::Format( wxT( "%zu" ), m_items.size() ) );
413
414 if( aFrame->GetName() == PCB_EDIT_FRAME_NAME && IsLocked() )
415 aList.emplace_back( _( "Status" ), _( "Locked" ) );
416}
417
418
419bool PCB_GROUP::Matches( const EDA_SEARCH_DATA& aSearchData, void* aAuxData ) const
420{
421 return EDA_ITEM::Matches( UnescapeString( GetName() ), aSearchData );
422}
423
424
425void PCB_GROUP::RunOnChildren( const std::function<void( BOARD_ITEM* )>& aFunction, RECURSE_MODE aMode ) const
426{
427 try
428 {
429 for( BOARD_ITEM* item : GetBoardItems() )
430 {
431 aFunction( item );
432
433 if( aMode == RECURSE_MODE::RECURSE && ( item->Type() == PCB_GROUP_T || item->Type() == PCB_GENERATOR_T ) )
434 {
435 item->RunOnChildren( aFunction, RECURSE_MODE::RECURSE );
436 }
437 }
438 }
439 catch( std::bad_function_call& )
440 {
441 wxFAIL_MSG( wxT( "Error calling function in PCB_GROUP::RunOnChildren" ) );
442 }
443}
444
445
446bool PCB_GROUP::operator==( const BOARD_ITEM& aBoardItem ) const
447{
448 if( aBoardItem.Type() != Type() )
449 return false;
450
451 const PCB_GROUP& other = static_cast<const PCB_GROUP&>( aBoardItem );
452
453 return *this == other;
454}
455
456
457bool PCB_GROUP::operator==( const PCB_GROUP& aOther ) const
458{
459 if( m_items.size() != aOther.m_items.size() )
460 return false;
461
462 // The items in groups are in unordered sets hashed by the pointer value, so we need to
463 // order them by UUID (EDA_ITEM_SET) to compare
464 EDA_ITEM_SET itemSet( m_items.begin(), m_items.end() );
465 EDA_ITEM_SET otherItemSet( aOther.m_items.begin(), aOther.m_items.end() );
466
467 for( auto it1 = itemSet.begin(), it2 = otherItemSet.begin(); it1 != itemSet.end(); ++it1, ++it2 )
468 {
469 // Compare UUID instead of the items themselves because we only care if the contents
470 // of the group has changed, not which elements in the group have changed
471 if( ( *it1 )->m_Uuid != ( *it2 )->m_Uuid )
472 return false;
473 }
474
475 return true;
476}
477
478
479double PCB_GROUP::Similarity( const BOARD_ITEM& aOther ) const
480{
481 if( aOther.Type() != Type() )
482 return 0.0;
483
484 const PCB_GROUP& other = static_cast<const PCB_GROUP&>( aOther );
485
486 double similarity = 0.0;
487
488 for( EDA_ITEM* item : m_items )
489 {
490 for( EDA_ITEM* otherItem : other.m_items )
491 {
492 similarity += static_cast<BOARD_ITEM*>( item )->Similarity( *static_cast<BOARD_ITEM*>( otherItem ) );
493 }
494 }
495
496 return similarity / m_items.size();
497}
498
499
500static struct PCB_GROUP_DESC
501{
503 {
510
511 propMgr.Mask( TYPE_HASH( PCB_GROUP ), TYPE_HASH( BOARD_ITEM ), _HKI( "Position X" ) );
512 propMgr.Mask( TYPE_HASH( PCB_GROUP ), TYPE_HASH( BOARD_ITEM ), _HKI( "Position Y" ) );
513 propMgr.Mask( TYPE_HASH( PCB_GROUP ), TYPE_HASH( BOARD_ITEM ), _HKI( "Layer" ) );
514
515 const wxString groupTab = _HKI( "Group Properties" );
516
517 propMgr.AddProperty(
519 groupTab );
520 }
constexpr EDA_IU_SCALE pcbIUScale
Definition base_units.h:112
BITMAPS
A list of all bitmap identifiers.
BOX2< VECTOR2I > BOX2I
Definition box2.h:922
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition board_item.h:83
BOARD_ITEM(BOARD_ITEM *aParent, KICAD_T idtype, PCB_LAYER_ID aLayer=F_Cu)
Definition board_item.h:85
virtual BOARD_ITEM * Duplicate(bool addToParentGroup, BOARD_COMMIT *aCommit=nullptr) const
Create a copy of this BOARD_ITEM.
void SetLocked(bool aLocked) override
Definition board_item.h:327
bool IsLocked() const override
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
BOARD_ITEM_CONTAINER * GetParent() const
Definition board_item.h:214
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:322
constexpr BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
Definition box2.h:558
constexpr Vec Centre() const
Definition box2.h:97
constexpr BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
Definition box2.h:658
The base class for create windows for drawing purpose.
A set of EDA_ITEMs (i.e., without duplicates).
Definition eda_group.h:46
wxString m_name
Definition eda_group.h:77
std::unordered_set< EDA_ITEM * > m_items
Definition eda_group.h:76
std::unordered_set< EDA_ITEM * > & GetItems()
Definition eda_group.h:54
wxString GetName() const
Definition eda_group.h:51
void AddItem(EDA_ITEM *aItem)
Add item to group.
Definition eda_group.cpp:27
virtual EDA_ITEM * AsEdaItem()=0
void SetName(const wxString &aName)
Definition eda_group.h:52
const KIID m_Uuid
Definition eda_item.h:522
virtual EDA_GROUP * GetParentGroup() const
Definition eda_item.h:116
KICAD_T Type() const
Returns the type of object.
Definition eda_item.h:110
virtual bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const
Compare the item against the search criteria in aSearchData.
Definition eda_item.h:407
virtual void SetParentGroup(EDA_GROUP *aGroup)
Definition eda_item.h:115
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
Definition eda_item.cpp:39
static constexpr double LOD_HIDE
Return this constant from ViewGetLOD() to hide the item unconditionally.
Definition view_item.h:180
static constexpr double LOD_SHOW
Return this constant from ViewGetLOD() to show the item unconditionally.
Definition view_item.h:185
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Definition view.h:66
bool IsLayerVisible(int aLayer) const
Return information about visibility of a particular layer.
Definition view.h:422
Definition kiid.h:49
LSET is a set of PCB_LAYER_IDs.
Definition lset.h:37
A set of BOARD_ITEMs (i.e., without duplicates).
Definition pcb_group.h:53
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
static bool WithinScope(BOARD_ITEM *aItem, PCB_GROUP *aScope, bool isFootprintEditor)
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const override
Compare the item against the search criteria in aSearchData.
void RunOnChildren(const std::function< void(BOARD_ITEM *)> &aFunction, RECURSE_MODE aMode) const override
Invoke a function on all children.
PCB_GROUP * DeepClone() const
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
Definition pcb_group.cpp:74
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.
static EDA_GROUP * TopLevelGroup(BOARD_ITEM *aItem, EDA_GROUP *aScope, bool isFootprintEditor)
bool operator==(const PCB_GROUP &aOther) const
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Test to see if this object is on the given layer.
LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
Definition pcb_group.cpp:56
void SetPosition(const VECTOR2I &aNewpos) override
void Move(const VECTOR2I &aMoveVector) override
Move this object.
double Similarity(const BOARD_ITEM &aOther) const override
Return a measure of how likely the other object is to represent the same object.
INSPECT_RESULT Visit(INSPECTOR aInspector, void *aTestData, const std::vector< KICAD_T > &aScanTypes) override
May be re-implemented for each derived class in order to handle all the types given by its member dat...
double ViewGetLOD(int aLayer, const KIGFX::VIEW *aView) const override
std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT) const override
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
std::unordered_set< BOARD_ITEM * > GetBoardItems() const
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
VECTOR2I GetPosition() const override
void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
PCB_GROUP * DeepDuplicate(bool addToParentGroup, BOARD_COMMIT *aCommit=nullptr) const
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
PCB_GROUP(BOARD_ITEM *aParent)
Definition pcb_group.cpp:45
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
void swapData(BOARD_ITEM *aImage) override
void SetLocked(bool aLocked) override
std::vector< int > ViewGetLayers() const override
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.
void Mask(TYPE_ID aDerived, TYPE_ID aBase, const wxString &aName)
Sets a base class property as masked in a derived class.
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.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
This file is part of the common library.
#define _(s)
#define PCB_EDIT_FRAME_NAME
RECURSE_MODE
Definition eda_item.h:50
@ RECURSE
Definition eda_item.h:51
@ NO_RECURSE
Definition eda_item.h:52
INSPECT_RESULT
Definition eda_item.h:44
std::set< EDA_ITEM *, CompareByUuid > EDA_ITEM_SET
Definition eda_item.h:577
const INSPECTOR_FUNC & INSPECTOR
std::function passed to nested users by ref, avoids copying std::function.
Definition eda_item.h:91
#define IGNORE_PARENT_GROUP
Definition eda_item.h:55
FLASHING
Enum used during connectivity building to ensure we do not query connectivity while building the data...
Definition layer_ids.h:184
@ LAYER_ANCHOR
Anchor of items having an anchor point (texts, footprints).
Definition layer_ids.h:248
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:60
FLIP_DIRECTION
Definition mirror.h:27
Message panel definition file.
#define _HKI(x)
Definition page_info.cpp:44
EDA_GROUP * getClosestGroup(BOARD_ITEM *aItem, bool isFootprintEditor)
static struct PCB_GROUP_DESC _PCB_GROUP_DESC
EDA_GROUP * getNestedGroup(BOARD_ITEM *aItem, EDA_GROUP *aScope, bool isFootprintEditor)
Returns the top level group inside the aScope group, or nullptr.
Class to handle a set of BOARD_ITEMs.
#define TYPE_HASH(x)
Definition property.h:74
#define REGISTER_TYPE(x)
EDA_GROUP * getNestedGroup(SCH_ITEM *aItem, EDA_GROUP *aScope, bool isSymbolEditor)
Returns the top level group inside the aScope group, or nullptr.
Definition sch_group.cpp:81
EDA_GROUP * getClosestGroup(SCH_ITEM *aItem, bool isSymbolEditor)
Definition sch_group.cpp:71
wxString UnescapeString(const wxString &aSource)
int delta
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition typeinfo.h:78
@ PCB_GENERATOR_T
class PCB_GENERATOR, generator on a layer
Definition typeinfo.h:91
@ PCB_GROUP_T
class PCB_GROUP, a set of BOARD_ITEMs
Definition typeinfo.h:111
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
Definition typeinfo.h:86
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:695