KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_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 The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 * or you may search the http://www.gnu.org website for the version 2 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23#include <bitmaps.h>
24#include <api/schematic/schematic_types.pb.h>
25#include <google/protobuf/any.pb.h>
26#include <eda_draw_frame.h>
27#include <eda_group.h>
29#include <sch_item.h>
30#include <sch_group.h>
31#include <sch_screen.h>
32#include <schematic.h>
33#include <sch_symbol.h>
34#include <symbol.h>
35#include <confirm.h>
36#include <widgets/msgpanel.h>
37#include <view/view.h>
38
39#include <wx/debug.h>
40#include <properties/property.h>
42
47
49{
51}
52
57
58
59void SCH_GROUP::Serialize( google::protobuf::Any& aContainer ) const
60{
61 using namespace kiapi::schematic::types;
62
63 Group group;
64 EDA_ITEM_SET sortedItems( m_items.begin(), m_items.end() );
65
66 group.mutable_id()->set_value( m_Uuid.AsStdString() );
67 group.set_name( GetName().ToUTF8() );
68 group.set_locked( IsLocked() ? kiapi::common::types::LockedState::LS_LOCKED
69 : kiapi::common::types::LockedState::LS_UNLOCKED );
70
71 for( EDA_ITEM* member : sortedItems )
72 group.add_items()->set_value( member->m_Uuid.AsStdString() );
73
74 aContainer.PackFrom( group );
75}
76
77
78bool SCH_GROUP::Deserialize( const google::protobuf::Any& aContainer )
79{
80 using namespace kiapi::schematic::types;
81
82 Group group;
83
84 if( !aContainer.UnpackTo( &group ) )
85 return false;
86
87 const_cast<KIID&>( m_Uuid ) = KIID( group.id().value() );
88 SetName( wxString::FromUTF8( group.name() ) );
89 SetLocked( group.locked() == kiapi::common::types::LockedState::LS_LOCKED );
90
91 m_items.clear();
92
93 SCHEMATIC* schematic = Schematic();
94
95 if( !schematic )
96 return false;
97
98 for( const kiapi::common::types::KIID& memberId : group.items() )
99 {
100 KIID id( memberId.value() );
101
102 if( SCH_ITEM* item = schematic->ResolveItem( id, nullptr, true ) )
103 m_items.insert( item );
104 }
105
106 return true;
107}
108
109std::unordered_set<SCH_ITEM*> SCH_GROUP::GetSchItems() const
110{
111 std::unordered_set<SCH_ITEM*> items;
112
113 for( EDA_ITEM* item : m_items )
114 {
115 if( item->IsSCH_ITEM() )
116 items.insert( static_cast<SCH_ITEM*>( item ) );
117 }
118
119 return items;
120}
121
122
123/*
124 * @return if not in the symbol editor and aItem is in a symbol, returns the
125 * symbol's parent group. Otherwise, returns the aItem's parent group.
126 */
127EDA_GROUP* getClosestGroup( SCH_ITEM* aItem, bool isSymbolEditor )
128{
129 // In the schematic editor, items with either symbols or sheets as their parents (e.g., fields,
130 // pins, sheet pins, etc.) don't get their own groups and instead follow the group of their parent
131 // object.
132 if( !isSymbolEditor && aItem->GetParent() && aItem->GetParent()->Type() == SCH_SYMBOL_T )
133 return static_cast<SCH_SYMBOL*>( aItem->GetParent() )->GetParentGroup();
134 else if( aItem->GetParent() && aItem->GetParent()->Type() == SCH_SHEET_T )
135 return static_cast<SCH_SHEET*>( aItem->GetParent() )->GetParentGroup();
136 else
137 return aItem->GetParentGroup();
138}
139
140
142EDA_GROUP* getNestedGroup( SCH_ITEM* aItem, EDA_GROUP* aScope, bool isSymbolEditor )
143{
144 EDA_GROUP* group = getClosestGroup( aItem, isSymbolEditor );
145
146 if( group == aScope )
147 return nullptr;
148
149 while( group && group->AsEdaItem()->GetParentGroup() && group->AsEdaItem()->GetParentGroup() != aScope )
150 {
151 if( group->AsEdaItem()->GetParent()->Type() == LIB_SYMBOL_T && isSymbolEditor )
152 break;
153
154 group = group->AsEdaItem()->GetParentGroup();
155 }
156
157 return group;
158}
159
160
161EDA_GROUP* SCH_GROUP::TopLevelGroup( SCH_ITEM* aItem, EDA_GROUP* aScope, bool isSymbolEditor )
162{
163 return getNestedGroup( aItem, aScope, isSymbolEditor );
164}
165
166
167bool SCH_GROUP::WithinScope( SCH_ITEM* aItem, SCH_GROUP* aScope, bool isSymbolEditor )
168{
169 EDA_GROUP* group = getClosestGroup( aItem, isSymbolEditor );
170
171 if( group && group == aScope )
172 return true;
173
174 EDA_GROUP* nested = getNestedGroup( aItem, aScope, isSymbolEditor );
175
176 return nested && nested->AsEdaItem()->GetParentGroup() && nested->AsEdaItem()->GetParentGroup() == aScope;
177}
178
179
181{
182 return GetBoundingBox().Centre();
183}
184
185
186void SCH_GROUP::SetPosition( const VECTOR2I& aNewpos )
187{
188 VECTOR2I delta = aNewpos - GetPosition();
189
190 Move( delta );
191}
192
193
195{
196 // Use copy constructor to get the same uuid and other fields
197 SCH_GROUP* newGroup = new SCH_GROUP( *this );
198 return newGroup;
199}
200
201
203{
204 // Use copy constructor to get the same uuid and other fields
205 SCH_GROUP* newGroup = new SCH_GROUP( *this );
206 newGroup->m_items.clear();
207
208 for( EDA_ITEM* member : m_items )
209 {
210 if( member->Type() == SCH_GROUP_T )
211 newGroup->AddItem( static_cast<SCH_GROUP*>( member )->DeepClone() );
212 else
213 newGroup->AddItem( static_cast<SCH_ITEM*>( member->Clone() ) );
214 }
215
216 return newGroup;
217}
218
219
220SCH_GROUP* SCH_GROUP::DeepDuplicate( bool addToParentGroup, SCH_COMMIT* aCommit ) const
221{
222 SCH_GROUP* newGroup = static_cast<SCH_GROUP*>( Duplicate( addToParentGroup, aCommit ) );
223 newGroup->m_items.clear();
224
225 for( EDA_ITEM* member : m_items )
226 {
227 if( member->Type() == SCH_GROUP_T )
228 newGroup->AddItem( static_cast<SCH_GROUP*>( member )->DeepDuplicate( IGNORE_PARENT_GROUP ) );
229 else
230 newGroup->AddItem( static_cast<SCH_ITEM*>( member )->Duplicate( IGNORE_PARENT_GROUP ) );
231 }
232
233 return newGroup;
234}
235
236
238{
239 assert( aImage->Type() == SCH_GROUP_T );
240 SCH_GROUP* image = static_cast<SCH_GROUP*>( aImage );
241
242 std::swap( m_items, image->m_items );
243 std::swap( m_name, image->m_name );
244 std::swap( m_designBlockLibId, image->m_designBlockLibId );
245
246 // A group doesn't own its children (they're owned by the schematic), so undo doesn't do a
247 // deep clone when making an image. However, it's still safest to update the parentGroup
248 // pointers of the group's children. We must do it in the right order in case any of the
249 // children are shared (ie: image first, "this" second so that any shared children end up
250 // with "this").
251 image->RunOnChildren(
252 [&]( SCH_ITEM* child )
253 {
254 child->SetParentGroup( image );
255 },
257
259 [&]( SCH_ITEM* child )
260 {
261 child->SetParentGroup( this );
262 },
264}
265
266
267bool SCH_GROUP::HitTest( const VECTOR2I& aPosition, int aAccuracy ) const
268{
269 // Groups are selected by promoting a selection of one of their children
270 return false;
271}
272
273
274bool SCH_GROUP::HitTest( const BOX2I& aRect, bool aContained, int aAccuracy ) const
275{
276 // Groups are selected by promoting a selection of one of their children
277 return false;
278}
279
280
282{
283 BOX2I bbox;
284
285 for( EDA_ITEM* item : m_items )
286 {
287 if( item->Type() == SCH_SYMBOL_T || item->Type() == LIB_SYMBOL_T )
288 bbox.Merge( static_cast<SYMBOL*>( item )->GetBoundingBox() );
289 else
290 bbox.Merge( item->GetBoundingBox() );
291 }
292
293 bbox.Inflate( schIUScale.MilsToIU( 10 ) );
294
295 return bbox;
296}
297
298
299INSPECT_RESULT SCH_GROUP::Visit( INSPECTOR aInspector, void* aTestData,
300 const std::vector<KICAD_T>& aScanTypes )
301{
302 for( KICAD_T scanType : aScanTypes )
303 {
304 if( scanType == Type() )
305 {
306 if( INSPECT_RESULT::QUIT == aInspector( this, aTestData ) )
308 }
309 }
310
312}
313
314
315std::vector<int> SCH_GROUP::ViewGetLayers() const
316{
317 return { LAYER_SCHEMATIC_ANCHOR };
318}
319
320
321double SCH_GROUP::ViewGetLOD( int aLayer, const KIGFX::VIEW* aView ) const
322{
324 return LOD_SHOW;
325
326 return LOD_HIDE;
327}
328
329
330void SCH_GROUP::Move( const VECTOR2I& aMoveVector )
331{
332 for( EDA_ITEM* member : m_items )
333 {
334 EDA_ITEM_FLAGS flags = member->GetFlags();
335
336 if( member->Type() == SCH_LINE_T )
337 member->SetFlags( STARTPOINT | ENDPOINT );
338
339 static_cast<SCH_ITEM*>( member )->Move( aMoveVector );
340
341 member->SetFlags( flags );
342 }
343}
344
345
346void SCH_GROUP::Rotate( const VECTOR2I& aCenter, bool aRotateCCW )
347{
348 for( EDA_ITEM* member : m_items )
349 {
350 EDA_ITEM_FLAGS flags = member->GetFlags();
351
352 if( member->Type() == SCH_LINE_T )
353 member->SetFlags( STARTPOINT | ENDPOINT );
354
355 static_cast<SCH_ITEM*>( member )->Rotate( aCenter, aRotateCCW );
356
357 member->SetFlags( flags );
358 }
359}
360
361
363{
364 for( EDA_ITEM* member : m_items )
365 {
366 EDA_ITEM_FLAGS flags = member->GetFlags();
367
368 if( member->Type() == SCH_LINE_T )
369 member->SetFlags( STARTPOINT | ENDPOINT );
370
371 static_cast<SCH_ITEM*>( member )->MirrorHorizontally( aCenter );
372
373 member->SetFlags( flags );
374 }
375}
376
377
379{
380 for( EDA_ITEM* member : m_items )
381 {
382 EDA_ITEM_FLAGS flags = member->GetFlags();
383
384 if( member->Type() == SCH_LINE_T )
385 member->SetFlags( STARTPOINT | ENDPOINT );
386
387 static_cast<SCH_ITEM*>( member )->MirrorVertically( aCenter );
388
389 member->SetFlags( flags );
390 }
391}
392
393
394void SCH_GROUP::Plot( PLOTTER* aPlotter, bool aBackground, const SCH_PLOT_OPTS& aPlotOpts,
395 int aUnit, int aBodyStyle, const VECTOR2I& aOffset, bool aDimmed )
396{
397}
398
399
400wxString SCH_GROUP::GetItemDescription( UNITS_PROVIDER* aUnitsProvider, bool aFull ) const
401{
402 if( m_name.empty() )
403 return wxString::Format( _( "Unnamed Group, %zu members" ), m_items.size() );
404 else
405 return wxString::Format( _( "Group '%s', %zu members" ), m_name, m_items.size() );
406}
407
408
410{
411 return BITMAPS::module;
412}
413
414
415void SCH_GROUP::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
416{
417 aList.emplace_back( _( "Group" ), m_name.empty() ? _( "<unnamed>" ) : m_name );
418 aList.emplace_back( _( "Members" ), wxString::Format( wxT( "%zu" ), m_items.size() ) );
419}
420
421
422bool SCH_GROUP::Matches( const EDA_SEARCH_DATA& aSearchData, void* aAuxData ) const
423{
424 return EDA_ITEM::Matches( UnescapeString( GetName() ), aSearchData );
425}
426
427
428void SCH_GROUP::RunOnChildren( const std::function<void( SCH_ITEM* )>& aFunction, RECURSE_MODE aMode )
429{
430 try
431 {
432 for( EDA_ITEM* item : m_items )
433 {
434 aFunction( static_cast<SCH_ITEM*>( item ) );
435
436 if( item->Type() == SCH_GROUP_T && aMode == RECURSE_MODE::RECURSE )
437 static_cast<SCH_GROUP*>( item )->RunOnChildren( aFunction, RECURSE_MODE::RECURSE );
438 }
439 }
440 catch( std::bad_function_call& )
441 {
442 wxFAIL_MSG( wxT( "Error calling function in SCH_GROUP::RunOnChildren" ) );
443 }
444}
445
446
447bool SCH_GROUP::operator==( const SCH_ITEM& aSchItem ) const
448{
449 if( aSchItem.Type() != Type() )
450 return false;
451
452 const SCH_GROUP& other = static_cast<const SCH_GROUP&>( aSchItem );
453
454 return *this == other;
455}
456
457
458bool SCH_GROUP::operator==( const SCH_GROUP& aOther ) const
459{
460 if( m_items.size() != aOther.m_items.size() )
461 return false;
462
463 // The items in groups are in unordered sets hashed by the pointer value, so we need to
464 // order them by UUID (EDA_ITEM_SET) to compare
465 EDA_ITEM_SET itemSet( m_items.begin(), m_items.end() );
466 EDA_ITEM_SET otherItemSet( aOther.m_items.begin(), aOther.m_items.end() );
467
468 for( auto it1 = itemSet.begin(), it2 = otherItemSet.begin(); it1 != itemSet.end(); ++it1, ++it2 )
469 {
470 // Compare UUID instead of the items themselves because we only care if the contents
471 // of the group has changed, not which elements in the group have changed
472 if( ( *it1 )->m_Uuid != ( *it2 )->m_Uuid )
473 return false;
474 }
475
476 return true;
477}
478
479
480double SCH_GROUP::Similarity( const SCH_ITEM& aOther ) const
481{
482 if( aOther.Type() != Type() )
483 return 0.0;
484
485 const SCH_GROUP& other = static_cast<const SCH_GROUP&>( aOther );
486
487 double similarity = 0.0;
488
489 for( EDA_ITEM* item : m_items )
490 {
491 for( EDA_ITEM* otherItem : other.m_items )
492 {
493 similarity += static_cast<SCH_ITEM*>( item )->Similarity( *static_cast<SCH_ITEM*>( otherItem ) );
494 }
495 }
496
497 return similarity / m_items.size();
498}
499
500
501static struct SCH_GROUP_DESC
502{
504 {
511
512 propMgr.Mask( TYPE_HASH( SCH_GROUP ), TYPE_HASH( SCH_ITEM ), _HKI( "Position X" ) );
513 propMgr.Mask( TYPE_HASH( SCH_GROUP ), TYPE_HASH( SCH_ITEM ), _HKI( "Position Y" ) );
514
515 const wxString groupTab = _HKI( "Group Properties" );
516
517 propMgr.AddProperty(
519 groupTab );
520 }
constexpr EDA_IU_SCALE schIUScale
Definition base_units.h:127
BITMAPS
A list of all bitmap identifiers.
BOX2< VECTOR2I > BOX2I
Definition box2.h:922
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
wxString GetName() const
Definition eda_group.h:51
LIB_ID m_designBlockLibId
Definition eda_group.h:78
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:528
virtual EDA_GROUP * GetParentGroup() const
Definition eda_item.h:118
KICAD_T Type() const
Returns the type of object.
Definition eda_item.h:112
virtual bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const
Compare the item against the search criteria in aSearchData.
Definition eda_item.h:413
virtual void SetParentGroup(EDA_GROUP *aGroup)
Definition eda_item.h:117
EDA_ITEM * GetParent() const
Definition eda_item.h:114
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
Definition eda_item.cpp:41
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:67
bool IsLayerVisible(int aLayer) const
Return information about visibility of a particular layer.
Definition view.h:431
Definition kiid.h:48
Base plotter engine class.
Definition plotter.h:136
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.
Holds all the data relating to one schematic.
Definition schematic.h:89
A set of SCH_ITEMs (i.e., without duplicates).
Definition sch_group.h:52
SCH_GROUP * DeepDuplicate(bool addToParentGroup, SCH_COMMIT *aCommit=nullptr) const
void Move(const VECTOR2I &aMoveVector) override
Move the item by aMoveVector to a new position.
std::vector< int > ViewGetLayers() const override
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
void Rotate(const VECTOR2I &aCenter, bool aRotateCCW) override
Rotate the item around aCenter 90 degrees in the clockwise direction.
double Similarity(const SCH_ITEM &aOther) const override
Return a measure of how likely the other object is to represent the same object.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
Definition sch_group.cpp:78
static bool WithinScope(SCH_ITEM *aItem, SCH_GROUP *aScope, bool isSymbolEditor)
bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const override
Compare the item against the search criteria in aSearchData.
bool operator==(const SCH_GROUP &aOther) 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.
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
Definition sch_group.cpp:59
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
SCH_GROUP * DeepClone() const
double ViewGetLOD(int aLayer, const KIGFX::VIEW *aView) const override
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...
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
void RunOnChildren(const std::function< void(SCH_ITEM *)> &aFunction, RECURSE_MODE aMode) override
void SetPosition(const VECTOR2I &aNewpos) override
std::unordered_set< SCH_ITEM * > GetSchItems() const
static EDA_GROUP * TopLevelGroup(SCH_ITEM *aItem, EDA_GROUP *aScope, bool isSymbolEditor)
void swapData(SCH_ITEM *aImage) override
Swap the internal data structures aItem with the schematic item.
void MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
void Plot(PLOTTER *aPlotter, bool aBackground, const SCH_PLOT_OPTS &aPlotOpts, int aUnit, int aBodyStyle, const VECTOR2I &aOffset, bool aDimmed) override
Plot the item to aPlotter.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
VECTOR2I GetPosition() const override
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition sch_item.h:168
SCH_ITEM * Duplicate(bool addToParentGroup, SCH_COMMIT *aCommit=nullptr, bool doClone=false) const
Routine to create a new copy of given item.
Definition sch_item.cpp:164
void SetLocked(bool aLocked) override
Definition sch_item.h:257
SCHEMATIC * Schematic() const
Search the item hierarchy to find a SCHEMATIC.
Definition sch_item.cpp:272
bool IsLocked() const override
Definition sch_item.cpp:152
void SetLayer(SCH_LAYER_ID aLayer)
Definition sch_item.h:345
SCH_ITEM(EDA_ITEM *aParent, KICAD_T aType, int aUnit=0, int aBodyStyle=0)
Definition sch_item.cpp:56
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition sch_sheet.h:48
Schematic symbol object.
Definition sch_symbol.h:76
A base class for LIB_SYMBOL and SCH_SYMBOL.
Definition symbol.h:63
This file is part of the common library.
#define _(s)
RECURSE_MODE
Definition eda_item.h:52
@ RECURSE
Definition eda_item.h:53
@ NO_RECURSE
Definition eda_item.h:54
INSPECT_RESULT
Definition eda_item.h:46
std::set< EDA_ITEM *, CompareByUuid > EDA_ITEM_SET
Definition eda_item.h:582
const INSPECTOR_FUNC & INSPECTOR
std::function passed to nested users by ref, avoids copying std::function.
Definition eda_item.h:93
#define IGNORE_PARENT_GROUP
Definition eda_item.h:57
#define ENDPOINT
ends. (Used to support dragging.)
std::uint32_t EDA_ITEM_FLAGS
#define STARTPOINT
When a line is selected, these flags indicate which.
@ LAYER_SCHEMATIC_ANCHOR
Definition layer_ids.h:502
@ LAYER_GROUP
Definition layer_ids.h:505
Message panel definition file.
#define _HKI(x)
Definition page_info.cpp:44
#define TYPE_HASH(x)
Definition property.h:74
#define REGISTER_TYPE(x)
static struct SCH_GROUP_DESC _SCH_GROUP_DESC
EDA_GROUP * getNestedGroup(SCH_ITEM *aItem, EDA_GROUP *aScope, bool isSymbolEditor)
Returns the top level group inside the aScope group, or nullptr.
EDA_GROUP * getClosestGroup(SCH_ITEM *aItem, bool isSymbolEditor)
Class to handle a set of SCH_ITEMs.
wxString UnescapeString(const wxString &aSource)
int delta
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition typeinfo.h:75
@ SCH_GROUP_T
Definition typeinfo.h:174
@ SCH_LINE_T
Definition typeinfo.h:164
@ LIB_SYMBOL_T
Definition typeinfo.h:149
@ SCH_SYMBOL_T
Definition typeinfo.h:173
@ SCH_SHEET_T
Definition typeinfo.h:176
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:687