36#include <wx/srchctrl.h>
38#include <wx/clntdata.h>
59#include <python_scripting.h>
100#include <unordered_set>
108#include <wx/cmdline.h>
110#include <wx/filedlg.h>
111#include <wx/socket.h>
119#include <wx/choicdlg.h>
120#include <wx/textdlg.h>
131#define DIFF_SYMBOLS_DIALOG_NAME wxT( "DiffSymbolsDialog" )
186 wxIconBundle icon_bundle;
189 icon_bundle.AddIcon( icon );
191 icon_bundle.AddIcon( icon );
193 icon_bundle.AddIcon( icon );
195 icon_bundle.AddIcon( icon );
197 icon_bundle.AddIcon( icon );
199 SetIcons( icon_bundle );
249 .Bottom().Layer( 6 ) );
253 .Caption(
_(
"Schematic Hierarchy" ) )
254 .Left().Layer( 3 ).Position( 1 )
255 .TopDockable(
false )
256 .BottomDockable(
false )
258 .MinSize( FromDIP( wxSize( 120, 60 ) ) )
259 .BestSize( FromDIP( wxSize( 200, 200 ) ) )
260 .FloatingSize( FromDIP( wxSize( 200, 200 ) ) )
261 .FloatingPosition( FromDIP( wxPoint( 50, 50 ) ) )
272 .Left().Layer( 2 ) );
275 .Right().Layer( 2 ) );
284 .Caption(
_(
"Search" ) )
286 .MinSize( FromDIP( wxSize( 180, 60 ) ) )
287 .BestSize( FromDIP( wxSize( 180, 100 ) ) )
288 .FloatingSize( FromDIP( wxSize( 480, 200 ) ) )
290 .DestroyOnClose(
false )
299 wxAuiPaneInfo& selectionFilterPane =
m_auimgr.GetPane( wxS(
"SelectionFilter" ) );
309 selectionFilterPane.dock_proportion = 0;
329 hierarchy_pane.Float();
350 netNavigatorPane.Float();
377 hierarchy_pane.Fixed();
379 netNavigatorPane.Fixed();
383 hierarchy_pane.Resizable();
384 netNavigatorPane.Resizable();
389 hierarchy_pane.MinSize( FromDIP( wxSize( 120, 60 ) ) );
390 netNavigatorPane.MinSize( FromDIP( wxSize( 120, 60 ) ) );
400 GetCanvas()->GetGAL()->SetAxesEnabled(
false );
434 m_apiHandler = std::make_unique<API_HANDLER_SCH>(
this );
435 Pgm().GetApiServer().RegisterHandler( m_apiHandler.get() );
448 DragAcceptFiles(
true );
455 wxPoint canvas_pos =
GetCanvas()->GetScreenPosition();
456 hierarchy_pane.FloatingPosition( canvas_pos.x + 10, canvas_pos.y + 10 );
465 if( !
eeconfig()->m_CrossProbing.flash_selection )
467 wxLogTrace(
traceCrossProbeFlash,
"StartCrossProbeFlash: aborted (setting disabled) items=%zu", aItems.size() );
483 wxLogTrace(
traceCrossProbeFlash,
"StartCrossProbeFlash: starting with %zu items", aItems.size() );
589 catch(
const std::runtime_error& e )
591 wxFAIL_MSG( wxString::Format( wxT(
"Settings exception occurred: %s" ), e.what() ) );
637 if( hierarchy_pane.rect.width > 50 )
640 hierarchy_pane.best_size.x = hierarchy_pane.rect.width;
701 auto searchPaneCond =
707 auto propertiesCond =
713 auto hierarchyNavigatorCond =
719 auto netNavigatorCond =
725 auto designBlockCond =
740 auto groupWithDesignBlockLink =
743 if( aSel.Size() != 1 )
751 return group->HasDesignBlockLink();
754#define ENABLE( x ) ACTION_CONDITIONS().Enable( x )
755#define CHECK( x ) ACTION_CONDITIONS().Check( x )
798 auto showHiddenPinsCond =
804 auto showHiddenFieldsCond =
811 auto showDirectiveLabelsCond =
818 auto showERCErrorsCond =
825 auto showERCWarningsCond =
832 auto showERCExclusionsCond =
839 auto markSimExclusionsCond =
846 auto showOPVoltagesCond =
853 auto showOPCurrentsCond =
860 auto showPinAltModeIconsCond =
867 auto showAnnotateAutomaticallyCond =
873 auto remapSymbolsCondition =
882 auto belowRootSheetCondition =
886 return navigateTool && navigateTool->
CanGoUp();
916#define CURRENT_TOOL( action ) mgr->SetConditions( action, CHECK( cond.CurrentTool( action ) ) )
980 repeatItem->ClearFlags();
981 repeatItem->SetParent(
nullptr );
1050 "SCH_EDIT_FRAME::SetCurrentSheet: Changing from path='%s' (size=%zu) to path='%s' (size=%zu)",
1067 item->ClearCaches();
1069 for(
const std::pair<const wxString, LIB_SYMBOL*>& libSymbol : screen->
GetLibSymbols() )
1071 wxCHECK2( libSymbol.second,
continue );
1072 libSymbol.second->ClearCaches();
1075 if(
Schematic().Settings().m_IntersheetRefsShow )
1104 if(
Kiface().IsSingle() )
1108 if( symbolEditor && !symbolEditor->Close() )
1113 if( symbolViewer && !symbolViewer->Close() )
1120 if( chooser && !chooser->Close() )
1127 if( symbolEditor && symbolEditor->IsSymbolFromSchematic() )
1129 if( !symbolEditor->CanCloseSymbolFromSchematic(
true ) )
1150 wxString msg =
_(
"Save changes to '%s' before closing?" );
1155 return SaveProject();
1166 if( !projPath.IsEmpty() &&
Kiway().LocalHistory().HistoryExists( projPath ) )
1169 wxS(
"Discard unsaved schematic changes") );
1185 Pgm().GetApiServer().DeregisterHandler( m_apiHandler.get() );
1215 if(
Prj().GetLocalSettings().ShouldAutoSave() )
1223 if( hierarchy_pane.IsShown() && hierarchy_pane.IsFloating() )
1225 hierarchy_pane.Show(
false );
1281 if( !GetTitle().StartsWith( wxS(
"*" ) ) )
1288 if(
Kiface().IsSingle() )
1290 DisplayError(
this,
_(
"Cannot update the PCB, because the Schematic Editor is opened"
1291 " in stand-alone mode. In order to create/update PCBs from"
1292 " schematics, launch the KiCad shell and create a project." ) );
1297 wxEventBlocker blocker(
this );
1302 fn.SetExt( FILEEXT::PcbFileExtension );
1314 if( !frame->IsVisible() )
1315 frame->Show(
true );
1318 if( frame->IsIconized() )
1319 frame->Iconize(
false );
1323 std::string payload;
1333 if( aRefreshNetNavigator )
1370 if( !
Kiface().IsSingle() )
1375 wxFileDialog dlg(
this,
_(
"New Schematic" ), pro_dir, wxEmptyString,
1378 if( dlg.ShowModal() != wxID_CANCEL )
1381 wxFileName create_me =
1384 if( create_me.FileExists() )
1387 msg.Printf(
_(
"Schematic file '%s' already exists." ), create_me.GetFullName() );
1393 wxASSERT_MSG( create_me.IsAbsolute(), wxS(
"wxFileDialog returned non-absolute path" ) );
1404 if( !
Kiface().IsSingle() )
1412 wxFileDialog dlg(
this,
_(
"Open Schematic" ), pro_dir, wxEmptyString,
1413 wildcards, wxFD_OPEN | wxFD_FILE_MUST_EXIST );
1415 if( dlg.ShowModal() != wxID_CANCEL )
1436 [
this](
const wxString& aProjectPath, std::vector<wxString>& aFiles )
1438 m_schematic->SaveToHistory( aProjectPath, aFiles );
1448 if( kicad_board.IsOk() && !
Schematic().GetFileName().IsEmpty() )
1450 kicad_board.SetExt( FILEEXT::PcbFileExtension );
1451 wxFileName legacy_board( kicad_board );
1453 wxFileName& boardfn = legacy_board;
1455 if( !legacy_board.FileExists() || kicad_board.FileExists() )
1456 boardfn = kicad_board;
1458 if(
Kiface().IsSingle() )
1464 wxEventBlocker blocker(
this);
1476 frame->
OpenProjectFiles( std::vector<wxString>( 1, boardfn.GetFullPath() ) );
1479 if( !frame->IsVisible() )
1480 frame->Show(
true );
1483 if( frame->IsIconized() )
1484 frame->Iconize(
false );
1501 if( !
ReadyToNetlist(
_(
"Assigning footprints requires a fully annotated schematic." ) ) )
1517 player->Show(
true );
1535 if( event.GetId() == wxID_EXIT )
1538 if( event.GetId() == wxID_CLOSE ||
Kiface().IsSingle() )
1560 auto invalidateTextVars =
1563 if(
text->HasTextVars() )
1565 text->ClearRenderCache();
1566 text->ClearBoundingBoxCache();
1573 item->RunOnChildren(
1574 [&invalidateTextVars](
SCH_ITEM* aChild )
1577 invalidateTextVars(
text );
1583 invalidateTextVars(
text );
1619 if( !
pin->GetOperatingPoint().IsEmpty() )
1622 pin->SetOperatingPoint( wxEmptyString );
1625 if( pins.size() == 2 )
1630 if( !op.IsEmpty() && op != wxS(
"--" ) && op != wxS(
"?" ) )
1632 pins[0]->SetOperatingPoint( op );
1638 std::vector<EMBEDDED_FILES*> embeddedFilesStack;
1639 embeddedFilesStack.push_back(
m_schematic->GetEmbeddedFiles() );
1642 embeddedFilesStack.push_back( symbolEmbeddedFiles );
1652 for(
const auto& modelPin : model.
GetPins() )
1654 SCH_PIN* symbolPin = symbol->
GetPin( modelPin.get().symbolPinNumber );
1655 wxString signalName = ref + wxS(
":" ) + modelPin.get().modelPinName;
1656 wxString op =
m_schematic->GetOperatingPoint( signalName,
1660 if( symbolPin && !op.IsEmpty() && op != wxS(
"--" ) && op != wxS(
"?" ) )
1670 for(
const auto& [ key, subgraphList ] :
m_schematic->m_connectionGraph->GetNetMap() )
1675 if( !op.IsEmpty() && op != wxS(
"--" ) && op != wxS(
"?" ) )
1680 double length = 0.0;
1682 if( subgraph->GetSheet().GetExcludedFromSim() )
1685 for(
SCH_ITEM* item : subgraph->GetItems() )
1730 if( otherLabel != label && otherLabel->
GetText() == label->
GetText() )
1750 bool readOnly =
false;
1751 bool unsaved =
false;
1761 title += fn.GetName();
1765 if( sheetPath != title )
1766 title += wxString::Format( wxT(
" [%s]" ), sheetPath );
1769 title += wxS(
" " ) +
_(
"[Read Only]" );
1772 title += wxS(
" " ) +
_(
"[Unsaved]" );
1776 title =
_(
"[no schematic loaded]" );
1779 title += wxT(
" \u2014 " ) +
_(
"Schematic Editor" );
1798 bool hasHighlightedConn = !highlightedConn.IsEmpty();
1800 std::function<void(
SCH_ITEM* )> changeHandler =
1801 [&](
SCH_ITEM* aChangedItem ) ->
void
1810 if( !hasHighlightedConn )
1817 && ( connection->
Name() == highlightedConn
1839 auto invalidateTextVars =
1842 if(
text->HasTextVars() )
1844 text->ClearRenderCache();
1845 text->ClearBoundingBoxCache();
1859 [&invalidateTextVars](
SCH_ITEM* aChild )
1862 invalidateTextVars(
text );
1871 invalidateTextVars(
text );
1877 || !
Schematic().ConnectionGraph()->FindFirstSubgraphByName( highlightedConn ) )
1941 if( !cfg->m_Drawing.field_names.IsEmpty() )
1949 item->ClearCaches();
1960 for(
const auto& [ libItemName, libSymbol ] : screen->
GetLibSymbols() )
1961 libSymbol->ClearCaches();
1993 bool panel_shown = design_blocks_pane_info.IsShown();
1994 design_blocks_pane_info.Caption(
_(
"Design Blocks" ) );
1995 design_blocks_pane_info.Show( panel_shown );
2013#if defined( __WXMSW__ )
2023 SetStatusText( wxString::Format(
_(
"Highlighted net: %s" ),
2028 SetStatusText( wxT(
"" ) );
2053 if( aIncludeAllVisible )
2069 if( item != dsAsItem )
2070 bBoxDoc.
Merge( item->GetBoundingBox() );
2094 if( aItem !=
nullptr && !aItem->
IsSCH_ITEM() )
2101 if( lastItem && lastItem != aItem )
2106 lastBrightenedItemID =
niluuid;
2116 lastBrightenedItemID = aItem->
m_Uuid;
2151 const KIID& aSchematicSymbolUUID )
2159 if( !principalSymbol )
2162 wxString principalRef;
2164 if( principalSymbol->
IsAnnotated( &principalPath ) )
2165 principalRef = principalSymbol->
GetRef( &principalPath,
false );
2167 std::vector< std::pair<SCH_SYMBOL*, SCH_SHEET_PATH> > allUnits;
2175 if( candidateSymbol == principalSymbol
2177 && candidateSymbol->
GetRef( &
path,
false ) == principalRef ) )
2179 allUnits.emplace_back( candidateSymbol,
path );
2184 for(
auto& [ unit,
path ] : allUnits )
2188 path.LastScreen()->Remove( unit );
2190 if( !unit->IsNew() )
2193 unit->SetLibSymbol( aSymbol.
Flatten().release() );
2201 path.LastScreen()->Append( unit );
2208 wxString altName =
pin->GetAlt();
2210 if( altName.IsEmpty() )
2213 if(
pin->GetAlternates().count( altName ) == 0 )
2214 pin->SetAlt( wxEmptyString );
2217 if( !commit.
Empty() )
2218 commit.
Push(
_(
"Save Symbol to Schematic" ) );
2227 sch_item->ClearCaches();
2259 wxCHECK( selectionTool, );
2268 item->SetForceVisible(
true );
2271 else if( item->IsBrightened() )
2273 item->SetForceVisible(
false );
2282 item->RunOnChildren(
2310 wxCHECK( editTool, );
2326 _(
"Compare Symbol with Library" ) );
2340 if( aEvent.GetId() == wxID_APPLY )
2345 [
this, symbolUUID]()
2354 dlg.ShowQuasiModal();
2425 wxPanel* panel =
new wxPanel(
this );
2427 wxBoxSizer* sizer =
new wxBoxSizer( wxVERTICAL );
2430 wxBoxSizer* searchSizer =
new wxBoxSizer( wxHORIZONTAL );
2442 sizer->Add( searchSizer, 0, wxEXPAND | wxALL, FromDIP( 2 ) );
2444 m_netNavigator =
new wxTreeCtrl( panel, wxID_ANY, wxPoint( 0, 0 ), FromDIP( wxSize( 160, 250 ) ),
2445 wxTR_DEFAULT_STYLE | wxNO_BORDER );
2446 sizer->Add(
m_netNavigator, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP( 2 ) );
2448 panel->SetSizer( sizer );
2458 [
this]( wxMouseEvent& event )
2462 _(
"Wildcard Search" ) );
2464 _(
"Regex Search" ) );
2469 wildcardItem->Check();
2493 if( refreshNetNavigator )
2504 bool refreshSelection = selection.IsOk() && ( selection !=
m_netNavigator->GetRootItem() );
2506 if( refreshSelection )
2540 if( selection.IsOk() )
2545 selectionData = *tmp;
2546 selectionPtr = &selectionData;
2558 if( aEvent.GetKeyCode() == WXK_ESCAPE )
2588 wxPoint screenPos = aEvent.GetPosition();
2590 if( screenPos == wxDefaultPosition )
2591 screenPos = wxGetMousePosition();
2612 _(
"Find in Net Inspector" ) );
2613 menu.Append( findInInspector );
2619 wxTreeItemId netItem = aItem;
2625 while( parent.IsOk() && parent !=
m_netNavigator->GetRootItem() )
2633 if( wxStringClientData* data =
2634 dynamic_cast<wxStringClientData*
>(
m_netNavigator->GetItemData( netItem ) ) )
2636 netName = data->GetData();
2642 if( wxStringClientData* data =
2643 dynamic_cast<wxStringClientData*
>(
m_netNavigator->GetItemData( netItem ) ) )
2645 netName = data->GetData();
2658 if( netName.IsEmpty() )
2660 findInInspector->Enable(
false );
2677 switch( aEvent.GetId() )
2717 aEvent.Skip(
false );
2726 wxAuiPaneInfo& selectionFilterPane =
m_auimgr.GetPane( wxS(
"SelectionFilter" ) );
2730 bool showFilter = ( hierarchyPane.IsShown() && hierarchyPane.IsDocked() )
2731 || ( netNavigatorPane.IsShown() && netNavigatorPane.IsDocked() )
2732 || ( propertiesPane.IsShown() && propertiesPane.IsDocked() );
2734 selectionFilterPane.Show( showFilter );
2739void SCH_EDIT_FRAME::onPluginAvailabilityChanged( wxCommandEvent& aEvt )
2741 wxLogTrace(
traceApi,
"SCH frame: EDA_EVT_PLUGIN_AVAILABILITY_CHANGED" );
2796 propertiesPaneInfo.Show( show );
2823 hierarchy_pane.Show( !hierarchy_pane.IsShown() );
2827 if( hierarchy_pane.IsShown() )
2829 if( hierarchy_pane.IsFloating() )
2844 if( hierarchy_pane.IsFloating() )
2867 db_library_pane.Show( !db_library_pane.IsShown() );
2869 if( db_library_pane.IsShown() )
2871 if( db_library_pane.IsFloating() )
2886 if( db_library_pane.IsFloating() )
2903 wxCHECK( aSchematic, );
2926 wxTextEntryDialog dlg(
this,
_(
"Enter new variant name" ),
_(
"Variant Name" ) );
2928 if( dlg.ShowModal() == wxID_CANCEL )
2931 wxString variantName = dlg.GetValue();
2933 if( variantName.IsEmpty() || (
m_currentVariantCtrl->FindString( variantName ) != wxNOT_FOUND ) )
2941 if( selected != wxNOT_FOUND )
2946 if( selected != wxNOT_FOUND )
2962 choices.RemoveAt( 0 );
2964 wxSingleChoiceDialog dlg(
this,
_(
"Select variant name to remove" ),
_(
"Variant Name" ), choices );
2966 if( dlg.ShowModal() == wxID_CANCEL )
2969 wxString variantName = dlg.GetStringSelection();
2971 if( variantName.IsEmpty() || (
m_currentVariantCtrl->FindString( variantName ) != wxNOT_FOUND ) )
2979 if( selected != wxNOT_FOUND )
2984 if( selected != wxNOT_FOUND )
2986 if( tmp != variantName )
const KICOMMON_API wxEventTypeTag< wxCommandEvent > EDA_EVT_PLUGIN_AVAILABILITY_CHANGED
Notifies other parts of KiCad when plugin availability changes.
constexpr EDA_IU_SCALE schIUScale
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
static TOOL_ACTION toggleGrid
static TOOL_ACTION cancelInteractive
static TOOL_ACTION unselectAll
static TOOL_ACTION selectItem
Select an item (specified as the event parameter).
static TOOL_ACTION pasteSpecial
static TOOL_ACTION ungroup
static TOOL_ACTION toggleBoundingBoxes
static TOOL_ACTION showSearch
static TOOL_ACTION selectionActivate
Activation of the selection tool.
static TOOL_ACTION duplicate
static TOOL_ACTION doDelete
static TOOL_ACTION selectionTool
static TOOL_ACTION zoomFitScreen
static TOOL_ACTION deleteTool
static TOOL_ACTION zoomTool
static TOOL_ACTION selectionClear
Clear the current selection.
static TOOL_ACTION showProperties
static TOOL_ACTION copyAsText
static TOOL_ACTION toggleGridOverrides
static TOOL_ACTION selectAll
Manage TOOL_ACTION objects.
void SetConditions(const TOOL_ACTION &aAction, const ACTION_CONDITIONS &aConditions)
Set the conditions the UI elements for activating a specific tool action should use for determining t...
Handles how to draw a screen (a board, a schematic ...)
void SetContentModified(bool aModified=true)
constexpr BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE)
Modify a given item in the model.
Handle actions that are shared between different applications.
A subgraph is a set of items that are electrically connected on a single sheet.
Dialog to update or change schematic library symbols.
virtual bool doAutoSave()
This should be overridden by the derived class to handle the auto save feature.
virtual APP_SETTINGS_BASE * config() const
Return the settings object used in SaveSettings(), and is overloaded in KICAD_MANAGER_FRAME.
virtual void ProjectChanged()
Notification event that the project has changed.
UNDO_REDO_CONTAINER m_undoList
void ShowChangedLanguage() override
Redraw the menus and what not in current language.
virtual void setupUIConditions()
Setup the UI conditions for the various actions and their controls in this frame.
virtual void ClearUndoRedoList()
Clear the undo and redo list using ClearUndoORRedoList()
SETTINGS_MANAGER * GetSettingsManager() const
virtual void OnModify()
Must be called after a model change in order to set the "modify" flag and do other frame-specific pro...
ACTION_TOOLBAR * m_tbRight
TOOLBAR_SETTINGS * m_toolbarSettings
void FinishAUIInitialization()
void UpdateFileHistory(const wxString &FullFileName, FILE_HISTORY *aFileHistory=nullptr)
Update the list of recently opened files.
virtual void RecreateToolbars()
ACTION_TOOLBAR * m_tbLeft
virtual void OnSize(wxSizeEvent &aEvent)
virtual void ClearFileHistory()
Remove all files from the file history.
virtual void OnDropFiles(wxDropFilesEvent &aEvent)
Handle event fired when a file is dropped to the window.
std::map< const wxString, TOOL_ACTION * > m_acceptedExts
Associate file extensions with action to execute.
wxString GetFileFromHistory(int cmdId, const wxString &type, FILE_HISTORY *aFileHistory=nullptr)
Fetch the file name from the file history list.
virtual int GetUndoCommandCount() const
ACTION_TOOLBAR * m_tbTopMain
bool m_isClosing
Set by the close window event handler after frames are asked if they can close.
void ReCreateMenuBar()
Recreate the menu bar.
EDA_DRAW_PANEL_GAL::GAL_TYPE m_canvasType
The current canvas type.
void setupUnits(APP_SETTINGS_BASE *aCfg)
virtual void SwitchCanvas(EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType)
Change the current rendering backend.
virtual void OnSize(wxSizeEvent &event) override
Recalculate the size of toolbars and display panel when the frame size changes.
GAL_DISPLAY_OPTIONS_IMPL & GetGalDisplayOptions()
Return a reference to the gal rendering options used by GAL for rendering.
virtual void resolveCanvasType()
Determine the canvas type to load (with prompt if required) and initializes m_canvasType.
static const wxString PropertiesPaneName()
EDA_MSG_PANEL * m_messagePanel
virtual void SetScreen(BASE_SCREEN *aScreen)
virtual void UpdateMsgPanel()
Redraw the message panel.
void FocusOnLocation(const VECTOR2I &aPos, bool aAllowScroll=true)
Useful to focus on a particular location, in find functions.
virtual void ClearFocus()
SEARCH_PANE * m_searchPane
static const wxString DesignBlocksPaneName()
std::unique_ptr< EDA_SEARCH_DATA > m_findReplaceData
PROPERTIES_PANEL * m_propertiesPanel
bool m_showBorderAndTitleBlock
GAL_TYPE GetBackend() const
Return the type of backend currently used by GAL canvas.
void ForceRefresh()
Force a redraw.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
void SetEventDispatcher(TOOL_DISPATCHER *aEventDispatcher)
Set a dispatcher that processes events and forwards them to tools.
A base class for most all the KiCad significant classes used in schematics and boards.
virtual const VECTOR2I GetFocusPosition() const
Similar to GetPosition() but allows items to return their visual center rather than their anchor.
KICAD_T Type() const
Returns the type of object.
bool IsBrightened() const
Specialization of the wxAuiPaneInfo class for KiCad panels.
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
virtual const wxString & GetText() const
Return the string associated with the text object.
SELECTION_CONDITION NoActiveTool()
Create a functor testing if there are no tools active in the frame.
SELECTION_CONDITION BoundingBoxes()
SELECTION_CONDITION RedoAvailable()
Create a functor that tests if there are any items in the redo queue.
SELECTION_CONDITION CurrentTool(const TOOL_ACTION &aTool)
Create a functor testing if the specified tool is the current active tool in the frame.
SELECTION_CONDITION GridVisible()
Create a functor testing if the grid is visible in a frame.
SELECTION_CONDITION GridOverrides()
Create a functor testing if the grid overrides wires is enabled in a frame.
PANEL_ANNOTATE m_AnnotatePanel
EE_TYPE OfType(KICAD_T aType) const
SEVERITY GetSeverity(int aErrorCode) const
void ReadWindowSettings(WINDOW_SETTINGS &aCfg)
Read GAL config options from application-level config.
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
APP_SETTINGS_BASE * KifaceSettings() const
void SetDefaultFont(const wxString &aFont)
Contains methods for drawing schematic-specific items.
void SetSchematic(SCHEMATIC *aSchematic)
void Update(const KIGFX::VIEW_ITEM *aItem, int aUpdateFlags) const override
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
DS_PROXY_VIEW_ITEM * GetDrawingSheet() const
void SetScale(double aScale, VECTOR2D aAnchor={ 0, 0 }) override
Set the scaling factor, zooming around a given anchor point.
An abstract base class for deriving all objects that can be added to a VIEW.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
void SetLayerVisible(int aLayer, bool aVisible=true)
Control the visibility of a particular layer.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
void SetCenter(const VECTOR2D &aCenter)
Set the center point of the VIEW (i.e.
void UpdateAllItemsConditionally(int aUpdateFlags, std::function< bool(VIEW_ITEM *)> aCondition)
Update items in the view according to the given flags and condition.
wxString AsString() const
KIWAY_PLAYER(KIWAY *aKiway, wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aFrameName, const EDA_IU_SCALE &aIuScale)
bool Destroy() override
Our version of Destroy() which is virtual from wxWidgets.
virtual bool OpenProjectFiles(const std::vector< wxString > &aFileList, int aCtl=0)
Open a project or set of files given by aFileList.
void OnSockRequestServer(wxSocketEvent &evt)
void OnSockRequest(wxSocketEvent &evt)
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
virtual KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=nullptr)
Return the KIWAY_PLAYER* given a FRAME_T.
virtual void ExpressMail(FRAME_T aDestination, MAIL_T aCommand, std::string &aPayload, wxWindow *aSource=nullptr, bool aFromOtherThread=false)
Send aPayload to aDestination from aSource.
virtual KIFACE * KiFACE(FACE_T aFaceId, bool doLoad=true)
Return the KIFACE* given a FACE_T.
LOCAL_HISTORY & LocalHistory()
Return the LOCAL_HISTORY associated with this KIWAY.
Define a library symbol object.
std::unique_ptr< LIB_SYMBOL > Flatten() const
Return a flattened symbol inheritance to the caller.
bool CommitDuplicateOfLastSave(const wxString &aProjectPath, const wxString &aFileType, const wxString &aMessage)
Create a new commit duplicating the tree pointed to by Last_Save_<fileType> and move the Last_Save_<f...
void NoteFileChange(const wxString &aFile)
Record that a file has been modified and should be included in the next snapshot.
void RegisterSaver(const void *aSaverObject, const std::function< void(const wxString &, std::vector< wxString > &)> &aSaver)
Register a saver callback invoked during autosave history commits.
Tree view item data for the net navigator.
A singleton reporter that reports to nowhere.
int GetHeightIU(double aIUScale) const
Gets the page height in IU.
int GetWidthIU(double aIUScale) const
Gets the page width in IU.
A progress reporter interface for use in multi-threaded environments.
virtual const wxString GetProjectFullName() const
Return the full path and name of the project.
virtual const wxString GetProjectPath() const
Return the full path of the project.
virtual const wxString AbsolutePath(const wxString &aFileName) const
Fix up aFileName if it is relative to the project's directory to be an absolute path and filename.
These are loaded from Eeschema settings but then overwritten by the project settings.
TEMPLATES m_TemplateFieldNames
bool m_IntersheetRefsShow
Holds all the data relating to one schematic.
void SetCurrentSheet(const SCH_SHEET_PATH &aPath)
void Reset()
Initialize this schematic to a blank one, unloading anything existing.
void RecomputeIntersheetRefs()
Update the schematic's page reference map for all global labels, and refresh the labels so that they ...
wxString GetFileName() const
Helper to retrieve the filename from the root sheet screen.
void AddVariant(const wxString &aVariantName)
SCHEMATIC_SETTINGS & Settings() const
SCH_ITEM * ResolveItem(const KIID &aID, SCH_SHEET_PATH *aPathOut=nullptr, bool aAllowNullptrReturn=false) const
SCH_SHEET_LIST Hierarchy() const
Return the full schematic flattened hierarchical sheet list.
void DeleteVariant(const wxString &aVariantName)
Delete all information for aVariantName.
void SetProject(PROJECT *aPrj)
SCH_SCREEN * RootScreen() const
Helper to retrieve the screen of the root sheet.
wxArrayString GetVariantNamesForUI() const
Return an array of variant names for using in wxWidgets UI controls.
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
void RecalculateConnections(SCH_COMMIT *aCommit, SCH_CLEANUP_FLAGS aCleanupFlags, TOOL_MANAGER *aToolManager, PROGRESS_REPORTER *aProgressReporter=nullptr, KIGFX::SCH_VIEW *aSchView=nullptr, std::function< void(SCH_ITEM *)> *aChangedItemHandler=nullptr, PICKED_ITEMS_LIST *aLastChangeList=nullptr)
Generate the connection data for the entire schematic hierarchy.
ERC_SETTINGS & ErcSettings() const
Gather all the actions that are shared by tools.
static TOOL_ACTION rotateCCW
static TOOL_ACTION placeClassLabel
static TOOL_ACTION placeSheetPin
static TOOL_ACTION saveSheetAsDesignBlock
static TOOL_ACTION mirrorV
static TOOL_ACTION drawSheetFromFile
static TOOL_ACTION toggleOPCurrents
static TOOL_ACTION saveToLinkedDesignBlock
static TOOL_ACTION saveSelectionAsDesignBlock
static TOOL_ACTION placeGlobalLabel
static TOOL_ACTION drawTextBox
static TOOL_ACTION toggleAnnotateAuto
static TOOL_ACTION ddAddImage
static TOOL_ACTION drawArc
static TOOL_ACTION drawSheet
static TOOL_ACTION toggleERCWarnings
static TOOL_ACTION toggleDirectiveLabels
static TOOL_ACTION highlightNetTool
static TOOL_ACTION leaveSheet
static TOOL_ACTION ddImportGraphics
static TOOL_ACTION toggleHiddenFields
static TOOL_ACTION drawRectangle
static TOOL_ACTION drawLines
static TOOL_ACTION placeHierLabel
static TOOL_ACTION alignTop
static TOOL_ACTION alignRight
static TOOL_ACTION placeLabel
static TOOL_ACTION drawCircle
static TOOL_ACTION placeBusWireEntry
static TOOL_ACTION drawBezier
static TOOL_ACTION drawWire
static TOOL_ACTION remapSymbols
static TOOL_ACTION rotateCW
static TOOL_ACTION alignBottom
static TOOL_ACTION showHierarchy
static TOOL_ACTION showNetNavigator
static TOOL_ACTION placeJunction
static TOOL_ACTION markSimExclusions
static TOOL_ACTION drawRuleArea
static TOOL_ACTION placeSymbol
static TOOL_ACTION placeImage
static TOOL_ACTION alignLeft
static TOOL_ACTION toggleERCErrors
static TOOL_ACTION alignCenterX
static TOOL_ACTION angleSnapModeChanged
static TOOL_ACTION placeLinkedDesignBlock
static TOOL_ACTION drawSheetFromDesignBlock
static TOOL_ACTION mirrorH
static TOOL_ACTION placeDesignBlock
static TOOL_ACTION toggleOPVoltages
static TOOL_ACTION drawBus
static TOOL_ACTION drawTable
static TOOL_ACTION ddAppendFile
static TOOL_ACTION placeSchematicText
static TOOL_ACTION showDesignBlockPanel
static TOOL_ACTION togglePinAltIcons
static TOOL_ACTION toggleERCExclusions
static TOOL_ACTION updateNetHighlighting
static TOOL_ACTION alignCenterY
static TOOL_ACTION placeNoConnect
static TOOL_ACTION toggleHiddenPins
static TOOL_ACTION syncSheetPins
static TOOL_ACTION placePower
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
SCH_BASE_FRAME(KIWAY *aKiway, wxWindow *aParent, FRAME_T aWindowType, const wxString &aTitle, const wxPoint &aPosition, const wxSize &aSize, long aStyle, const wxString &aFrameName)
SCH_RENDER_SETTINGS * GetRenderSettings()
void doCloseWindow() override
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
DIALOG_SCH_FIND * m_findReplaceDialog
void CommonSettingsChanged(int aFlags) override
Notification event that some of the common (suite-wide) settings have changed.
EESCHEMA_SETTINGS * eeconfig() const
PANEL_SCH_SELECTION_FILTER * m_selectionFilterPanel
virtual void UpdateItem(EDA_ITEM *aItem, bool isAddOrDelete=false, bool aUpdateRtree=false)
Mark an item for refresh.
virtual void Push(const wxString &aMessage=wxT("A commit"), int aCommitFlags=0) override
Execute the changes.
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
bool HasDriverChanged() const
wxString Name(bool aIgnoreSheet=false) const
void ClearDriverChanged()
Handle design block actions in the schematic editor.
KIGFX::SCH_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void DisplaySheet(SCH_SCREEN *aScreen)
Group generic conditions for PCB editor states.
int UpdateNetHighlighting(const TOOL_EVENT &aEvent)
Launch a tool to highlight nets.
Schematic editor (Eeschema) main window.
void DefaultExecFlags()
Reset the execution flags to defaults for external netlist and bom generators.
void OnCrossProbeFlashTimer(wxTimerEvent &aEvent)
int m_crossProbeFlashPhase
void ToggleProperties() override
bool IsContentModified() const override
Get if the current schematic has been modified but not saved.
void RefreshOperatingPointDisplay()
Refresh the display of any operating points.
wxPageSetupDialogData m_pageSetupData
SELECTION & GetCurrentSelection() override
Get the current selection from the canvas area.
wxTreeCtrl * m_netNavigator
std::vector< std::unique_ptr< SCH_ITEM > > m_items_to_repeat
For the repeat-last-item cmd.
@ ID_NET_NAVIGATOR_EXPAND_ALL
@ ID_NET_NAVIGATOR_SEARCH_REGEX
@ ID_NET_NAVIGATOR_FIND_IN_INSPECTOR
@ ID_NET_NAVIGATOR_COLLAPSE_ALL
@ ID_NET_NAVIGATOR_SEARCH_WILDCARD
void FocusOnItem(EDA_ITEM *aItem, bool aAllowScroll=true) override
Focus on a particular canvas item.
void onResizeNetNavigator(wxSizeEvent &aEvent)
void updateSelectionFilterVisbility() override
Selection filter panel doesn't have a dedicated visibility control, so show it if any other AUI panel...
bool m_highlightedConnChanged
void onNetNavigatorSelChanging(wxTreeEvent &aEvent)
void OnModify() override
Must be called after a schematic change in order to set the "modify" flag and update other data struc...
void showNetNavigatorMenu(const wxTreeItemId &aItem)
void ShowAllIntersheetRefs(bool aShow)
void SaveProjectLocalSettings() override
Save changes to the project settings to the project (.pro) file.
bool OpenProjectFiles(const std::vector< wxString > &aFileSet, int aCtl=0) override
Open a project or set of files given by aFileList.
void doCloseWindow() override
DIALOG_BOOK_REPORTER * m_diffSymbolDialog
void ToggleLibraryTree() override
void SetHighlightedConnection(const wxString &aConnection, const NET_NAVIGATOR_ITEM_DATA *aSelection=nullptr)
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
bool ReadyToNetlist(const wxString &aAnnotateMessage)
Check if we are ready to write a netlist file for the current schematic.
wxWindow * createHighlightedNetNavigator()
void onCloseErcDialog(wxCommandEvent &aEvent)
void UpdateHierarchySelection()
Update the hierarchy navigation tree selection (cross-probe from schematic to hierarchy pane).
bool m_syncingPcbToSchSelection
void SetScreen(BASE_SCREEN *aScreen) override
friend class SCH_EDITOR_CONTROL
bool doAutoSave() override
Save the schematic files that have been modified and not yet saved.
wxChoice * m_currentVariantCtrl
void SaveSymbolToSchematic(const LIB_SYMBOL &aSymbol, const KIID &aSchematicSymbolUUID)
Update a schematic symbol from a LIB_SYMBOL.
void SetCurrentVariant(const wxString &aVariantName)
void onSize(wxSizeEvent &aEvent)
void CommonSettingsChanged(int aFlags) override
Called after the preferences dialog is run.
void ShowChangedLanguage() override
Redraw the menus and what not in current language.
BITMAP_BUTTON * m_netNavigatorMenuButton
void onNetNavigatorKey(wxKeyEvent &aEvent)
void configureToolbars() override
std::vector< wxEvtHandler * > m_schematicChangeListeners
void HardRedraw() override
Rebuild the GAL and redraw the screen.
void OnClearFileHistory(wxCommandEvent &aEvent)
bool GetShowAllPins() const override
Allow edit frame to show/hide hidden pins.
void CreateDefaultScreens()
SCHEMATIC * m_schematic
The currently loaded schematic.
void onNetNavigatorFilterChanged(wxCommandEvent &aEvent)
void onCloseSymbolFieldsTableDialog(wxCommandEvent &aEvent)
SCH_SHEET_PATH & GetCurrentSheet() const
void RecalculateConnections(SCH_COMMIT *aCommit, SCH_CLEANUP_FLAGS aCleanupFlags, PROGRESS_REPORTER *aProgressReporter=nullptr)
Generate the connection data for the entire schematic hierarchy.
wxString m_netNavigatorFilterValue
void ProjectChanged() override
Notification event that the project has changed.
void OnLoadFile(wxCommandEvent &event)
SCHEMATIC & Schematic() const
void updateTitle()
Set the main window title bar text.
void SetSchematic(SCHEMATIC *aSchematic)
void ToggleSearch()
Toggle the show/hide state of Search pane.
bool LoadProjectSettings()
Load the KiCad project file (*.pro) settings specific to Eeschema.
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
void RefreshNetNavigator(const NET_NAVIGATOR_ITEM_DATA *aSelection=nullptr)
wxSearchCtrl * m_netNavigatorFilter
wxString GetFullScreenDesc() const override
static const wxString SearchPaneName()
DIALOG_BOOK_REPORTER * GetSymbolDiffDialog()
bool canCloseWindow(wxCloseEvent &aCloseEvent) override
void onNetNavigatorContextMenu(wxContextMenuEvent &aEvent)
void RecomputeIntersheetRefs()
Update the schematic's page reference map for all global labels, and refresh the labels so that they ...
DIALOG_ERC * GetErcDialog()
void sendNetlistToCvpcb()
Send the KiCad netlist over to CVPCB.
SCH_DESIGN_BLOCK_PANE * m_designBlocksPane
void UpdateHierarchyNavigator(bool aRefreshNetNavigator=true, bool aClear=false)
Update the hierarchy navigation tree and history.
SCH_EDIT_FRAME(KIWAY *aKiway, wxWindow *aParent)
void ToggleSchematicHierarchy()
Toggle the show/hide state of the left side schematic navigation panel.
std::vector< KIID > m_crossProbeFlashItems
Items to flash.
void LoadDrawingSheet()
Load the drawing sheet file.
void onNetNavigatorMenuCommand(wxCommandEvent &aEvent)
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
std::vector< LIB_ID > m_designBlockHistoryList
void OnPageSettingsChange() override
Called when modifying the page settings.
void ClearRepeatItemsList()
Clear the list of items which are to be repeated with the insert key.
const BOX2I GetDocumentExtents(bool aIncludeAllVisible=true) const override
Return bounding box of document with option to not include some items.
void CaptureHierarchyPaneSize()
void StartCrossProbeFlash(const std::vector< SCH_ITEM * > &aItems)
void initScreenZoom()
Initialize the zoom value of the current screen and mark the screen as zoom-initialized.
void UpdateLabelsHierarchyNavigator()
Update the hierarchy navigation tree labels.
void OnImportProject(wxCommandEvent &event)
double GetSchematicHopOverScale()
static const wxString SchematicHierarchyPaneName()
void setupUIConditions() override
Setup the UI conditions for the various actions and their controls in this frame.
EDA_ITEM * ResolveItem(const KIID &aId, bool aAllowNullptrReturn=false) const override
Fetch an item by KIID.
wxString m_netNavigatorMenuNetName
void unitsChangeRefresh() override
Called when when the units setting has changed to allow for any derived classes to handle refreshing ...
void RemoveSchematicChangeListener(wxEvtHandler *aListener)
Remove aListener to from the schematic changed listener list.
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
int GetSchematicJunctionSize()
void DisplayCurrentSheet()
Draw the current sheet on the display.
~SCH_EDIT_FRAME() override
const wxString & GetHighlightedConnection() const
void UpdateItem(EDA_ITEM *aItem, bool isAddOrDelete=false, bool aUpdateRtree=false) override
Mark an item for refresh.
void UpdateNetHighlightStatus()
wxString GetScreenDesc() const override
Return a human-readable description of the current screen.
void onNetNavigatorItemMenu(wxTreeEvent &aEvent)
void AddCopyForRepeatItem(const SCH_ITEM *aItem)
DIALOG_SYMBOL_FIELDS_TABLE * GetSymbolFieldsTableDialog()
void OnResizeHierarchyNavigator(wxSizeEvent &aEvent)
wxString GetCurrentFileName() const override
Get the full filename + path of the currently opened file in the frame.
wxString m_highlightedConn
The highlighted net or bus or empty string.
static const wxString NetNavigatorPaneName()
void onCloseSymbolDiffDialog(wxCommandEvent &aEvent)
void IntersheetRefUpdate(SCH_GLOBALLABEL *aItem) override
Callback from schematic ref update.
void OnExit(wxCommandEvent &event)
void AutoRotateItem(SCH_SCREEN *aScreen, SCH_ITEM *aItem)
Automatically set the rotation of an item (if the item supports it).
wxTimer m_crossProbeFlashTimer
Timer to toggle selection visibility.
void AddSchematicChangeListener(wxEvtHandler *aListener)
Add aListener to post #EDA_EVT_SCHEMATIC_CHANGED command events to.
HIERARCHY_PANE * m_hierarchy
DIALOG_SYMBOL_FIELDS_TABLE * m_symbolFieldsTableDialog
std::unique_ptr< GRID_HELPER > MakeGridHelper() override
void UpdateHopOveredWires(SCH_ITEM *aItem)
SEVERITY GetSeverity(int aErrorCode) const override
void onNetNavigatorSelection(wxTreeEvent &aEvent)
void FindNetInInspector(const wxString &aNetName)
void SaveCopyForRepeatItem(const SCH_ITEM *aItem)
Clone aItem and owns that clone in this container.
bool m_crossProbeFlashing
A set of SCH_ITEMs (i.e., without duplicates).
Base class for any item which can be embedded within the SCHEMATIC container class,...
SCH_ITEM * Duplicate(bool addToParentGroup, SCH_COMMIT *aCommit=nullptr, bool doClone=false) const
Routine to create a new copy of given item.
virtual void RunOnChildren(const std::function< void(SCH_ITEM *)> &aFunction, RECURSE_MODE aMode)
SCH_CONNECTION * Connection(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieve the connection associated with this object in the given sheet.
bool ResolveExcludedFromSim(const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString) const
bool AutoRotateOnPlacement() const
autoRotateOnPlacement
SPIN_STYLE GetSpinStyle() const
void AutoplaceFields(SCH_SCREEN *aScreen, AUTOPLACE_ALGO aAlgo) override
virtual void SetSpinStyle(SPIN_STYLE aSpinStyle)
Segment description base class to describe items which have 2 end points (track, wire,...
void SetOperatingPoint(const wxString &aText)
bool IsWire() const
Return true if the line is a wire.
const wxString & GetOperatingPoint() const
void SetOperatingPoint(const wxString &aText)
Tool that displays edit points allowing to modify items by dragging the points.
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
bool HasNoFullyDefinedLibIds()
Test all of the schematic symbols to see if all LIB_ID objects library nickname is not set.
const PAGE_INFO & GetPageSettings() const
void Clear(bool aFree=true)
Delete all draw items and clears the project settings.
void TestDanglingEnds(const SCH_SHEET_PATH *aPath=nullptr, std::function< void(SCH_ITEM *)> *aChangedHandler=nullptr) const
Test all of the connectable objects in the schematic for unused connection points.
const std::map< wxString, LIB_SYMBOL * > & GetLibSymbols() const
Fetch a list of unique LIB_SYMBOL object pointers required to properly render each SCH_SYMBOL in this...
double m_LastZoomLevel
last value for the zoom level, useful in Eeschema when changing the current displayed sheet to reuse ...
EE_RTREE & Items()
Get the full RTree, usually for iterating.
const wxString & GetFileName() const
void Update(SCH_ITEM *aItem, bool aUpdateLibSymbol=true)
Update aItem's bounding box in the tree.
SPIN_STYLE GetLabelOrientationForPoint(const VECTOR2I &aPosition, SPIN_STYLE aDefaultOrientation, const SCH_SHEET_PATH *aSheet) const
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
SCH_ITEM * ResolveItem(const KIID &aID, SCH_SHEET_PATH *aPathOut=nullptr, bool aAllowNullptrReturn=false) const
Fetch a SCH_ITEM by ID.
bool IsModified() const
Check the entire hierarchy for any modifications.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
wxString PathHumanReadable(bool aUseShortRootName=true, bool aStripTrailingSeparator=false) const
Return the sheet path in a human readable form made from the sheet names.
KIID_PATH Path() const
Get the sheet path as an KIID_PATH.
void UpdateAllScreenReferences() const
Update all the symbol references for this sheet path.
SCH_SCREEN * LastScreen()
SCH_SHEET * Last() const
Return a pointer to the last SCH_SHEET of the list.
void clear()
Forwarded method from std::vector.
size_t size() const
Forwarded method from std::vector.
EMBEDDED_FILES * GetEmbeddedFiles() override
SCH_SYMBOLs don't currently support embedded files, but their LIB_SYMBOL counterparts do.
bool IsAnnotated(const SCH_SHEET_PATH *aSheet) const
Check if the symbol has a valid annotation (reference) for the given sheet path.
std::vector< SCH_PIN * > GetPins(const SCH_SHEET_PATH *aSheet) const
Retrieve a list of the SCH_PINs for the given sheet path.
SCH_PIN * GetPin(const wxString &number) const
Find a symbol pin by number.
const wxString GetRef(const SCH_SHEET_PATH *aSheet, bool aIncludeUnit=false) const override
VECTOR2I GetPosition() const override
static SELECTION_CONDITION HasType(KICAD_T aType)
Create a functor that tests if among the selected items there is at least one of a given type.
static bool NotEmpty(const SELECTION &aSelection)
Test if there are any items selected.
static SELECTION_CONDITION MoreThan(int aNumber)
Create a functor that tests if the number of selected items is greater than the value given as parame...
static bool Idle(const SELECTION &aSelection)
Test if there no items selected or being edited.
static bool ShowAlways(const SELECTION &aSelection)
The default condition function (always returns true).
bool UnloadProject(PROJECT *aProject, bool aSave=true)
Save, unload and unregister the given PROJECT.
SIM_MODEL & CreateModel(SIM_MODEL::TYPE aType, const std::vector< SCH_PIN * > &aPins, REPORTER &aReporter)
void SetFilesStack(std::vector< EMBEDDED_FILES * > aFilesStack)
const SPICE_GENERATOR & SpiceGenerator() const
std::vector< std::reference_wrapper< const SIM_MODEL_PIN > > GetPins() const
virtual std::string ItemName(const SPICE_ITEM &aItem) const
Symbol library viewer main window.
The symbol library editor main window.
Symbol library viewer main window.
void AddTemplateFieldNames(const wxString &aSerializedFieldNames)
Add a serialized list of template field names.
void DeleteAllFieldNameTemplates(bool aGlobal)
Delete the entire contents.
wxString EnsureFileExtension(const wxString &aFilename, const wxString &aExtension)
It's annoying to throw up nag dialogs when the extension isn't right.
bool HandleUnsavedChanges(wxWindow *aParent, const wxString &aMessage, const std::function< bool()> &aSaveFunction)
Display a dialog with Save, Cancel and Discard Changes buttons.
int GetLastUnsavedChangesResponse()
Return the result code from the last call to HandleUnsavedChanges(): wxID_YES, wxID_NO or wxID_CANCEL...
void DisplayError(wxWindow *aParent, const wxString &aText)
Display an error or warning message box with aMessage.
This file is part of the common library.
wxDEFINE_EVENT(wxEVT_REFRESH_CUSTOM_COMMAND, wxEvent)
#define KICAD_DEFAULT_DRAWFRAME_STYLE
#define SCH_EDIT_FRAME_NAME
#define IGNORE_PARENT_GROUP
@ ID_IMPORT_NON_KICAD_SCH
const wxAuiPaneInfo & defaultSchSelectionFilterPaneInfo(wxWindow *aWindow)
const wxAuiPaneInfo & defaultPropertiesPaneInfo(wxWindow *aWindow)
const wxAuiPaneInfo & defaultNetNavigatorPaneInfo()
const wxAuiPaneInfo & defaultDesignBlocksPaneInfo(wxWindow *aWindow)
EVT_MENU_RANGE(ID_GERBVIEW_DRILL_FILE1, ID_GERBVIEW_DRILL_FILEMAX, GERBVIEW_FRAME::OnDrlFileHistory) EVT_MENU_RANGE(ID_GERBVIEW_ZIP_FILE1
const wxString PCBNEW_EXE
@ FRAME_SCH_SYMBOL_EDITOR
int ExecuteFile(const wxString &aEditorName, const wxString &aFileName, wxProcess *aCallback, bool aFileForKicad)
Call the executable file aEditorName with the parameter aFileName.
static const std::string NetlistFileExtension
static const std::string JpegFileExtension
static const std::string PngFileExtension
static const std::string LegacyPcbFileExtension
static const std::string KiCadSchematicFileExtension
static const std::string SVGFileExtension
static wxString LegacySchematicFileWildcard()
static wxString AllSchematicFilesWildcard()
static wxString KiCadSchematicFileWildcard()
const wxChar *const traceSchCurrentSheet
Flag to enable debug output of current sheet tracking in the schematic editor.
const wxChar *const traceCrossProbeFlash
Flag to enable debug output for cross-probe flash operations.
const wxChar *const traceApi
Flag to enable debug output related to the IPC API and its plugin system.
@ ID_EDA_SOCKET_EVENT_SERV
#define KICTL_CREATE
caller thinks requested project files may not exist.
@ REPAINT
Item needs to be redrawn.
@ GEOMETRY
Position or shape has changed.
PGM_BASE & Pgm()
The global program "get" accessor.
#define DIFF_SYMBOLS_DIALOG_NAME
#define CURRENT_TOOL(action)
T * GetToolbarSettings(const wxString &aFilename)
T * GetAppSettings(const char *aFilename)
KIWAY Kiway(KFCTL_STANDALONE)
std::vector< FAB_LAYER_COLOR > dummy
wxString UnescapeString(const wxString &aSource)
bool show_directive_labels
bool net_nav_search_mode_wildcard
int design_blocks_panel_float_width
int hierarchy_panel_docked_width
int hierarchy_panel_float_width
int search_panel_dock_direction
int hierarchy_panel_docked_height
int hierarchy_panel_float_height
wxSize net_nav_panel_float_size
int design_blocks_panel_float_height
bool schematic_hierarchy_float
int design_blocks_panel_docked_width
int properties_panel_width
wxPoint net_nav_panel_float_pos
wxSize net_nav_panel_docked_size
bool show_schematic_hierarchy
Implement a participant in the KIWAY alchemy.
virtual void PreloadLibraries(KIWAY *aKiway)
wxLogTrace helper definitions.
VECTOR2< int32_t > VECTOR2I
Definition of file extensions used in Kicad.
void SetAuiPaneSize(wxAuiManager &aManager, wxAuiPaneInfo &aPane, int aWidth, int aHeight)
Sets the size of an AUI pane, working around http://trac.wxwidgets.org/ticket/13180.