KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_item.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) 2006 Jean-Pierre Charras, [email protected]
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, see <https://www.gnu.org/licenses/>.
19 */
20
21#include <pgm_base.h>
23#include <eeschema_settings.h>
24#include <eda_item.h>
25#include <sch_connection.h>
26#include <sch_group.h>
27#include <sch_rule_area.h>
28#include <sch_draw_panel.h>
29#include <sch_edit_frame.h>
30#include <connection_graph.h>
31#include <netclass.h>
35#include <properties/property.h>
37
38
39// Rendering fonts is expensive (particularly when using outline fonts). At small effective
40// sizes (ie: zoomed out) the visual differences between outline and/or stroke fonts and the
41// bitmap font becomes immaterial, and there's often more to draw when zoomed out so the
42// performance gain becomes more significant.
43#define BITMAP_FONT_SIZE_THRESHOLD 3
44
45
46static const std::vector<KICAD_T> labelTypes = { SCH_LABEL_LOCATE_ANY_T };
47
48
49/* Constructor and destructor for SCH_ITEM */
50/* They are not inline because this creates problems with gcc at linking time in debug mode */
51
52SCH_ITEM::SCH_ITEM( EDA_ITEM* aParent, KICAD_T aType, int aUnit, int aBodyStyle ) :
53 EDA_ITEM( aParent, aType, true, false ),
54 m_unit( aUnit ),
55 m_bodyStyle( aBodyStyle ),
56 m_private( false ),
57 m_isLocked( false )
58{
59 m_layer = LAYER_WIRE; // It's only a default, in fact
61 m_connectivity_dirty = false; // Item is unconnected until it is placed, so it's clean
62}
63
64
66 EDA_ITEM( aItem )
67{
68 m_layer = aItem.m_layer;
69 m_unit = aItem.m_unit;
71 m_private = aItem.m_private;
74 m_isLocked = aItem.m_isLocked;
75}
76
77
79{
80 m_layer = aItem.m_layer;
81 m_unit = aItem.m_unit;
83 m_private = aItem.m_private;
86 m_isLocked = aItem.m_isLocked;
87
88 return *this;
89}
90
91
93{
94 for( const auto& weakOwner : m_connectivityOwners )
95 {
96 if( const auto owner = weakOwner.lock() )
97 owner->graph->RemoveItem( this );
98 }
99
100 for( const auto& it : m_connection_map )
101 delete it.second;
102
103 // Remove this item from any rule areas that contain it
104 for( SCH_RULE_AREA* ruleArea : m_rule_areas_cache )
105 ruleArea->RemoveItem( this );
106}
107
108
109void SCH_ITEM::registerConnectivityOwner( const std::shared_ptr<CONNECTION_GRAPH_LIFETIME>& aOwner )
110{
111 std::erase_if( m_connectivityOwners, []( const auto& owner ) { return owner.expired(); } );
112
113 for( const auto& owner : m_connectivityOwners )
114 {
115 if( owner.lock() == aOwner )
116 return;
117 }
118
119 m_connectivityOwners.emplace_back( aOwner );
120}
121
122
124{
125 switch( Type() )
126 {
127 case SCH_SYMBOL_T:
128 case SCH_PIN_T:
129 case SCH_SHAPE_T:
130 case SCH_BITMAP_T:
131 case SCH_FIELD_T:
132 case SCH_TEXT_T:
133 case SCH_TEXTBOX_T:
134 case SCH_TABLE_T:
135 case SCH_GROUP_T:
136 case SCH_LINE_T:
137 case SCH_JUNCTION_T:
138 case SCH_NO_CONNECT_T:
141 case SCH_LABEL_T:
143 case SCH_HIER_LABEL_T:
144 case SCH_RULE_AREA_T:
146 case SCH_SHEET_T:
147 return true;
148
149 // Don't group sheet pins directly, they go along with an SCH_SHEET, and all operations
150 // should be performed on that sheet.
151 case SCH_SHEET_PIN_T:
152 default:
153 return false;
154 }
155}
156
157
159{
161 {
162 if( group->AsEdaItem()->IsLocked() )
163 return true;
164 }
165
166 return m_isLocked;
167}
168
169
170SCH_ITEM* SCH_ITEM::Duplicate( bool addToParentGroup, SCH_COMMIT* aCommit, bool doClone ) const
171{
172 SCH_ITEM* newItem = (SCH_ITEM*) Clone();
173
174 if( !doClone )
175 const_cast<KIID&>( newItem->m_Uuid ) = KIID();
176
177 newItem->ClearFlags( SELECTED | BRIGHTENED );
178
179 newItem->RunOnChildren(
180 [renewIdentity = !doClone && Type() == SCH_SYMBOL_T]( SCH_ITEM* aChild )
181 {
182 if( renewIdentity )
183 const_cast<KIID&>( aChild->m_Uuid ) = KIID();
184
185 aChild->ClearFlags( SELECTED | BRIGHTENED );
186 },
188
189 if( addToParentGroup )
190 {
191 wxCHECK_MSG( aCommit, newItem, "Must supply a commit to update parent group" );
192
193 if( EDA_GROUP* group = newItem->GetParentGroup() )
194 {
195 aCommit->Modify( group->AsEdaItem(), nullptr, RECURSE_MODE::NO_RECURSE );
196 group->AddItem( newItem );
197 }
198 }
199
200 return newItem;
201}
202
203
204wxString SCH_ITEM::GetUnitDisplayName( int aUnit, bool aLabel ) const
205{
206 if( aUnit == 0 )
207 return aLabel ? _( "All units" ) : wxString( _HKI( "All units" ) );
208 else if( const SYMBOL* symbol = GetParentSymbol() )
209 return symbol->GetUnitDisplayName( aUnit, aLabel );
210
211 return wxEmptyString;
212}
213
214
215wxString SCH_ITEM::GetBodyStyleDescription( int aBodyStyle, bool aLabel ) const
216{
217 if( aBodyStyle == 0 )
218 return aLabel ? _( "All body styles" ) : wxString( _HKI( "All body styles" ) );
219 else if( const SYMBOL* symbol = GetParentSymbol() )
220 return symbol->GetBodyStyleDescription( aBodyStyle, aLabel );
221
222 return wxEmptyString;
223}
224
225
226void SCH_ITEM::SetUnitString( const wxString& aUnit )
227{
228 if( aUnit == _HKI( "All units" ) )
229 {
230 m_unit = 0;
231 return;
232 }
233
234 if( SYMBOL* symbol = GetParentSymbol() )
235 {
236 for( int ii = 1; ii <= symbol->GetUnitCount(); ii++ )
237 {
238 if( symbol->GetUnitDisplayName( ii, false ) == aUnit )
239 {
240 m_unit = ii;
241 return;
242 }
243 }
244 }
245}
246
247
249{
250 return GetUnitDisplayName( m_unit, false );
251}
252
253void SCH_ITEM::SetBodyStyleProp( const wxString& aBodyStyle )
254{
255 if( aBodyStyle == _HKI( "All body styles" ) )
256 {
257 m_bodyStyle = 0;
258 return;
259 }
260
261 if( SYMBOL* symbol = GetParentSymbol() )
262 {
263 for( int bodyStyle : { BODY_STYLE::BASE, BODY_STYLE::DEMORGAN } )
264 {
265 if( symbol->GetBodyStyleDescription( bodyStyle, false ) == aBodyStyle )
266 {
267 m_bodyStyle = bodyStyle;
268 return;
269 }
270 }
271 }
272}
273
274
276{
277 return GetBodyStyleDescription( m_bodyStyle, false );
278}
279
280
282{
283 return static_cast<SCHEMATIC*>( findParent( SCHEMATIC_T ) );
284}
285
286
288{
289 if( SYMBOL* sch_symbol = static_cast<SCH_SYMBOL*>( findParent( SCH_SYMBOL_T ) ) )
290 return sch_symbol;
291
292 if( SYMBOL* lib_symbol = static_cast<LIB_SYMBOL*>( findParent( LIB_SYMBOL_T ) ) )
293 return lib_symbol;
294
295 return nullptr;
296}
297
298
300{
301 if( SYMBOL* sch_symbol = static_cast<SCH_SYMBOL*>( findParent( SCH_SYMBOL_T ) ) )
302 return sch_symbol;
303
304 if( SYMBOL* lib_symbol = static_cast<LIB_SYMBOL*>( findParent( LIB_SYMBOL_T ) ) )
305 return lib_symbol;
306
307 return nullptr;
308}
309
310
312 const wxString& aVariantName ) const
313{
314 if( GetExcludedFromSim( aInstance, aVariantName ) )
315 return true;
316
317 for( SCH_RULE_AREA* area : m_rule_areas_cache )
318 {
319 if( area->GetExcludedFromSim( aInstance, aVariantName ) )
320 return true;
321 }
322
323 return false;
324}
325
326
328 const wxString& aVariantName ) const
329{
330 if( GetExcludedFromBOM( aInstance, aVariantName ) )
331 return true;
332
333 for( SCH_RULE_AREA* area : m_rule_areas_cache )
334 {
335 if( area->GetExcludedFromBOM( aInstance, aVariantName ) )
336 return true;
337 }
338
339 return false;
340}
341
342
344 const wxString& aVariantName ) const
345{
346 if( GetExcludedFromBoard( aInstance, aVariantName ) )
347 return true;
348
349 for( SCH_RULE_AREA* area : m_rule_areas_cache )
350 {
351 if( area->GetExcludedFromBoard( aInstance, aVariantName ) )
352 return true;
353 }
354
355 return false;
356}
357
358
360 const wxString& aVariantName ) const
361{
362 if( GetExcludedFromPosFiles( aInstance, aVariantName ) )
363 return true;
364
365 for( SCH_RULE_AREA* area : m_rule_areas_cache )
366 {
367 if( area->GetExcludedFromPosFiles( aInstance, aVariantName ) )
368 return true;
369 }
370
371 return false;
372}
373
374
375bool SCH_ITEM::ResolveDNP( const SCH_SHEET_PATH* aInstance, const wxString& aVariantName ) const
376{
377 if( GetDNP( aInstance, aVariantName ) )
378 return true;
379
380 for( SCH_RULE_AREA* area : m_rule_areas_cache )
381 {
382 if( area->GetDNP( aInstance, aVariantName ) )
383 return true;
384 }
385
386 return false;
387}
388
389
390wxString SCH_ITEM::ResolveText( const wxString& aText, const SCH_SHEET_PATH* aPath, int aDepth ) const
391{
392 const SCHEMATIC* schematic = Schematic();
393 return ResolveText( aText, aPath, aDepth, schematic ? schematic->GetCurrentVariant() : wxString() );
394}
395
396
397wxString SCH_ITEM::ResolveText( const wxString& aText, const SCH_SHEET_PATH* aPath, int aDepth,
398 const wxString& aVariantName ) const
399{
400 // Use aDepth to track recursion across nested GetShownText/ResolveText calls
401 int depth = aDepth;
402
403 std::function<bool( wxString* )> libSymbolResolver =
404 [&]( wxString* token ) -> bool
405 {
406 LIB_SYMBOL* symbol = static_cast<LIB_SYMBOL*>( m_parent );
407 return symbol->ResolveTextVar( token, depth + 1 );
408 };
409
410 std::function<bool( wxString* )> symbolResolver =
411 [&]( wxString* token ) -> bool
412 {
413 SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( m_parent );
414 return symbol->ResolveTextVar( aPath, token, aVariantName, depth + 1 );
415 };
416
417 std::function<bool( wxString* )> schematicResolver =
418 [&]( wxString* token ) -> bool
419 {
420 if( !aPath )
421 return false;
422
423 if( SCHEMATIC* schematic = Schematic() )
424 return schematic->ResolveTextVar( aPath, token, depth + 1 );
425
426 return false;
427 };
428
429 std::function<bool( wxString* )> sheetResolver =
430 [&]( wxString* token ) -> bool
431 {
432 if( !aPath )
433 return false;
434
435 SCH_SHEET* sheet = static_cast<SCH_SHEET*>( m_parent );
436
437 SCHEMATIC* schematic = Schematic();
438 SCH_SHEET_PATH path = *aPath;
439 path.push_back( sheet );
440
441 bool retval = sheet->ResolveTextVar( &path, token, depth + 1 );
442
443 if( schematic )
444 retval |= schematic->ResolveTextVar( &path, token, depth + 1 );
445
446 return retval;
447 };
448
449 std::function<bool( wxString* )> labelResolver =
450 [&]( wxString* token ) -> bool
451 {
452 if( !aPath )
453 return false;
454
455 SCH_LABEL_BASE* label = static_cast<SCH_LABEL_BASE*>( m_parent );
456 return label->ResolveTextVar( aPath, token, depth + 1 );
457 };
458
459 // Create a unified resolver that delegates to the appropriate resolver based on parent type
460 std::function<bool( wxString* )> fieldResolver =
461 [&]( wxString* token ) -> bool
462 {
463 bool resolved = false;
464
465 if( m_parent && m_parent->Type() == LIB_SYMBOL_T )
466 resolved = libSymbolResolver( token );
467 else if( m_parent && m_parent->Type() == SCH_SYMBOL_T )
468 resolved = symbolResolver( token );
469 else if( m_parent && m_parent->Type() == SCH_SHEET_T )
470 resolved = sheetResolver( token );
471 else if( m_parent && m_parent->IsType( labelTypes ) )
472 resolved = labelResolver( token );
473 else if( Schematic() )
474 {
475 // Project-level and schematic-level variables
476 resolved = Schematic()->Project().TextVarResolver( token );
477 resolved |= schematicResolver( token );
478 }
479
480 return resolved;
481 };
482
483 return ResolveTextVars( aText, &fieldResolver, depth );
484}
485
486
487std::vector<int> SCH_ITEM::ViewGetLayers() const
488{
489 // Basic fallback
491}
492
493
494bool SCH_ITEM::IsConnected( const VECTOR2I& aPosition ) const
495{
496 if(( m_flags & STRUCT_DELETED ) || ( m_flags & SKIP_STRUCT ) )
497 return false;
498
499 return doIsConnected( aPosition );
500}
501
502
504{
505 if( !IsConnectable() )
506 return nullptr;
507
508 if( !aSheet )
509 {
510 SCHEMATIC* sch = Schematic();
511
512 if( !sch )
513 return nullptr; // Item has been removed from schematic (e.g. SCH_PIN during symbol deletion)
514
515 aSheet = &sch->CurrentSheet();
516 }
517
518 auto it = m_connection_map.find( *aSheet );
519
520 if( it == m_connection_map.end() )
521 return nullptr;
522 else
523 return it->second;
524}
525
526
528{
529 for( auto& [path, conn] : m_connection_map )
530 {
531 conn->SetGraph( aGraph );
532
533 for( auto& member : conn->AllMembers() )
534 member->SetGraph( aGraph );
535 }
536}
537
538
539std::optional<wxString> SCH_ITEM::GetConnectionName( const SCH_SHEET_PATH* aSheet, bool aLocal,
540 bool aIgnoreSheet ) const
541{
542 if( const SCH_CONNECTION* connection = Connection( aSheet ) )
543 return aLocal ? connection->LocalName() : connection->Name( aIgnoreSheet );
544
545 return std::nullopt;
546}
547
548
550{
551 const SCH_CONNECTION* connection = Connection( aSheet );
552 return connection && connection->IsBus();
553}
554
555
556std::shared_ptr<NETCLASS> SCH_ITEM::GetEffectiveNetClass( const SCH_SHEET_PATH* aSheet ) const
557{
558 static std::shared_ptr<NETCLASS> nullNetclass = std::make_shared<NETCLASS>( wxEmptyString );
559
560 SCHEMATIC* schematic = Schematic();
561
562 if( !schematic || !schematic->IsValid() )
563 return nullNetclass;
564
565 std::shared_ptr<NET_SETTINGS>& netSettings = schematic->Project().GetProjectFile().m_NetSettings;
566
567 if( !netSettings )
568 return nullNetclass;
569
570 if( const auto name = GetConnectionName( aSheet ) )
571 return netSettings->GetEffectiveNetClass( *name );
572
573 if( std::shared_ptr<NETCLASS> defaultNetclass = netSettings->GetDefaultNetclass() )
574 return defaultNetclass;
575
576 return nullNetclass;
577}
578
579
581{
582 auto it = m_connected_items.find( aSheet );
583
584 if( it != m_connected_items.end() )
585 it->second.clear();
586}
587
588
589const std::vector<SCH_ITEM*>& SCH_ITEM::ConnectedItems( const SCH_SHEET_PATH& aSheet ) const
590{
591 static const std::vector<SCH_ITEM*> empty;
592 const auto it = m_connected_items.find( aSheet );
593 return it == m_connected_items.end() ? empty : it->second;
594}
595
596
598{
599 std::vector<SCH_ITEM*>& vec = m_connected_items[ aSheet ];
600
601 // The vector elements are small, so reserve 1k at a time to prevent re-allocations
602 if( vec.size() == vec.capacity() )
603 vec.reserve( vec.size() + 4096 );
604
605 // Add item to the correct place in the sorted vector if it is not already there
606 auto it = std::lower_bound( vec.begin(), vec.end(), aItem );
607
608 if( it == vec.end() || *it != aItem )
609 vec.insert( it, aItem );
610}
611
612
614 CONNECTION_GRAPH* aGraph )
615{
616 SCH_CONNECTION* connection = Connection( &aSheet );
617
618 // N.B. Do not clear the dirty connectivity flag here because we may need
619 // to create a connection for a different sheet, and we don't want to
620 // skip the connection creation because the flag is cleared.
621 if( connection )
622 {
623 connection->Reset();
624 }
625 else
626 {
627 connection = new SCH_CONNECTION( this );
628 m_connection_map.insert( std::make_pair( aSheet, connection ) );
629 }
630
631 connection->SetGraph( aGraph );
632 connection->SetSheet( aSheet );
633 return connection;
634}
635
636
638 CONNECTION_GRAPH* aGraph )
639{
640 if( !IsConnectable() )
641 return nullptr;
642
643 SCH_CONNECTION* connection = Connection( &aSheet );
644
645 if( connection )
646 return connection;
647 else
648 return InitializeConnection( aSheet, aGraph );
649}
650
651
652const wxString& SCH_ITEM::GetCachedDriverName() const
653{
654 static wxString s_empty;
655 return s_empty;
656}
657
658
660{
662}
663
664
666{
667 if( aImage == nullptr )
668 return;
669
670 EDA_ITEM* parent = GetParent();
671
672 SwapFlags( aImage );
673 std::swap( m_layer, aImage->m_layer );
674 std::swap( m_unit, aImage->m_unit );
675 std::swap( m_bodyStyle, aImage->m_bodyStyle );
676 std::swap( m_private, aImage->m_private );
677 std::swap( m_fieldsAutoplaced, aImage->m_fieldsAutoplaced );
678 std::swap( m_customProperties, aImage->m_customProperties );
679
680 // Don't swap m_group. Group membership is restored by SCH_GROUP::swapData, and the undo copy
681 // has no group, so swapping it here would drop the item out of its group.
682 std::swap( m_isLocked, aImage->m_isLocked );
683 swapData( aImage );
684
685 SetParent( parent );
686}
687
688
690{
691 EDA_ITEM_FLAGS editFlags = GetEditFlags();
692 EDA_ITEM_FLAGS tempFlags = GetTempFlags();
693 EDA_ITEM_FLAGS aItem_editFlags = aItem->GetEditFlags();
694 EDA_ITEM_FLAGS aItem_tempFlags = aItem->GetTempFlags();
695
696 std::swap( m_flags, aItem->m_flags );
697
699 SetFlags( editFlags );
701 SetFlags( tempFlags );
702
703 aItem->ClearEditFlags();
704 aItem->SetFlags( aItem_editFlags );
705 aItem->ClearTempFlags();
706 aItem->SetFlags( aItem_tempFlags );
707}
708
709
711{
712 auto clearTextCaches =
713 []( SCH_ITEM* aItem )
714 {
715 EDA_TEXT* text = dynamic_cast<EDA_TEXT*>( aItem );
716
717 if( text )
718 {
719 text->ClearBoundingBoxCache();
720 text->ClearRenderCache();
721 }
722 };
723
724 clearTextCaches( this );
725
726 RunOnChildren( clearTextCaches, RECURSE_MODE::NO_RECURSE );
727}
728
729
730bool SCH_ITEM::operator==( const SCH_ITEM& aOther ) const
731{
732 if( Type() != aOther.Type() )
733 return false;
734
735 return compare( aOther, ~COMPARE_FLAGS::UUID ) == 0;
736}
737
738
739bool SCH_ITEM::operator<( const SCH_ITEM& aOther ) const
740{
741 if( Type() != aOther.Type() )
742 return Type() < aOther.Type();
743
744 return ( compare( aOther ) < 0 );
745}
746
747
748bool SCH_ITEM::cmp_items::operator()( const SCH_ITEM* aFirst, const SCH_ITEM* aSecond ) const
749{
750 return aFirst->compare( *aSecond, ~COMPARE_FLAGS::UUID ) < 0;
751}
752
753
754int SCH_ITEM::compare( const SCH_ITEM& aOther, int aCompareFlags ) const
755{
756 if( Type() != aOther.Type() )
757 return Type() - aOther.Type();
758
759 if( aCompareFlags & SCH_ITEM::COMPARE_FLAGS::UNIT )
760 {
761 if( m_unit != aOther.m_unit )
762 return m_unit - aOther.m_unit;
763
764 if( m_bodyStyle != aOther.m_bodyStyle )
765 return m_bodyStyle - aOther.m_bodyStyle;
766 }
767
768 if( IsPrivate() != aOther.IsPrivate() )
769 return IsPrivate() ? 1 : -1;
770
771 if( aCompareFlags & COMPARE_FLAGS::POSITION )
772 {
773 if( GetPosition().x != aOther.GetPosition().x )
774 return GetPosition().x - aOther.GetPosition().x;
775
776 if( GetPosition().y != aOther.GetPosition().y )
777 return GetPosition().y - aOther.GetPosition().y;
778 }
779
780 if( aCompareFlags & COMPARE_FLAGS::UUID )
781 {
782 if( m_Uuid < aOther.m_Uuid )
783 return -1;
784
785 if( m_Uuid > aOther.m_Uuid )
786 return 1;
787 }
788
789 return 0;
790}
791
792
794{
795 if( SCHEMATIC* schematic = Schematic() )
796 return schematic->Settings().m_MaxError;
797 else
798 return schIUScale.mmToIU( ARC_LOW_DEF_MM );
799}
800
801
802const wxString& SCH_ITEM::GetDefaultFont( const RENDER_SETTINGS* aSettings ) const
803{
804 static wxString defaultName = KICAD_FONT_NAME;
805
806 if( aSettings )
807 return aSettings->GetDefaultFont();
808 else if( EESCHEMA_SETTINGS* cfg = GetAppSettings<EESCHEMA_SETTINGS>( "eeschema" ) )
809 return cfg->m_Appearance.default_font;
810 else
811 return defaultName;
812}
813
814
816{
817 if( SCHEMATIC* schematic = Schematic() )
818 return schematic->Settings().m_FontMetrics;
819
821}
822
823
825{
826 // For historical reasons, a stored value of 0 means "default width" and negative
827 // numbers meant "don't stroke".
828
829 if( GetPenWidth() < 0 )
830 {
831 return 0;
832 }
833 else if( GetPenWidth() == 0 )
834 {
835 if( GetParent() && GetParent()->Type() == LIB_SYMBOL_T )
836 return std::max( aSettings->m_SymbolLineWidth, aSettings->GetMinPenWidth() );
837 else
838 return std::max( aSettings->GetDefaultPenWidth(), aSettings->GetMinPenWidth() );
839 }
840 else
841 {
842 return std::max( GetPenWidth(), aSettings->GetMinPenWidth() );
843 }
844}
845
846
847bool SCH_ITEM::RenderAsBitmap( double aWorldScale ) const
848{
849 if( HasHypertext() )
850 return false;
851
852 if( const EDA_TEXT* text = dynamic_cast<const EDA_TEXT*>( this ) )
853 return text->GetTextHeight() * aWorldScale < BITMAP_FONT_SIZE_THRESHOLD;
854
855 return false;
856}
857
858
859void SCH_ITEM::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
860{
861 if( SYMBOL* symbol = GetParentSymbol() )
862 {
863 if( symbol->IsMultiUnit() )
864 aList.emplace_back( _( "Unit" ), GetUnitDisplayName( GetUnit(), false ) );
865
866 if( symbol->IsMultiBodyStyle() )
867 aList.emplace_back( _( "Body Style" ), GetBodyStyleDescription( GetBodyStyle(), true ) );
868
869 if( dynamic_cast<LIB_SYMBOL*>( symbol ) && IsPrivate() )
870 aList.emplace_back( _( "Private" ), wxEmptyString );
871 }
872}
873
874
875const std::vector<wxString>* SCH_ITEM::GetEmbeddedFonts()
876{
877 if( SCHEMATIC* schematic = Schematic() )
878 return schematic->GetEmbeddedFiles()->GetFontFiles();
879
880 if( SYMBOL* symbol = GetParentSymbol() )
881 {
882 if( EMBEDDED_FILES* symbolEmbeddedFiles = symbol->GetEmbeddedFiles() )
883 return symbolEmbeddedFiles->UpdateFontFiles();
884 }
885
886 return nullptr;
887}
888
889
890static struct SCH_ITEM_DESC
891{
893 {
897
898 propMgr.AddProperty( new PROPERTY<SCH_ITEM, bool>( _HKI( "Locked" ),
901
902 auto multiUnit =
903 [=]( INSPECTABLE* aItem ) -> bool
904 {
905 if( SCH_ITEM* schItem = dynamic_cast<SCH_ITEM*>( aItem ) )
906 {
907 if( const SYMBOL* symbol = schItem->GetParentSymbol() )
908 return symbol->IsMultiUnit();
909 }
910
911 return false;
912 };
913
914 auto multiBodyStyle =
915 [=]( INSPECTABLE* aItem ) -> bool
916 {
917 if( SCH_ITEM* schItem = dynamic_cast<SCH_ITEM*>( aItem ) )
918 {
919 if( const SYMBOL* symbol = schItem->GetParentSymbol() )
920 return symbol->IsMultiBodyStyle();
921 }
922
923 return false;
924 };
925
926 propMgr.AddProperty( new PROPERTY<SCH_ITEM, wxString>( _HKI( "Unit" ),
928 .SetAvailableFunc( multiUnit )
930 .SetChoicesFunc( []( INSPECTABLE* aItem )
931 {
932 wxPGChoices choices;
933 choices.Add( _HKI( "All units" ), 0 );
934
935 if( SCH_ITEM* item = dynamic_cast<SCH_ITEM*>( aItem ) )
936 {
937 if( SYMBOL* symbol = item->GetParentSymbol() )
938 {
939 for( int ii = 1; ii <= symbol->GetUnitCount(); ii++ )
940 choices.Add( symbol->GetUnitDisplayName( ii, false ), ii );
941 }
942 }
943
944 return choices;
945 } );
946
947
948 propMgr.AddProperty( new PROPERTY<SCH_ITEM, wxString>( _HKI( "Body Style" ),
950 .SetAvailableFunc( multiBodyStyle )
952 .SetChoicesFunc( []( INSPECTABLE* aItem )
953 {
954 wxPGChoices choices;
955 choices.Add( _HKI( "All body styles" ) );
956
957 if( SCH_ITEM* item = dynamic_cast<SCH_ITEM*>( aItem ) )
958 {
959 if( SYMBOL* symbol = item->GetParentSymbol() )
960 {
961 for( int ii : { BODY_STYLE::BASE, BODY_STYLE::DEMORGAN } )
962 choices.Add( symbol->GetBodyStyleDescription( ii, false ) );
963 }
964 }
965
966 return choices;
967 } );
968
969 propMgr.AddProperty( new PROPERTY<SCH_ITEM, bool>( _HKI( "Private" ),
972 }
974
976
977
978static bool lessYX( const DANGLING_END_ITEM& a, const DANGLING_END_ITEM& b )
979{
980 const auto aPos = a.GetPosition();
981 const auto bPos = b.GetPosition();
982 return aPos.y < bPos.y ? true : ( aPos.y > bPos.y ? false : aPos.x < bPos.x );
983};
984
985
986static bool lessType( const DANGLING_END_ITEM& a, const DANGLING_END_ITEM& b )
987{
988 return a.GetType() < b.GetType();
989};
990
991
992std::vector<DANGLING_END_ITEM>::iterator
993DANGLING_END_ITEM_HELPER::get_lower_pos( std::vector<DANGLING_END_ITEM>& aItemListByPos,
994 const VECTOR2I& aPos )
995{
996 DANGLING_END_ITEM needle = DANGLING_END_ITEM( PIN_END, nullptr, aPos );
997 auto start = aItemListByPos.begin();
998 auto end = aItemListByPos.end();
999 return std::lower_bound( start, end, needle, lessYX );
1000}
1001
1002
1003std::vector<DANGLING_END_ITEM>::iterator
1004DANGLING_END_ITEM_HELPER::get_lower_type( std::vector<DANGLING_END_ITEM>& aItemListByType,
1005 const DANGLING_END_T& aType )
1006{
1007 DANGLING_END_ITEM needle = DANGLING_END_ITEM( aType, nullptr, VECTOR2I{} );
1008 auto start = aItemListByType.begin();
1009 auto end = aItemListByType.end();
1010 return std::lower_bound( start, end, needle, lessType );
1011}
1012
1013
1015 std::vector<DANGLING_END_ITEM>& aItemListByType,
1016 std::vector<DANGLING_END_ITEM>& aItemListByPos )
1017{
1018 // WIRE_END pairs must be kept together. Hence stable sort.
1019 std::stable_sort( aItemListByType.begin(), aItemListByType.end(), lessType );
1020
1021 // Sort by y first, pins are more likely to share x than y.
1022 std::sort( aItemListByPos.begin(), aItemListByPos.end(), lessYX );
1023}
const char * name
constexpr EDA_IU_SCALE schIUScale
Definition base_units.h:123
constexpr double ARC_LOW_DEF_MM
Definition base_units.h:127
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE)
Modify a given item in the model.
Definition commit.h:102
static std::vector< DANGLING_END_ITEM >::iterator get_lower_type(std::vector< DANGLING_END_ITEM > &aItemListByType, const DANGLING_END_T &aType)
static std::vector< DANGLING_END_ITEM >::iterator get_lower_pos(std::vector< DANGLING_END_ITEM > &aItemListByPos, const VECTOR2I &aPos)
Definition sch_item.cpp:993
static void sort_dangling_end_items(std::vector< DANGLING_END_ITEM > &aItemListByType, std::vector< DANGLING_END_ITEM > &aItemListByPos)
Both contain the same information.
Helper class used to store the state of schematic items that can be connected to other schematic item...
Definition sch_item.h:96
DANGLING_END_T GetType() const
Definition sch_item.h:132
The base class for create windows for drawing purpose.
A set of EDA_ITEMs (i.e., without duplicates).
Definition eda_group.h:43
A base class for most all the KiCad significant classes used in schematics and boards.
Definition eda_item.h:98
virtual VECTOR2I GetPosition() const
Definition eda_item.h:348
virtual void ClearEditFlags()
Definition eda_item.h:178
EDA_ITEM_FLAGS GetEditFlags() const
Definition eda_item.h:170
void SetFlags(EDA_ITEM_FLAGS aMask)
Definition eda_item.h:158
const KIID m_Uuid
Definition eda_item.h:597
virtual EDA_GROUP * GetParentGroup() const
Definition eda_item.h:116
KICAD_T Type() const
Returns the type of object.
Definition eda_item.h:110
void ClearFlags(EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
Definition eda_item.h:160
EDA_ITEM_FLAGS m_flags
Definition eda_item.h:606
EDA_ITEM_FLAGS GetTempFlags() const
Definition eda_item.h:183
std::map< wxString, wxString > m_customProperties
Definition eda_item.h:615
EDA_ITEM * GetParent() const
Definition eda_item.h:112
virtual EDA_ITEM * Clone() const
Create a duplicate of this item with linked list members set to NULL.
Definition eda_item.cpp:278
virtual void SetParent(EDA_ITEM *aParent)
Definition eda_item.cpp:153
EDA_ITEM * m_parent
Owner.
Definition eda_item.h:607
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
Definition eda_item.cpp:84
virtual void ClearTempFlags()
Definition eda_item.h:191
EDA_ITEM * findParent(KICAD_T aType) const
Definition eda_item.cpp:137
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition eda_text.h:94
Class that other classes need to inherit from, in order to be inspectable.
Definition inspectable.h:39
static const METRICS & Default()
Definition font.cpp:48
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
const wxString & GetDefaultFont() const
Definition kiid.h:46
bool ResolveTextVar(wxString *token, int aDepth=0) const
Resolve any references to system tokens supported by the symbol.
std::shared_ptr< NET_SETTINGS > m_NetSettings
Net settings for this project (owned here)
virtual bool TextVarResolver(wxString *aToken) const
Definition project.cpp:81
virtual PROJECT_FILE & GetProjectFile() const
Definition project.h:201
PROPERTY_BASE & SetChoicesFunc(std::function< wxPGChoices(INSPECTABLE *)> aFunc)
Definition property.h:277
PROPERTY_BASE & SetAvailableFunc(std::function< bool(INSPECTABLE *)> aFunc)
Set a callback function to determine whether an object provides this property.
Definition property.h:263
PROPERTY_BASE & SetIsHiddenFromDesignEditors(bool aIsHidden=true)
Definition property.h:346
PROPERTY_BASE & SetIsHiddenFromLibraryEditors(bool aIsHidden=true)
Definition property.h:339
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.
Holds all the data relating to one schematic.
Definition schematic.h:148
PROJECT & Project() const
Return a reference to the project this schematic is part of.
Definition schematic.h:170
wxString GetCurrentVariant() const
Return the current variant being edited.
bool ResolveTextVar(const SCH_SHEET_PATH *aSheetPath, wxString *token, int aDepth) const
bool IsValid() const
A simple test if the schematic is loaded, not a complete one.
Definition schematic.h:288
SCH_SHEET_PATH & CurrentSheet() const
Definition schematic.h:303
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
void Reset()
Clears connectivity information.
bool IsBus() const
void SetGraph(CONNECTION_GRAPH *aGraph)
void SetSheet(const SCH_SHEET_PATH &aSheet)
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition sch_item.h:165
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.
Definition sch_item.cpp:859
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:170
virtual bool IsConnectable() const
Definition sch_item.h:531
void SetLocked(bool aLocked) override
Definition sch_item.h:256
friend class CONNECTION_GRAPH
Definition sch_item.h:772
int m_unit
Definition sch_item.h:791
bool ResolveExcludedFromPosFiles(const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString) const
Definition sch_item.cpp:359
virtual int GetPenWidth() const
Definition sch_item.h:358
SCH_ITEM & operator=(const SCH_ITEM &aPin)
Definition sch_item.cpp:78
std::map< SCH_SHEET_PATH, std::vector< SCH_ITEM * >, SHEET_PATH_CMP > m_connected_items
Store pointers to other items that are connected to this one, per sheet.
Definition sch_item.h:799
void ClearConnectedItems(const SCH_SHEET_PATH &aPath)
Clear all connections to this item.
Definition sch_item.cpp:580
virtual bool doIsConnected(const VECTOR2I &aPosition) const
Provide the object specific test to see if it is connected to aPosition.
Definition sch_item.h:787
virtual void RunOnChildren(const std::function< void(SCH_ITEM *)> &aFunction, RECURSE_MODE aMode)
Definition sch_item.h:641
int m_bodyStyle
Definition sch_item.h:792
std::vector< std::weak_ptr< CONNECTION_GRAPH_LIFETIME > > m_connectivityOwners
An item may be indexed by multiple graphs, each with an independent lifetime.
Definition sch_item.h:819
const std::vector< wxString > * GetEmbeddedFonts() override
Definition sch_item.cpp:875
virtual ~SCH_ITEM()
Definition sch_item.cpp:92
const SYMBOL * GetParentSymbol() const
Definition sch_item.cpp:287
virtual wxString GetBodyStyleDescription(int aBodyStyle, bool aLabel) const
Definition sch_item.cpp:215
void SetPrivate(bool aPrivate)
Definition sch_item.h:252
virtual void swapData(SCH_ITEM *aItem)
Swap the internal data structures aItem with the schematic item.
Definition sch_item.cpp:659
virtual const wxString & GetCachedDriverName() const
Definition sch_item.cpp:652
SCHEMATIC * Schematic() const
Search the item hierarchy to find a SCHEMATIC.
Definition sch_item.cpp:281
int GetBodyStyle() const
Definition sch_item.h:247
std::vector< int > ViewGetLayers() const override
Return the layers the item is drawn on (which may be more than its "home" layer)
Definition sch_item.cpp:487
SCH_CONNECTION * InitializeConnection(const SCH_SHEET_PATH &aPath, CONNECTION_GRAPH *aGraph)
Create a new connection object associated with this object.
Definition sch_item.cpp:613
const std::vector< SCH_ITEM * > & ConnectedItems(const SCH_SHEET_PATH &aPath) const
Retrieve the set of items connected to this item on the given sheet.
Definition sch_item.cpp:589
virtual wxString GetUnitDisplayName(int aUnit, bool aLabel) const
Definition sch_item.cpp:204
bool IsLocked() const override
Definition sch_item.cpp:158
void AddConnectionTo(const SCH_SHEET_PATH &aPath, SCH_ITEM *aItem)
Add a connection link between this item and another.
Definition sch_item.cpp:597
friend class LIB_SYMBOL
Definition sch_item.h:812
virtual bool HasHypertext() const
Indicates that the item has at least one hypertext action.
Definition sch_item.h:332
virtual bool GetExcludedFromPosFiles(const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString) const
Definition sch_item.h:281
int GetUnit() const
Definition sch_item.h:237
std::shared_ptr< NETCLASS > GetEffectiveNetClass(const SCH_SHEET_PATH *aSheet=nullptr) const
Definition sch_item.cpp:556
virtual bool operator==(const SCH_ITEM &aOther) const
Definition sch_item.cpp:730
bool m_connectivity_dirty
Definition sch_item.h:804
bool IsPrivate() const
Definition sch_item.h:253
virtual void ClearCaches()
Definition sch_item.cpp:710
int GetMaxError() const
Definition sch_item.cpp:793
virtual bool GetExcludedFromBoard(const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString) const
Definition sch_item.h:274
virtual void SetBodyStyleProp(const wxString &aBodyStyle)
Definition sch_item.cpp:253
virtual wxString GetBodyStyleProp() const
Definition sch_item.cpp:275
bool RenderAsBitmap(double aWorldScale) const override
Definition sch_item.cpp:847
const wxString & GetDefaultFont(const RENDER_SETTINGS *aSettings) const
Definition sch_item.cpp:802
std::optional< wxString > GetConnectionName(const SCH_SHEET_PATH *aSheet=nullptr, bool aLocal=false, bool aIgnoreSheet=false) const
Return the connection name for this sheet instance, if connected.
Definition sch_item.cpp:539
void SetConnectionGraph(CONNECTION_GRAPH *aGraph)
Update the connection graph for all connections in this item.
Definition sch_item.cpp:527
AUTOPLACE_ALGO m_fieldsAutoplaced
Definition sch_item.h:794
std::unordered_set< SCH_RULE_AREA * > m_rule_areas_cache
Store pointers to rule areas which this item is contained within.
Definition sch_item.h:807
void SwapFlags(SCH_ITEM *aItem)
Swap the non-temp and non-edit flags.
Definition sch_item.cpp:689
bool IsConnected(const VECTOR2I &aPoint) const
Test the item to see if it is connected to aPoint.
Definition sch_item.cpp:494
virtual void SetUnitString(const wxString &aUnit)
Definition sch_item.cpp:226
SCH_ITEM(EDA_ITEM *aParent, KICAD_T aType, int aUnit=0, int aBodyStyle=0)
Definition sch_item.cpp:52
std::unordered_map< SCH_SHEET_PATH, SCH_CONNECTION * > m_connection_map
Store connectivity information, per sheet.
Definition sch_item.h:802
virtual bool operator<(const SCH_ITEM &aItem) const
Definition sch_item.cpp:739
bool ResolveExcludedFromBOM(const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString) const
Definition sch_item.cpp:327
bool m_private
Definition sch_item.h:793
void registerConnectivityOwner(const std::shared_ptr< CONNECTION_GRAPH_LIFETIME > &aOwner)
Graph membership belongs to this item identity and must not propagate to clones.
Definition sch_item.cpp:109
SCH_CONNECTION * GetOrInitConnection(const SCH_SHEET_PATH &aPath, CONNECTION_GRAPH *aGraph)
Definition sch_item.cpp:637
SCH_CONNECTION * Connection(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieve the connection associated with this object in the given sheet.
Definition sch_item.cpp:503
wxString ResolveText(const wxString &aText, const SCH_SHEET_PATH *aPath, int aDepth=0) const
Definition sch_item.cpp:390
virtual int compare(const SCH_ITEM &aOther, int aCompareFlags=~COMPARE_FLAGS::UNIT) const
Provide the draw object specific comparison called by the == and < operators.
Definition sch_item.cpp:754
wxString GetClass() const override
Return the class name.
Definition sch_item.h:175
bool ResolveExcludedFromBoard(const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString) const
Definition sch_item.cpp:343
const KIFONT::METRICS & GetFontMetrics() const
Definition sch_item.cpp:815
bool ResolveDNP(const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString) const
Definition sch_item.cpp:375
virtual wxString GetUnitString() const
Definition sch_item.cpp:248
bool HasBusConnection(const SCH_SHEET_PATH *aSheet=nullptr) const
Definition sch_item.cpp:549
int GetEffectivePenWidth(const SCH_RENDER_SETTINGS *aSettings) const
Definition sch_item.cpp:824
bool IsGroupableType() const
Definition sch_item.cpp:123
void SwapItemData(SCH_ITEM *aImage)
Swap data between aItem and aImage.
Definition sch_item.cpp:665
bool ResolveExcludedFromSim(const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString) const
Definition sch_item.cpp:311
SCH_LAYER_ID m_layer
Definition sch_item.h:790
bool m_isLocked
Definition sch_item.h:809
virtual bool GetExcludedFromSim(const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString) const
Definition sch_item.h:260
virtual bool GetDNP(const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString) const
Definition sch_item.h:288
virtual bool GetExcludedFromBOM(const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString) const
Definition sch_item.h:267
virtual bool ResolveTextVar(const SCH_SHEET_PATH *aPath, wxString *token, int aDepth) const
Resolve any references to system tokens supported by the label.
int m_SymbolLineWidth
Override line widths for symbol drawing objects set to default line width.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition sch_sheet.h:48
bool ResolveTextVar(const SCH_SHEET_PATH *aPath, wxString *token, int aDepth=0) const
Resolve any references to system tokens supported by the sheet.
Schematic symbol object.
Definition sch_symbol.h:75
bool ResolveTextVar(const SCH_SHEET_PATH *aPath, wxString *token, int aDepth=0) const
Resolve any references to system tokens supported by the symbol.
A base class for LIB_SYMBOL and SCH_SYMBOL.
Definition symbol.h:59
wxString ResolveTextVars(const wxString &aSource, const std::function< bool(wxString *)> *aResolver, int &aDepth)
Multi-pass text variable expansion and math expression evaluation.
Definition common.cpp:333
static bool empty(const wxTextEntryBase *aCtrl)
#define _(s)
@ NO_RECURSE
Definition eda_item.h:52
#define BRIGHTENED
item is drawn with a bright contour
#define SELECTED
Item was manually selected by the user.
#define STRUCT_DELETED
flag indication structures to be erased
#define SKIP_STRUCT
flag indicating that the structure should be ignored
std::uint32_t EDA_ITEM_FLAGS
#define KICAD_FONT_NAME
SCH_LAYER_ID
Eeschema drawing layers.
Definition layer_ids.h:471
@ LAYER_DEVICE
Definition layer_ids.h:488
@ LAYER_WIRE
Definition layer_ids.h:474
@ LAYER_DEVICE_BACKGROUND
Definition layer_ids.h:506
@ LAYER_SELECTION_SHADOWS
Definition layer_ids.h:517
#define UNIMPLEMENTED_FOR(type)
Definition macros.h:92
#define _HKI(x)
Definition page_info.cpp:40
see class PGM_BASE
#define TYPE_HASH(x)
Definition property.h:74
#define IMPLEMENT_ENUM_TO_WXANY(type)
Definition property.h:875
#define REGISTER_TYPE(x)
static const std::vector< KICAD_T > labelTypes
Definition sch_field.cpp:45
Class to handle a set of SCH_ITEMs.
static bool lessYX(const DANGLING_END_ITEM &a, const DANGLING_END_ITEM &b)
Definition sch_item.cpp:978
#define BITMAP_FONT_SIZE_THRESHOLD
Definition sch_item.cpp:43
static bool lessType(const DANGLING_END_ITEM &a, const DANGLING_END_ITEM &b)
Definition sch_item.cpp:986
static struct SCH_ITEM_DESC _SCH_ITEM_DESC
@ AUTOPLACE_NONE
Definition sch_item.h:69
DANGLING_END_T
Definition sch_item.h:77
@ PIN_END
Definition sch_item.h:82
@ BASE
Definition sch_item.h:59
@ DEMORGAN
Definition sch_item.h:60
T * GetAppSettings(const char *aFilename)
bool operator()(const SCH_ITEM *aFirst, const SCH_ITEM *aSecond) const
Definition sch_item.cpp:748
std::string path
VECTOR2I end
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition typeinfo.h:70
@ SCH_GROUP_T
Definition typeinfo.h:169
@ SCH_TABLE_T
Definition typeinfo.h:161
@ SCH_LINE_T
Definition typeinfo.h:159
@ LIB_SYMBOL_T
Definition typeinfo.h:144
@ SCH_NO_CONNECT_T
Definition typeinfo.h:156
@ SCH_SYMBOL_T
Definition typeinfo.h:168
@ SCH_FIELD_T
Definition typeinfo.h:146
@ SCH_DIRECTIVE_LABEL_T
Definition typeinfo.h:167
@ SCH_LABEL_T
Definition typeinfo.h:163
@ SCH_SHEET_T
Definition typeinfo.h:171
@ SCH_SHAPE_T
Definition typeinfo.h:145
@ SCH_RULE_AREA_T
Definition typeinfo.h:166
@ SCH_HIER_LABEL_T
Definition typeinfo.h:165
@ SCH_BUS_BUS_ENTRY_T
Definition typeinfo.h:158
@ SCH_LABEL_LOCATE_ANY_T
Definition typeinfo.h:187
@ SCHEMATIC_T
Definition typeinfo.h:200
@ SCH_SHEET_PIN_T
Definition typeinfo.h:170
@ SCH_TEXT_T
Definition typeinfo.h:147
@ SCH_BUS_WIRE_ENTRY_T
Definition typeinfo.h:157
@ SCH_BITMAP_T
Definition typeinfo.h:160
@ SCH_TEXTBOX_T
Definition typeinfo.h:148
@ SCH_GLOBAL_LABEL_T
Definition typeinfo.h:164
@ SCH_JUNCTION_T
Definition typeinfo.h:155
@ SCH_PIN_T
Definition typeinfo.h:149
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683