25#include <unordered_set>
65#include <dialogs/dialog_text_properties.h>
68#include <dialogs/dialog_table_properties.h>
73#include <wx/filedlg.h>
80wxString uniqueGroupName(
SCH_SCREEN* aScreen,
const wxString& aBaseName )
85 std::unordered_set<wxString> existing;
88 existing.insert(
static_cast<SCH_GROUP*
>( item )->GetName() );
90 if( !existing.count( aBaseName ) )
93 for(
int n = 1; n < std::numeric_limits<int>::max(); ++n )
95 wxString candidate = aBaseName + wxString::Format( wxT(
"%d" ), n );
97 if( !existing.count( candidate ) )
138 auto belowRootSheetCondition =
141 return m_frame->GetCurrentSheet().Last() != &
m_frame->Schematic().Root();
144 auto inDrawingRuleArea =
168 bool placeOneOnly = symbol !=
nullptr;
171 std::vector<PICKED_SYMBOL>* historyList =
nullptr;
172 bool ignorePrimePosition =
false;
176 bool keepSymbol =
false;
205 filter.FilterPowerSymbols(
true );
209 wxFAIL_MSG(
"PlaceSymbol(): unexpected request" );
223 m_view->AddToPreview( aSymbol,
false );
244 existingRefs.
Clear();
272 for(
size_t i = 0; i < refs.
GetCount(); i++ )
273 existingRefs.
AddItem( refs[i] );
277 m_frame->GetCurrentSheet().UpdateAllScreenReferences();
300 existingRefs.
AddItem( placedSymbolReference );
312 ignorePrimePosition =
true;
320 grid.SetUseGrid(
getView()->GetGAL()->GetGridSnapping() && !evt->DisableGridSnapping() );
326 bool isSyntheticClick = symbol && evt->IsActivate() && evt->HasPosition() && evt->Matches( aEvent );
328 if( evt->IsCancelInteractive() || ( symbol && evt->IsAction( &
ACTIONS::undo ) ) )
330 m_frame->GetInfoBar()->Dismiss();
348 else if( evt->IsActivate() && !isSyntheticClick )
350 if( symbol && evt->IsMoveTool() )
353 evt->SetPassEvent(
false );
359 m_frame->ShowInfoBarMsg(
_(
"Press <ESC> to cancel symbol creation." ) );
360 evt->SetPassEvent(
false );
364 if( evt->IsMoveTool() )
386 std::set<UTF8> unique_libid;
387 std::vector<PICKED_SYMBOL> alreadyPlaced;
407 alreadyPlaced.push_back( pickedSymbol );
413 bool footprintPreviews =
m_frame->eeconfig()->m_Appearance.footprint_preview;
428 if( evt->IsPrime() && !ignorePrimePosition )
455 if( keywords.Contains( wxT(
"global power" ) ) )
457 keywords.Replace( wxT(
"global power" ), wxT(
"local power" ) );
463 if( desc.Contains( wxT(
"global label" ) ) )
465 desc.Replace( wxT(
"global label" ), wxT(
"local label" ) );
478 symbol =
new SCH_SYMBOL( *libSymbol, &
m_frame->GetCurrentSheet(), sel, cursorPos,
485 existingRefs.
AddItem( placedSymbolReference );
488 if(
m_frame->eeconfig()->m_AutoplaceFields.enable )
500 m_frame->AddToScreen( symbol, screen );
502 if(
m_frame->eeconfig()->m_AutoplaceFields.enable )
505 m_frame->SaveCopyForRepeatItem( symbol );
508 commit.
Added( symbol, screen );
514 commit.
Push(
_(
"Place Symbol" ) );
519 if( placeOneOnly && !placeAllUnits )
527 if( keepSymbol || placeAllUnits )
539 const wxString currentRefStr = currentReference.
GetRef();
540 const bool isUnannotated = !currentRefStr.IsEmpty()
541 && currentRefStr.Last() ==
'?';
542 const LIB_ID symLibId = symbol->GetLibId();
545 [&](
int aUnit ) ->
bool
551 return schematic.Contains( candidate );
558 while( currentReference.
GetUnit() <= symbol->GetUnitCount()
559 && unitOccupied( currentReference.
GetUnit() ) )
564 if( currentReference.
GetUnit() > symbol->GetUnitCount() )
571 if( keepSymbol || currentReference.
GetUnit() > 1 )
577 addSymbol( nextSymbol );
580 if( currentReference.
GetUnit() == 1 )
585 existingRefs.
AddItem( placedSymbolReference );
593 if( placeOneOnly && !symbol )
617 m_frame->SelectUnit( symbol, unit );
626 if( symbol && symbol->GetBodyStyle() != bodyStyle )
628 m_frame->SelectBodyStyle( symbol, bodyStyle );
650 symbol->SetPosition( cursorPos );
652 m_view->AddToPreview( symbol,
false );
653 m_frame->SetMsgPanel( symbol );
702 int requestedUnit = params.
m_Unit;
707 static const std::vector<KICAD_T> symbolTypes = {
SCH_SYMBOL_T };
710 if( selection.
Size() != 1 )
712 m_frame->ShowInfoBarMsg(
_(
"Select a single symbol to place the next unit." ) );
723 if( !symbol->IsMultiUnit() )
725 m_frame->ShowInfoBarMsg(
_(
"This symbol has only one unit." ) );
731 if( missingUnits.empty() )
733 m_frame->ShowInfoBarMsg(
_(
"All units of this symbol are already placed." ) );
739 if( requestedUnit > 0 )
741 if( missingUnits.count( requestedUnit ) == 0 )
743 m_frame->ShowInfoBarMsg(
_(
"Requested unit already placed." ) );
747 nextMissing = requestedUnit;
752 nextMissing = *std::min_element( missingUnits.begin(), missingUnits.end() );
755 std::unique_ptr<SCH_SYMBOL> newSymbol = std::make_unique<SCH_SYMBOL>( *symbol );
761 newSymbol->SetUnitSelection( nextMissing );
762 newSymbol->SetUnit( nextMissing );
763 newSymbol->SetRefProp( symbol->GetRef( &sheetPath,
false ) );
785 struct RESET_FORCED_CURSOR_GUARD
792 RESET_FORCED_CURSOR_GUARD forcedCursorGuard{ controls };
794 if( !cfg || !common_settings )
802 std::unique_ptr<DESIGN_BLOCK> designBlock;
803 wxString sheetFileName = wxEmptyString;
805 if( placingDesignBlock )
817 msg.Printf(
_(
"Could not find design block %s." ),
819 m_frame->ShowInfoBarError( msg,
true );
823 sheetFileName = designBlock->GetSchematicFile();
825 if( sheetFileName.IsEmpty() || !wxFileExists( sheetFileName ) )
827 m_frame->ShowInfoBarError(
_(
"Design block has no schematic to place." ),
true );
834 wxString* importSourceFile = aEvent.
Parameter<wxString*>();
836 if( importSourceFile !=
nullptr )
837 sheetFileName = *importSourceFile;
847 auto placeSheetContents =
863 if( !
m_frame->LoadSheetFromFile( sheetPath.
Last(), &sheetPath, sheetFileName,
true,
864 placingDesignBlock ) )
869 m_frame->SetSheetNumberAndCount();
885 baseName = designBlock->GetLibId().GetLibItemName().wx_str();
886 group->SetDesignBlockLibId( designBlock->GetLibId() );
890 baseName = wxFileName( sheetFileName ).GetName();
893 group->SetName( uniqueGroupName( screen, baseName ) );
908 if( item->Type() ==
SCH_SYMBOL_T && !keepAnnotations && !autoAnnotate )
909 static_cast<SCH_SYMBOL*
>( item )->ClearAnnotation( &sheetPath,
false );
914 if( !item->GetParentGroup() )
917 group->AddItem( item );
919 newItems.emplace_back( item );
922 commit.
Added( item, screen );
953 if( !keepAnnotations || placingDesignBlock )
967 if( placingDesignBlock )
1004 commit.
Push( placingDesignBlock ?
_(
"Add Design Block" )
1005 :
_(
"Import Schematic Sheet Content" ) );
1013 m_frame->UpdateHierarchyNavigator();
1020 if( sheetFileName.IsEmpty() )
1025 if (!placingDesignBlock)
1027 if( sheetFileName.IsEmpty() )
1029 path = wxPathOnly(
m_frame->Prj().GetProjectFullName() );
1030 file = wxEmptyString;
1034 path = wxPathOnly( sheetFileName );
1035 file = wxFileName( sheetFileName ).GetFullName();
1040 wxFileDialog dlg(
m_frame,
_(
"Choose Schematic" ),
path, file,
1044 dlg.SetCustomizeHook( dlgHook );
1048 if( dlg.ShowModal() == wxID_CANCEL )
1051 sheetFileName = dlg.GetPath();
1053 m_frame->GetDesignBlockPane()->UpdateCheckboxes();
1056 if( sheetFileName.IsEmpty() )
1092 grid.SetUseGrid(
getView()->GetGAL()->GetGridSnapping() && !evt->DisableGridSnapping() );
1098 bool isSyntheticClick = designBlock && evt->IsActivate() && evt->HasPosition() && evt->Matches( aEvent );
1100 if( evt->IsCancelInteractive() || ( designBlock && evt->IsAction( &
ACTIONS::undo ) ) )
1102 m_frame->GetInfoBar()->Dismiss();
1105 else if( evt->IsActivate() && !isSyntheticClick )
1107 m_frame->GetInfoBar()->Dismiss();
1114 if( placingDesignBlock )
1142 evt->SetPassEvent();
1156 bool immediateMode =
image !=
nullptr;
1157 bool ignorePrimePosition =
false;
1195 m_view->RecacheAllItems();
1220 ignorePrimePosition =
true;
1228 grid.SetUseGrid(
getView()->GetGAL()->GetGridSnapping() && !evt->DisableGridSnapping() );
1234 bool isSyntheticClick =
image && evt->IsActivate() && evt->HasPosition() && evt->Matches( aEvent );
1238 m_frame->GetInfoBar()->Dismiss();
1256 else if( evt->IsActivate() && !isSyntheticClick )
1258 if(
image && evt->IsMoveTool() )
1261 evt->SetPassEvent(
false );
1267 m_frame->ShowInfoBarMsg(
_(
"Press <ESC> to cancel image creation." ) );
1268 evt->SetPassEvent(
false );
1272 if( evt->IsMoveTool() )
1296 bool cancelled =
false;
1301 cancelled = dlg.ShowModal() != wxID_OK;
1310 if( evt->IsPrime() && !ignorePrimePosition )
1312 cursorPos =
grid.Align( evt->Position() );
1321 wxString fullFilename = dlg.GetPath();
1324 if( wxFileExists( fullFilename ) )
1327 if( !
image || !
image->GetReferenceImage().ReadImageFile( fullFilename ) )
1329 wxMessageBox( wxString::Format(
_(
"Could not load image from '%s'." ), fullFilename ) );
1341 m_view->RecacheAllItems();
1352 commit.
Push(
_(
"Place Image" ) );
1388 evt->SetPassEvent();
1393 image->SetPosition( cursorPos );
1396 m_view->RecacheAllItems();
1409 evt->SetPassEvent();
1444 if( dlgResult != wxID_OK )
1450 wxMessageBox(
_(
"No graphic items found in file." ) );
1457 std::vector<SCH_ITEM*> newItems;
1458 std::vector<SCH_ITEM*> selectedItems;
1462 for( std::unique_ptr<EDA_ITEM>& ptr : list )
1465 wxCHECK2_MSG( item,
continue, wxString::Format(
"Bad item type: ", ptr->Type() ) );
1467 newItems.push_back( item );
1468 selectedItems.push_back( item );
1469 preview.
Add( item );
1480 commit.
Push(
_(
"Import Graphic" ) );
1489 EDA_ITEMS selItems( selectedItems.begin(), selectedItems.end() );
1515 for(
SCH_ITEM* item : selectedItems )
1516 item->Move(
delta );
1518 currentOffset +=
delta;
1520 m_view->Update( &preview );
1528 grid.SetUseGrid(
getView()->GetGAL()->GetGridSnapping() && !evt->DisableGridSnapping() );
1533 if( evt->IsCancelInteractive() || evt->IsActivate() )
1542 else if( evt->IsMotion() )
1544 delta = cursorPos - currentOffset;
1546 for(
SCH_ITEM* item : selectedItems )
1547 item->Move(
delta );
1549 currentOffset +=
delta;
1551 m_view->Update( &preview );
1564 commit.
Push(
_(
"Import Graphic" ) );
1569 evt->SetPassEvent();
1574 m_view->Remove( &preview );
1592 bool loggedInfoBarError =
false;
1593 wxString description;
1595 bool allowRepeat =
false;
1621 description =
_(
"Add No Connect Flag" );
1628 description =
_(
"Add Junction" );
1634 description =
_(
"Add Wire to Bus Entry" );
1639 wxASSERT_MSG(
false,
"Unknown item type in SCH_DRAWING_TOOLS::SingleClickPlace" );
1677 grid.SetUseGrid(
getView()->GetGAL()->GetGridSnapping() && !evt->DisableGridSnapping() );
1679 cursorPos = evt->IsPrime() ? evt->Position() : controls->
GetMousePosition();
1680 cursorPos =
grid.BestSnapAnchor( cursorPos,
grid.GetItemGrid( previewItem ),
nullptr );
1683 if( evt->IsCancelInteractive() )
1688 else if( evt->IsActivate() )
1690 if( evt->IsMoveTool() )
1711 commit.
Removed( existingItem, screen );
1712 m_frame->RemoveFromScreen( existingItem, screen );
1713 commit.
Push(
_(
"Remove No Connect Flag" ) );
1722 m_frame->ShowInfoBarError(
_(
"Junction location contains no joinable wires and/or pins." ) );
1723 loggedInfoBarError =
true;
1726 else if( loggedInfoBarError )
1728 m_frame->GetInfoBar()->Dismiss();
1737 lwbTool->
AddJunction( &commit, screen, cursorPos );
1739 m_frame->Schematic().CleanUp( &commit );
1741 commit.
Push( description );
1749 m_frame->AddToScreen( newItem, screen );
1752 m_frame->SaveCopyForRepeatItem( newItem );
1755 commit.
Added( newItem, screen );
1757 m_frame->Schematic().CleanUp( &commit );
1759 commit.
Push( description );
1778 m_frame->SetMsgPanel( previewItem );
1815 std::deque<SCH_ITEM*> strokeItems;
1816 strokeItems.push_back( previewItem );
1831 std::deque<SCH_JUNCTION*> junctions;
1832 junctions.push_back(
static_cast<SCH_JUNCTION*
>( previewItem ) );
1855 evt->SetPassEvent();
1860 evt->SetPassEvent();
1893 wxASSERT( aWire->
IsWire() );
1899 SCH_ITEM* wireDriver = wireConnection->Driver();
1901 if( wireDriver && wireDriver->
IsType( { SCH_LABEL_T, SCH_GLOBAL_LABEL_T } ) )
1902 return wireConnection->LocalName();
1905 return wxEmptyString;
1910 std::list<std::unique_ptr<SCH_LABEL_BASE>>& aLabelList )
1933 labelItem->
GetFields().back().SetItalic(
true );
1934 labelItem->
GetFields().back().SetVisible(
true );
1948 labelItem = globalLabel;
1956 wxFAIL_MSG(
"SCH_DRAWING_TOOLS::createNewLabel() unknown label type" );
1976 if( !netName.IsEmpty() )
1979 labelItem->
SetText( netName );
2014 if( aLabelList.empty() )
2015 aLabelList.push_back( std::unique_ptr<SCH_LABEL_BASE>( labelItem ) );
2029 textItem =
new SCH_TEXT( aPosition );
2064 pin->SetText( std::to_string( aSheet->
GetPins().size() + 1 ) );
2066 pin->SetPosition( aPosition );
2067 pin->ClearSelected();
2091 bool ignorePrimePosition =
false;
2094 wxString description;
2096 std::list<std::unique_ptr<SCH_LABEL_BASE>> itemsToPlace;
2127 else if( isGlobalLabel )
2129 else if( isNetLabel || isClassLabel )
2131 else if( isHierLabel )
2137 auto updatePreview =
2141 m_view->AddToPreview( item,
false );
2144 m_view->AddToPreview( aChild,
false );
2158 while( !itemsToPlace.empty() )
2159 itemsToPlace.erase( itemsToPlace.begin() );
2162 auto prepItemForPlacement =
2194 && ( isText || isGlobalLabel || isHierLabel || isClassLabel || isNetLabel ) )
2197 ignorePrimePosition =
true;
2207 grid.SetUseGrid(
getView()->GetGAL()->GetGridSnapping() && !evt->DisableGridSnapping() );
2210 cursorPos =
grid.BestSnapAnchor( cursorPos, snapGrid, item );
2214 bool isSyntheticClick = item && evt->IsActivate() && evt->HasPosition() && evt->
Matches( aEvent );
2216 if( evt->IsCancelInteractive() || evt->IsAction( &
ACTIONS::undo ) )
2218 m_frame->GetInfoBar()->Dismiss();
2230 else if( evt->IsActivate() && !isSyntheticClick )
2232 if( item && evt->IsMoveTool() )
2235 evt->SetPassEvent(
false );
2241 m_frame->ShowInfoBarMsg(
_(
"Press <ESC> to cancel item creation." ) );
2242 evt->SetPassEvent(
false );
2246 if( evt->IsPointEditor() )
2250 else if( evt->IsMoveTool() )
2274 description =
_(
"Add Text" );
2276 else if( isHierLabel )
2291 schematic->Settings().m_DefaultTextSize ) );
2293 itemsToPlace.push_back( std::unique_ptr<SCH_LABEL_BASE>( label ) );
2300 description =
_(
"Add Hierarchical Label" );
2302 else if( isNetLabel )
2305 description =
_(
"Add Label" );
2307 else if( isGlobalLabel )
2310 description =
_(
"Add Label" );
2312 else if( isClassLabel )
2315 description =
_(
"Add Label" );
2317 else if( isSheetPin )
2322 if( !sheet &&
m_selectionTool->SelectPoint( cursorPos, { SCH_SHEET_T }, &i ) )
2330 + wxPoint( 20, 20 ) );
2351 m_statusPopup->SetText(
_(
"No new hierarchical labels found." ) );
2364 description =
_(
"Add Sheet Pin" );
2370 if( evt->IsPrime() && !ignorePrimePosition )
2372 cursorPos =
grid.Align( evt->Position() );
2379 cursorPos =
grid.BestSnapAnchor( cursorPos, snapGrid, item );
2382 if( !itemsToPlace.empty() )
2384 item = itemsToPlace.front().release();
2385 itemsToPlace.pop_front();
2389 prepItemForPlacement( item, cursorPos );
2391 if(
m_frame->GetMoveWarpsCursor() )
2403 if( isSheetPin && sheet )
2411 m_frame->SaveCopyForRepeatItem( item );
2418 commit.
Push( description );
2440 if( isSheetPin && sheet )
2447 m_statusPopup->SetText(
_(
"No new hierarchical labels found." ) );
2457 else if( !itemsToPlace.empty() )
2459 item = itemsToPlace.front().release();
2460 itemsToPlace.pop_front();
2461 prepItemForPlacement( item, cursorPos );
2473 else if( item && evt->IsSelectionEvent() )
2478 if( selection.
GetSize() == 1 )
2490 if( evt->HasParameter() )
2507 evt->SetPassEvent();
2542 evt->SetPassEvent();
2546 evt->SetPassEvent();
2576 wxString description;
2626 grid.SetUseGrid(
getView()->GetGAL()->GetGridSnapping() && !evt->DisableGridSnapping() );
2632 bool isSyntheticClick = item && evt->IsActivate() && evt->HasPosition() && evt->
Matches( aEvent );
2634 if( evt->IsCancelInteractive() || ( item && evt->IsAction( &
ACTIONS::undo ) ) )
2646 else if( evt->IsActivate() && !isSyntheticClick )
2648 if( item && evt->IsMoveTool() )
2651 evt->SetPassEvent(
false );
2658 if( evt->IsPointEditor() )
2662 else if( evt->IsMoveTool() )
2673 else if( !item && ( evt->IsClick(
BUT_LEFT )
2697 description =
_(
"Add Text Box" );
2720 bool finished =
false;
2772 commit.
Push( wxString::Format(
_(
"Draw %s" ), item->
GetClass() ) );
2793 evt->SetPassEvent();
2809 const double cosRot = rot.
Cos();
2810 const double sinRot = rot.
Sin();
2812 const double dx = cursorPos.
x -
center.x;
2813 const double dy = cursorPos.
y -
center.y;
2814 const double lx = dx * cosRot + dy * sinRot;
2815 const double ly = -dx * sinRot + dy * cosRot;
2818 const double px = a * t.
Cos();
2819 const double py = b * t.
Sin();
2829 m_view->AddToPreview( dot );
2834 else if( evt->IsDblClick(
BUT_LEFT ) && !item )
2852 evt->SetPassEvent();
2881 bool started =
false;
2900 polyGeomMgr.
Reset();
2925 grid.SetUseGrid(
getView()->GetGAL()->GetGridSnapping() && !evt->DisableGridSnapping() );
2933 if( evt->IsCancelInteractive() )
2944 evt->SetPassEvent(
false );
2948 else if( evt->IsActivate() )
2953 if( evt->IsPointEditor() )
2957 else if( evt->IsMoveTool() )
2981 const bool endPolygon = evt->IsDblClick(
BUT_LEFT )
2989 polyGeomMgr.
Reset();
2996 else if( polyGeomMgr.
AddPoint( cursorPos ) )
3013 cursorPos = last.value();
3023 else if( started && ( evt->IsMotion() || evt->IsDrag(
BUT_LEFT ) ) )
3039 evt->SetPassEvent();
3044 evt->SetPassEvent();
3109 grid.SetUseGrid(
getView()->GetGAL()->GetGridSnapping() && !evt->DisableGridSnapping() );
3115 bool isSyntheticClick =
table && evt->IsActivate() && evt->HasPosition() && evt->Matches( aEvent );
3129 else if( evt->IsActivate() && !isSyntheticClick )
3131 if(
table && evt->IsMoveTool() )
3134 evt->SetPassEvent(
false );
3141 if( evt->IsPointEditor() )
3145 else if( evt->IsMoveTool() )
3162 table->SetColCount( 1 );
3165 int defaultTextSize = schematic->Settings().m_DefaultTextSize;
3168 table->AddCell( tableCell );
3170 table->SetParent( schematic );
3172 table->SetPosition( cursorPos );
3182 table->ClearEditFlags();
3193 commit.
Push(
_(
"Draw Table" ) );
3209 int fontSize = schematic->Settings().m_DefaultTextSize;
3211 VECTOR2I requestedSize( cursorPos - origin );
3213 int colCount = std::max( 1, requestedSize.
x / ( fontSize * 15 ) );
3214 int rowCount = std::max( 1, requestedSize.
y / ( fontSize * 2 ) );
3216 VECTOR2I cellSize( std::max( gridSize.
x * 5, requestedSize.
x / colCount ),
3217 std::max( gridSize.
y * 2, requestedSize.
y / rowCount ) );
3219 cellSize.
x =
KiROUND( (
double) cellSize.
x / gridSize.
x ) * gridSize.
x;
3220 cellSize.
y =
KiROUND( (
double) cellSize.
y / gridSize.
y ) * gridSize.
y;
3222 table->ClearCells();
3223 table->SetColCount( colCount );
3225 for(
int col = 0; col < colCount; ++col )
3226 table->SetColWidth( col, cellSize.
x );
3228 for(
int row = 0; row < rowCount; ++row )
3230 table->SetRowHeight( row, cellSize.
y );
3232 for(
int col = 0; col < colCount; ++col )
3235 int defaultTextSize = schematic->Settings().m_DefaultTextSize;
3240 table->AddCell( cell );
3272 evt->SetPassEvent();
3281 evt->SetPassEvent();
3301 std::unique_ptr<DESIGN_BLOCK> designBlock;
3307 if( isDrawSheetCopy )
3309 wxString* ptr = aEvent.
Parameter<wxString*>();
3316 else if( isDrawSheetFromDesignBlock )
3319 wxCHECK( designBlock, 0 );
3320 filename = designBlock->GetSchematicFile();
3323 if( ( isDrawSheetCopy || isDrawSheetFromDesignBlock ) && !wxFileExists( filename ) )
3325 wxMessageBox( wxString::Format(
_(
"File '%s' does not exist." ), filename ) );
3339 bool startedWithDrag =
false;
3368 if( aEvent.
HasPosition() && !( isDrawSheetCopy || isDrawSheetFromDesignBlock ) )
3376 grid.SetUseGrid(
getView()->GetGAL()->GetGridSnapping() && !evt->DisableGridSnapping() );
3382 bool isSyntheticClick = sheet && evt->IsActivate() && evt->HasPosition()
3385 if( evt->IsCancelInteractive() || ( sheet && evt->IsAction( &
ACTIONS::undo ) ) )
3387 m_frame->GetInfoBar()->Dismiss();
3399 else if( evt->IsActivate() && !isSyntheticClick )
3401 if( sheet && evt->IsMoveTool() )
3404 evt->SetPassEvent(
false );
3410 m_frame->ShowInfoBarMsg(
_(
"Press <ESC> to cancel sheet creation." ) );
3411 evt->SetPassEvent(
false );
3415 if( evt->IsPointEditor() )
3419 else if( evt->IsMoveTool() )
3430 else if( !sheet && ( evt->IsClick(
BUT_LEFT ) || evt->IsDblClick(
BUT_LEFT )
3436 if( selection.
Size() == 1
3461 startedWithDrag = evt->IsDrag(
BUT_LEFT );
3468 if( isDrawSheetCopy )
3470 wxFileName fn( filename );
3475 else if( isDrawSheetFromDesignBlock )
3477 wxFileName fn( filename );
3482 std::vector<SCH_FIELD>& sheetFields = sheet->
GetFields();
3485 for(
const auto& [fieldName, fieldValue] : designBlock->GetFields() )
3487 sheetFields.emplace_back( sheet,
FIELD_T::USER, fieldName );
3488 sheetFields.back().SetText( fieldValue );
3489 sheetFields.back().SetVisible(
false );
3513 else if( sheet && ( evt->IsClick(
BUT_LEFT ) || evt->IsDblClick(
BUT_LEFT )
3517 || ( startedWithDrag && evt->IsMouseUp(
BUT_LEFT ) ) ) )
3523 nullptr,
nullptr,
nullptr, &filename ) )
3535 m_frame->AddToScreen( sheet );
3540 m_frame->Schematic().RefreshHierarchy();
3543 && !( ( isDrawSheetCopy || isDrawSheetFromDesignBlock )
3545 bool annotatePowerSymbols = isDrawSheetFromDesignBlock;
3547 if( annotateNonPowerSymbols || annotatePowerSymbols )
3554 if( annotateNonPowerSymbols )
3565 if( annotatePowerSymbols )
3584 sheetGroup->
SetName( uniqueGroupName( screen, designBlock->GetLibId().GetLibItemName() ) );
3586 c.
Add( sheetGroup, screen );
3591 c.
Push( isDrawSheetCopy ?
"Import Sheet Copy" :
"Draw Sheet" );
3598 if( ( isDrawSheetCopy || isDrawSheetFromDesignBlock )
3625 evt->SetPassEvent();
3634 m_frame->SetMsgPanel( sheet );
3650 evt->SetPassEvent();
3682 if( !sheetPaths.size() )
3686 m_frame, std::move( sheetPaths ),
3687 std::make_shared<SHEET_SYNCHRONIZATION_AGENT>(
3697 commit.
Push(
_(
"Modify sheet pin" ) );
3703 commit.
Push(
_(
"Modify schematic item" ) );
3714 selectionTool->AddItemToSel( aItem,
true );
3719 std::set<EDA_ITEM*> aTemplates )
3792 if( labels.empty() )
3796 m_statusPopup->SetText(
_(
"No new hierarchical labels found." ) );
3810 SCH_ITEM* lastPlacedLabel =
nullptr;
3812 auto calculatePositionForLabel =
3823 int currentWidth = currentLabel->GetBoundingBox().GetWidth();
3824 int currentHeight = currentLabel->GetBoundingBox().GetHeight();
3828 return { lastX + lastWidth, lastY };
3839 if( !lastPlacedLabel )
3841 std::vector<SCH_SHEET_PIN*> existingPins = sheet->
GetPins();
3843 if( !existingPins.empty() )
3845 std::sort( existingPins.begin(), existingPins.end(),
3848 return ( a->GetPosition().x < b->GetPosition().x )
3849 || ( a->GetPosition().x == b->GetPosition().x
3850 && a->GetPosition().y < b->GetPosition().y );
3853 lastPlacedLabel = existingPins.back();
3857 cursorPos = calculatePositionForLabel( lastPlacedLabel, label );
3874 commit.
Push(
_(
"Add Sheet Pin" ) );
3876 lastPlacedLabel = item;
3886 static const std::function<void( std::list<SCH_SHEET_PATH>&,
SCH_SCREEN*, std::set<SCH_SCREEN*>&,
3888 []( std::list<SCH_SHEET_PATH>& aPaths,
SCH_SCREEN* aScene, std::set<SCH_SCREEN*>& aVisited,
3891 if( ! aScene || aVisited.find(aScene) != aVisited.end() )
3894 std::vector<SCH_ITEM*> sheetChildren;
3895 aScene->GetSheets( &sheetChildren );
3896 aVisited.insert( aScene );
3898 for(
SCH_ITEM* child : sheetChildren )
3903 aPaths.push_back( cp );
3904 getSheetChildren( aPaths, sheet->
GetScreen(), aVisited, cp );
3908 std::list<SCH_SHEET_PATH> sheetPaths;
3909 std::set<SCH_SCREEN*> visited;
3912 std::vector<SCH_SHEET*> topLevelSheets =
m_frame->Schematic().GetTopLevelSheets();
3914 for(
SCH_SHEET* topSheet : topLevelSheets )
3916 if( topSheet && topSheet->GetScreen() )
3920 getSheetChildren( sheetPaths, topSheet->GetScreen(), visited, current );
3924 if( sheetPaths.size() == 0 )
3926 m_frame->ShowInfoBarMsg(
_(
"No sub schematic found in the current project" ) );
3941 std::vector<SCH_HIERLABEL*> labels;
3946 labels.push_back( label );
3949 std::sort( labels.begin(), labels.end(),
3952 return StrNumCmp( label1->GetText(), label2->GetText(), true ) < 0;
3957 if( !aSheet->
HasPin( label->GetText() ) )
3970 std::vector<SCH_HIERLABEL*> labels;
3977 labels.push_back( label );
constexpr EDA_IU_SCALE schIUScale
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
static TOOL_ACTION cancelInteractive
static TOOL_ACTION cursorDblClick
static TOOL_ACTION duplicate
static TOOL_ACTION activatePointEditor
static TOOL_ACTION doDelete
static TOOL_ACTION cursorClick
static TOOL_ACTION increment
static TOOL_ACTION selectionClear
Clear the current selection.
static TOOL_ACTION refreshPreview
static TOOL_ACTION finishInteractive
static TOOL_ACTION selectItems
Select a list of items (specified as the event parameter)
PANEL_DESIGN_BLOCK_CHOOSER m_DesignBlockChooserPanel
constexpr const Vec & GetPosition() const
constexpr size_type GetWidth() const
constexpr size_type GetHeight() const
constexpr bool Contains(const Vec &aPoint) const
constexpr const SizeVec & GetSize() const
COMMIT & Added(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Notify observers that aItem has been added.
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE)
Modify a given item in the model.
COMMIT & Add(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Add a new item to the model.
COMMIT & Removed(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
LIB_ID GetSelectedLibId(int *aUnit=nullptr) const
DESIGN_BLOCK * GetDesignBlock(const LIB_ID &aLibId, bool aUseCacheLib, bool aShowErrorMsg)
Load design block from design block library table.
void SetFilenameOverride(const wxString &aFilenameOverride)
Set the filename override to be applied in TransferDataToWindow.
std::list< std::unique_ptr< EDA_ITEM > > & GetImportedItems()
bool IsPlacementInteractive()
void SetLabelList(std::list< std::unique_ptr< SCH_LABEL_BASE > > *aLabelList)
FIELDS_GRID_TABLE * GetFieldsGridTable()
void SetDesignBlockLibId(const LIB_ID &aLibId)
void AddItem(EDA_ITEM *aItem)
Add item to group.
void SetName(const wxString &aName)
A base class for most all the KiCad significant classes used in schematics and boards.
virtual VECTOR2I GetPosition() const
virtual void ClearEditFlags()
virtual void SetPosition(const VECTOR2I &aPos)
virtual const BOX2I GetBoundingBox() const
Return the orthogonal bounding box of this object for display purposes.
EDA_ITEM_FLAGS GetEditFlags() const
void SetFlags(EDA_ITEM_FLAGS aMask)
KICAD_T Type() const
Returns the type of object.
void ClearFlags(EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
virtual bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const
Compare the item against the search criteria in aSearchData.
virtual wxString GetFriendlyName() const
virtual EDA_ITEM * Clone() const
Create a duplicate of this item with linked list members set to NULL.
virtual void SetParent(EDA_ITEM *aParent)
virtual void SetEnd(const VECTOR2I &aEnd)
int GetEllipseMinorRadius() const
const VECTOR2I & GetEllipseCenter() const
FILL_T GetFillMode() const
int GetEllipseMajorRadius() const
EDA_ANGLE GetEllipseRotation() const
void SetFillColor(const COLOR4D &aColor)
COLOR4D GetFillColor() const
void SetFillMode(FILL_T aFill)
virtual void SetStart(const VECTOR2I &aStart)
virtual void SetTextSize(VECTOR2I aNewSize, bool aEnforceMinTextSize=true)
virtual const wxString & GetText() const
Return the string associated with the text object.
void SetVertJustify(GR_TEXT_V_ALIGN_T aType)
GR_TEXT_H_ALIGN_T GetHorizJustify() const
virtual void SetVisible(bool aVisible)
virtual EDA_ANGLE GetTextAngle() const
void SetBold(bool aBold)
Set the text to be bold - this will also update the font if needed.
GR_TEXT_V_ALIGN_T GetVertJustify() const
virtual void SetText(const wxString &aText)
virtual void SetTextAngle(const EDA_ANGLE &aAngle)
void SetItalic(bool aItalic)
Set the text to be italic - this will also update the font if needed.
void SetHorizJustify(GR_TEXT_H_ALIGN_T aType)
PANEL_ANNOTATE m_AnnotatePanel
EE_TYPE OfType(KICAD_T aType) const
A color representation with 4 components: red, green, blue, alpha.
An interface for classes handling user events controlling the view behavior such as zooming,...
virtual void CaptureCursor(bool aEnabled)
Force the cursor to stay within the drawing panel area.
virtual void ForceCursorPosition(bool aEnabled, const VECTOR2D &aPosition=VECTOR2D(0, 0))
Place the cursor immediately at a given point.
virtual void ShowCursor(bool aEnabled)
Enable or disables display of cursor.
virtual void WarpMouseCursor(const VECTOR2D &aPosition, bool aWorldCoordinates=false, bool aWarpView=false)=0
If enabled (.
virtual void SetCrossHairCursorPosition(const VECTOR2D &aPosition, bool aWarpView=true)=0
Move the graphic crosshair cursor to the requested position expressed in world coordinates.
VECTOR2D GetCursorPosition() const
Return the current cursor position in world coordinates.
virtual VECTOR2D GetMousePosition(bool aWorldCoordinates=true) const =0
Return the current mouse pointer position.
virtual void SetCursorPosition(const VECTOR2D &aPosition, bool aWarpView=true, bool aTriggeredByArrows=false, long aArrowCommand=0)=0
Move cursor to the requested position expressed in world coordinates.
virtual void SetAutoPan(bool aEnabled)
Turn on/off auto panning (this feature is used when there is a tool active (eg.
virtual void PinCursorInsideNonAutoscrollArea(bool aWarpMouseCursor)=0
LEGACY_SYMBOL_LIB * GetCacheLibrary()
Object used to load, save, search, and otherwise manipulate symbol library files.
A logical library item identifier and consists of various portions much like a URI.
bool IsValid() const
Check if this LID_ID is valid.
wxString GetUniStringLibId() const
Define a library symbol object.
wxString GetDescription() const override
const LIB_ID & GetLibId() const override
wxString GetKeyWords() const override
bool IsPower() const override
void SetDescription(const wxString &aDescription)
Gets the Description field text value */.
void SetKeyWords(const wxString &aKeyWords)
bool IsLocalPower() const override
bool IsGlobalPower() const override
A singleton reporter that reports to nowhere.
virtual COMMON_SETTINGS * GetCommonSettings() const
Class that handles the drawing of a polygon, including management of last corner deletion and drawing...
bool AddPoint(const VECTOR2I &aPt)
Lock in a polygon point.
void SetCursorPosition(const VECTOR2I &aPos)
Set the current cursor position.
bool NewPointClosesOutline(const VECTOR2I &aPt) const
std::optional< VECTOR2I > DeleteLastCorner()
Remove the last-added point from the polygon.
void SetFinished()
Mark the polygon finished and update the client.
void SetLeaderMode(LEADER_MODE aMode)
Set the leader mode to use when calculating the leader/returner lines.
void Reset()
Clear the manager state and start again.
static SYMBOL_LIBRARY_ADAPTER * SymbolLibAdapter(PROJECT *aProject)
Accessor for project symbol library manager adapter.
static LEGACY_SYMBOL_LIBS * LegacySchLibs(PROJECT *aProject)
Returns the list of symbol libraries from a legacy (pre-5.x) design This is only used from the remapp...
An adjunct helper to the DRAWING_TOOL interactive tool, which handles incoming geometry changes from ...
These are loaded from Eeschema settings but then overwritten by the project settings.
std::shared_ptr< REFDES_TRACKER > m_refDesTracker
A list of previously used schematic reference designators.
bool m_IntersheetRefsShow
Holds all the data relating to one schematic.
SCHEMATIC_SETTINGS & Settings() const
static TOOL_ACTION rotateCCW
static TOOL_ACTION placeClassLabel
static TOOL_ACTION placeSheetPin
static TOOL_ACTION placeNextSymbolUnit
static TOOL_ACTION editValue
static TOOL_ACTION setExcludeFromBOM
static TOOL_ACTION mirrorV
static TOOL_ACTION drawSheetFromFile
static TOOL_ACTION placeGlobalLabel
static TOOL_ACTION drawEllipseArc
static TOOL_ACTION drawTextBox
static TOOL_ACTION autoplaceFields
static TOOL_ACTION changeSymbol
static TOOL_ACTION syncAllSheetsPins
static TOOL_ACTION closeOutline
static TOOL_ACTION drawArc
static TOOL_ACTION drawSheet
static TOOL_ACTION properties
static TOOL_ACTION editReference
static TOOL_ACTION leaveSheet
static TOOL_ACTION ddImportGraphics
static TOOL_ACTION autoplaceAllSheetPins
static TOOL_ACTION drawRectangle
static TOOL_ACTION placeHierLabel
static TOOL_ACTION drawEllipse
static TOOL_ACTION placeLabel
static TOOL_ACTION drawCircle
static TOOL_ACTION importGraphics
static TOOL_ACTION toText
static TOOL_ACTION placeBusWireEntry
static TOOL_ACTION toHLabel
static TOOL_ACTION drawBezier
static TOOL_ACTION rotateCW
static TOOL_ACTION importSheet
static TOOL_ACTION setExcludeFromSim
static TOOL_ACTION toLabel
static TOOL_ACTION placeJunction
static TOOL_ACTION setDNP
static TOOL_ACTION drawRuleArea
static TOOL_ACTION placeSymbol
static TOOL_ACTION placeImage
static TOOL_ACTION deleteLastPoint
static TOOL_ACTION editWithLibEdit
static TOOL_ACTION toDLabel
static TOOL_ACTION setExcludeFromPosFiles
static TOOL_ACTION cycleBodyStyle
static TOOL_ACTION drawSheetFromDesignBlock
static TOOL_ACTION mirrorH
static TOOL_ACTION placeDesignBlock
static TOOL_ACTION drawTable
static TOOL_ACTION placeSchematicText
static TOOL_ACTION toTextBox
static TOOL_ACTION changeSheet
static TOOL_ACTION enterSheet
static TOOL_ACTION editFootprint
static TOOL_ACTION repeatDrawItem
static TOOL_ACTION placeNoConnect
static TOOL_ACTION toGLabel
static TOOL_ACTION setExcludeFromBoard
static TOOL_ACTION syncSheetPins
static TOOL_ACTION placePower
Object to handle a bitmap image that can be inserted in a schematic.
Base class for a bus or wire entry.
VECTOR2I GetPosition() const override
void MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
void Rotate(const VECTOR2I &aCenter, bool aRotateCCW) override
Rotate the item around aCenter 90 degrees in the clockwise direction.
Class for a wire to bus entry.
virtual void Push(const wxString &aMessage=wxT("A commit"), int aCommitFlags=0) override
Execute the changes.
virtual void Revert() override
Revert the commit by restoring the modified items state.
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
Schematic editor (Eeschema) main window.
void SetText(const wxString &aText) override
SCH_FIELD * GetField(FIELD_T aFieldType)
Return a mandatory field in this label.
A set of SCH_ITEMs (i.e., without duplicates).
void SetSpinStyle(SPIN_STYLE aSpinStyle) override
Base class for any item which can be embedded within the SCHEMATIC container class,...
virtual bool IsConnectable() const
virtual void AutoplaceFields(SCH_SCREEN *aScreen, AUTOPLACE_ALGO aAlgo)
virtual void RunOnChildren(const std::function< void(SCH_ITEM *)> &aFunction, RECURSE_MODE aMode)
SCHEMATIC * Schematic() const
Search the item hierarchy to find a SCHEMATIC.
virtual void CalcEdit(const VECTOR2I &aPosition)
Calculate the attributes of an item at aPosition when it is being edited.
virtual void SetUnit(int aUnit)
SCH_CONNECTION * Connection(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieve the connection associated with this object in the given sheet.
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
bool AutoRotateOnPlacement() const
autoRotateOnPlacement
SPIN_STYLE GetSpinStyle() const
void SetShape(LABEL_FLAG_SHAPE aShape)
LABEL_FLAG_SHAPE GetShape() const
void SetAutoRotateOnPlacement(bool autoRotate=true)
std::vector< SCH_FIELD > & GetFields()
virtual void SetSpinStyle(SPIN_STYLE aSpinStyle)
Segment description base class to describe items which have 2 end points (track, wire,...
bool IsWire() const
Return true if the line is a wire.
VECTOR2I GetEndPoint() const
VECTOR2I GetStartPoint() const
Container to create a flattened list of symbols because in a complex hierarchy, a symbol can be used ...
void SortByReferenceOnly()
Sort the list of references by reference.
void ReannotateByOptions(ANNOTATE_ORDER_T aSortOption, ANNOTATE_ALGO_T aAlgoOption, int aStartNumber, const SCH_REFERENCE_LIST &aAdditionalRefs, bool aStartAtCurrent, SCH_SHEET_LIST *aHierarchy)
Forces reannotation of the provided references.
void SetRefDesTracker(std::shared_ptr< REFDES_TRACKER > aTracker)
void AddItem(const SCH_REFERENCE &aItem)
void UpdateAnnotation()
Update the symbol references for the schematic project (or the current sheet).
A helper to define a symbol's reference designator in a schematic.
bool AlwaysAnnotate() const
Verify the reference should always be automatically annotated.
EE_RTREE & Items()
Get the full RTree, usually for iterating.
SCH_ITEM * GetItem(const VECTOR2I &aPosition, int aAccuracy=0, KICAD_T aType=SCH_LOCATE_ANY_T) const
Check aPosition within a distance of aAccuracy for items of type aFilter.
bool IsExplicitJunctionAllowed(const VECTOR2I &aPosition) const
Indicate that a junction dot may be placed at the given location.
void SetPosition(const VECTOR2I &aPos) override
void BeginEdit(const VECTOR2I &aStartPoint) override
Begin drawing a symbol library draw item at aPosition.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
void EndEdit(bool aClosed=false) override
End an object editing action.
void SetStroke(const STROKE_PARAMS &aStroke) override
bool ContinueEdit(const VECTOR2I &aPosition) override
Continue an edit in progress at aPosition.
void CalcEdit(const VECTOR2I &aPosition) override
Calculate the attributes of an item at aPosition when it is being edited.
wxString GetClass() const override
Return the class name.
STROKE_PARAMS GetStroke() const override
VECTOR2I GetPosition() const override
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
void SortByPageNumbers(bool aUpdateVirtualPageNums=true)
Sort the list of sheets by page number.
SCH_SHEET_LIST FindAllSheetsForScreen(const SCH_SCREEN *aScreen) const
Return a SCH_SHEET_LIST with a copy of all the SCH_SHEET_PATH using a particular screen.
wxString GetNextPageNumber() const
void GetSymbols(SCH_REFERENCE_LIST &aReferences, SYMBOL_FILTER aSymbolFilter, bool aForceIncludeOrphanSymbols=false) const
Add a SCH_REFERENCE object to aReferences for each symbol in the list of sheets.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
SCH_SCREEN * LastScreen()
void SetPageNumber(const wxString &aPageNumber)
Set the sheet instance user definable page number.
SCH_SHEET * Last() const
Return a pointer to the last SCH_SHEET of the list.
void push_back(SCH_SHEET *aSheet)
Forwarded method from std::vector.
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
void SetBorderColor(KIGFX::COLOR4D aColor)
void AddPin(SCH_SHEET_PIN *aSheetPin)
Add aSheetPin to the sheet.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const override
Compare the item against the search criteria in aSearchData.
std::vector< SCH_FIELD > & GetFields()
Return a reference to the vector holding the sheet's fields.
SCH_FIELD * GetField(FIELD_T aFieldType)
Return a mandatory field in this sheet.
void SetBackgroundColor(KIGFX::COLOR4D aColor)
SCH_SCREEN * GetScreen() const
VECTOR2I GetPosition() const override
bool HasPin(const wxString &aName) const
Check if the sheet already has a sheet pin named aName.
void SetScreen(SCH_SCREEN *aScreen)
Set the SCH_SCREEN associated with this sheet to aScreen.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
void SetBorderWidth(int aWidth)
void AutoplaceFields(SCH_SCREEN *aScreen, AUTOPLACE_ALGO aAlgo) override
void Resize(const VECTOR2I &aSize)
Resize this sheet to aSize and adjust all of the labels accordingly.
std::vector< SCH_SHEET_PIN * > & GetPins()
const LIB_ID & GetLibId() const override
void SetUnitSelection(const SCH_SHEET_PATH *aSheet, int aUnitSelection)
Set the selected unit of this symbol on one sheet.
RAII class that sets an value at construction and resets it to the original value at destruction.
const VECTOR2I NearestPoint(const VECTOR2I &aP) const
Compute a point on the segment (this) that is closest to point aP.
virtual void Add(EDA_ITEM *aItem)
VECTOR2I GetReferencePoint() const
virtual unsigned int GetSize() const override
Return the number of stored items.
virtual void Clear() override
Remove all the stored items from the group.
int Size() const
Returns the number of selected parts.
SHEET_SYNCHRONIZATION_PLACEMENT
std::function< void()> MODIFICATION
An interface to the global shared library manager that is schematic-specific and linked to one projec...
Helper object to filter a list of libraries.
This file is part of the common library.
static constexpr EDA_ANGLE ANGLE_0
#define IGNORE_PARENT_GROUP
#define IS_NEW
New item, just created.
#define STRUCT_DELETED
flag indication structures to be erased
#define ENDPOINT
ends. (Used to support dragging.)
#define SKIP_STRUCT
flag indicating that the structure should be ignored
#define IS_MOVING
Item being moved.
#define STARTPOINT
When a line is selected, these flags indicate which.
@ FILLED_SHAPE
Fill with object color.
@ ID_POPUP_SCH_SELECT_UNIT
@ ID_POPUP_SCH_SELECT_BODY_STYLE
@ ID_POPUP_SCH_SELECT_BODY_STYLE_END
@ ID_POPUP_SCH_SELECT_UNIT_END
@ DIRECT
Unconstrained point-to-point.
static const std::string KiCadSchematicFileExtension
static wxString ImageFileWildcard()
static wxString KiCadSchematicFileWildcard()
PGM_BASE & Pgm()
The global program "get" accessor.
LIB_SYMBOL * SchGetLibSymbol(const LIB_ID &aLibId, SYMBOL_LIBRARY_ADAPTER *aLibMgr, LEGACY_SYMBOL_LIB *aCacheLib, wxWindow *aParent, bool aShowErrorMsg)
Load symbol from symbol library table.
Class to handle a set of SCH_ITEMs.
std::vector< EDA_ITEM * > EDA_ITEMS
ANNOTATE_ORDER_T
Schematic annotation order options.
@ ANNOTATE_SELECTION
Annotate the selection.
ANNOTATE_ALGO_T
Schematic annotation type options.
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
@ SYMBOL_FILTER_NON_POWER
LINE_STYLE
Dashed line types.
COLOR4D default_sheet_border_color
COLOR4D default_sheet_background_color
int default_line_thickness
POWER_SYMBOLS new_power_symbols
bool m_Reannotate
For a preselected multi-unit symbol, keep placing remaining units instead of exiting.
SCH_SYMBOL * m_Symbol
< Provide a symbol to place
SCH_SYMBOL * m_Symbol
< Symbol used as reference for unit placement
@ USER
The field ID hasn't been set yet; field is invalid.
@ INTERSHEET_REFS
Global label cross-reference page numbers.
IbisParser parser & reporter
std::vector< std::vector< std::string > > table
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
VECTOR2< int32_t > VECTOR2I
Definition of file extensions used in Kicad.