KiCad PCB EDA Suite
sch_edit_frame.h
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) 2015 Jean-Pierre Charras, jp.charras wanadoo.fr
5 * Copyright (C) 2008 Wayne Stambaugh <[email protected]>
6 * Copyright (C) 2004-2022 KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26#ifndef SCH_EDIT_FRAME_H
27#define SCH_EDIT_FRAME_H
28
29#include <stddef.h>
30#include <vector>
31#include <wx/cmndata.h>
32#include <wx/event.h>
33#include <wx/gdicmn.h>
34#include <wx/string.h>
35#include <wx/utils.h>
36
37#include <config_params.h>
38#include <core/typeinfo.h>
39#include <eda_base_frame.h>
40#include <eeschema_settings.h>
41#include <math/box2.h>
42#include <sch_base_frame.h>
43#include <template_fieldnames.h>
44
45class SCH_ITEM;
46class EDA_ITEM;
47class SCH_LINE;
48class SCH_TEXT;
49class SCH_BITMAP;
50class SCH_SHEET;
51class SCH_SHEET_PATH;
52class SCH_SHEET_PIN;
53class SCH_SYMBOL;
54class SCH_FIELD;
55class SCH_JUNCTION;
56class SCHEMATIC;
57class DIALOG_SCH_FIND;
58class wxFindReplaceData;
59class RESCUER;
60class HIERARCHY_PANE;
61
62// @todo Move this to transform alone with all of the transform manipulation code.
65{
66 SYM_NORMAL, // Normal orientation, no rotation or mirror
67 SYM_ROTATE_CLOCKWISE, // Rotate -90
69 SYM_ORIENT_0, // No rotation and no mirror id SYM_NORMAL
70 SYM_ORIENT_90, // Rotate 90, no mirror
71 SYM_ORIENT_180, // Rotate 180, no mirror
72 SYM_ORIENT_270, // Rotate -90, no mirror
73 SYM_MIRROR_X = 0x100, // Mirror around X axis
74 SYM_MIRROR_Y = 0x200 // Mirror around Y axis
75};
76
77
80{
83};
84
85
87{
91};
92
93
98{
99public:
100 SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
101 ~SCH_EDIT_FRAME() override;
102
103 SCH_SCREEN* GetScreen() const override;
104
105 SELECTION& GetCurrentSelection() override;
106
107 SCHEMATIC& Schematic() const;
108
112 bool GetShowAllPins() const override;
113
117 void SaveProjectSettings() override;
118
124 bool LoadProjectSettings();
125
126 void ShowSchematicSetupDialog( const wxString& aInitialPage = wxEmptyString );
127
128 void LoadSettings( APP_SETTINGS_BASE* aCfg ) override;
129 void SaveSettings( APP_SETTINGS_BASE* aCfg ) override;
130
131 void CreateScreens();
132 void ReCreateHToolbar() override;
133 void ReCreateVToolbar() override;
134 void ReCreateOptToolbar() override;
135
136 void setupUIConditions() override;
137
143 bool IsContentModified() const override;
144
149 void OnModify() override;
150
154 void RecordERCExclusions();
155
160
161 SEVERITY GetSeverity( int aErrorCode ) const override;
162
166 wxString GetScreenDesc() const override;
167
186 void ExecuteRemoteCommand( const char* cmdline ) override;
187
188 void KiwayMailIn( KIWAY_EXPRESS& aEvent ) override;
189
193 void AutoRotateItem( SCH_SCREEN* aScreen, SCH_ITEM* aItem );
194
199 void AddItemToScreenAndUndoList( SCH_SCREEN* aScreen, SCH_ITEM* aItem, bool aUndoAppend );
200
204 void ShowFindReplaceDialog( bool aReplace );
205
210
216
217 void ShowFindReplaceStatus( const wxString& aMsg, int aStatusTime );
219
223 void OnFindDialogClose();
224
235 void BreakSegment( SCH_LINE* aSegment, const VECTOR2I& aPoint,
236 SCH_LINE** aNewSegment = nullptr, SCH_SCREEN* aScreen = nullptr );
237
248 bool BreakSegments( const VECTOR2I& aPoint, SCH_SCREEN* aScreen = nullptr );
249
259 bool BreakSegmentsOnJunctions( SCH_SCREEN* aScreen = nullptr );
260
265 void TestDanglingEnds();
266
274 void SendSelectItemsToPcb( const std::vector<EDA_ITEM*>& aItems, bool aForce );
275
281 void SendCrossProbeNetName( const wxString& aNetName );
282
288 void SetCrossProbeConnection( const SCH_CONNECTION* aConnection );
289
294
296 {
297 return m_highlightedConn;
298 }
299
300 void SetHighlightedConnection( const SCH_CONNECTION* aConnection )
301 {
302 m_highlightedConn = aConnection;
303 }
304
313 bool ReadyToNetlist( const wxString& aAnnotateMessage );
314
330 bool WriteNetListFile( int aFormat, const wxString& aFullFileName, unsigned aNetlistOptions,
331 REPORTER* aReporter = nullptr );
332
339 void DeleteAnnotation( ANNOTATE_SCOPE_T aAnnotateScope, bool aRecursive, bool* appendUndo );
340
366 void AnnotateSymbols( ANNOTATE_SCOPE_T aAnnotateScope, ANNOTATE_ORDER_T aSortOption,
367 ANNOTATE_ALGO_T aAlgoOption, bool aRecursive, int aStartNumber,
368 bool aResetAnnotation, bool aRepairTimestamps, REPORTER& aReporter,
369 bool appendUndo = false );
370
387 int CheckAnnotate( ANNOTATION_ERROR_HANDLER aErrorHandler,
388 ANNOTATE_SCOPE_T aAnnotateScope = ANNOTATE_ALL,
389 bool aRecursive = true );
390
397 int ModalAnnotate( const wxString& aMessage );
398
399 // Functions used for hierarchy handling
401
402 void SetCurrentSheet( const SCH_SHEET_PATH& aSheet );
403
404 void UpdateItem( EDA_ITEM* aItem, bool isAddOrDelete = false,
405 bool aUpdateRtree = false ) override;
406
410 void HardRedraw() override;
411
415 void DisplayCurrentSheet();
416
421
428 void OnPageSettingsChange() override;
429
436
437 wxPageSetupDialogData& GetPageSetupData() { return m_pageSetupData; }
438
439 void NewProject();
440 void LoadProject();
441
449 bool SaveProject( bool aSaveAs = false );
450
451 bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
452
453 wxString GetCurrentFileName() const override;
454
460 bool AppendSchematic();
461
470 bool AddSheetAndUpdateDisplay( const wxString aFullFileName );
471
479 bool AskToSaveChanges();
480
481 SCH_JUNCTION* AddJunction( SCH_SCREEN* aScreen, const VECTOR2I& aPos, bool aAppendToUndo,
482 bool aFinal = true );
483
493 bool SchematicCleanUp( SCH_SCREEN* aScreen = nullptr );
494
505 bool TrimWire( const VECTOR2I& aStart, const VECTOR2I& aEnd );
506
507 void OnOpenPcbnew( wxCommandEvent& event );
508 void OnOpenCvpcb( wxCommandEvent& event );
509 void OnUpdatePCB( wxCommandEvent& event );
510 void OnAnnotate( wxCommandEvent& event );
511
520 bool CheckSheetForRecursion( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy );
521
533 bool AllowCaseSensitiveFileNameClashes( const wxString& aSchematicFileName );
534
563 bool EditSheetProperties( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy,
564 bool* aClearAnnotationNewItems );
565
566 void InitSheet( SCH_SHEET* aSheet, const wxString& aNewFilename );
567
612 bool LoadSheetFromFile( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy,
613 const wxString& aFileName );
614
621 void DeleteJunction( SCH_ITEM* aItem, bool aAppend = false );
622
623 void ConvertPart( SCH_SYMBOL* aSymbol );
624
625 void SelectUnit( SCH_SYMBOL* aSymbol, int aUnit );
626
627 /* Undo - redo */
628
632 void StartNewUndo();
633
650 void SaveCopyInUndoList( SCH_SCREEN* aScreen, SCH_ITEM* aItemToCopy, UNDO_REDO aTypeCommand,
651 bool aAppend, bool aDirtyConnectivity = true );
652
661 void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList, UNDO_REDO aTypeCommand,
662 bool aAppend, bool aDirtyConnectivity = true );
663
670
682 void ClearUndoORRedoList( UNDO_REDO_LIST whichList, int aItemCount = -1 ) override;
683
687 void SaveCopyForRepeatItem( const SCH_ITEM* aItem );
688 void AddCopyForRepeatItem( const SCH_ITEM* aItem );
689
694 const std::vector<std::unique_ptr<SCH_ITEM>>& GetRepeatItems() const
695 {
696 return m_items_to_repeat;
697 }
698
699 EDA_ITEM* GetItem( const KIID& aId ) const override;
700
706
716 bool CreateArchiveLibraryCacheFile( bool aUseCurrentSheetFilename = false );
717
724 bool CreateArchiveLibrary( const wxString& aFileName );
725
729 virtual void PrintPage( const RENDER_SETTINGS* aSettings ) override;
730
731 void SetNetListerCommand( const wxString& aCommand ) { m_netListerCommand = aCommand; }
732
736 void DefaultExecFlags() { m_exec_flags = wxEXEC_SYNC; }
737
743 void SetExecFlags( const int aFlags ) { m_exec_flags |= aFlags; }
744
751 void ClearExecFlags( const int aFlags ) { m_exec_flags &= ~( aFlags ); }
752
753 wxString GetNetListerCommand() const { return m_netListerCommand; }
754
758 void RecalculateConnections( SCH_CLEANUP_FLAGS aCleanupFlags );
759
763 void CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) override;
764
766
767 void ShowChangedLanguage() override;
768
769 void SetScreen( BASE_SCREEN* aScreen ) override;
770
771 const BOX2I GetDocumentExtents( bool aIncludeAllVisible = true ) const override;
772
774
775 void FocusOnItem( SCH_ITEM* aItem );
776
778
787 void SaveSymbolToSchematic( const LIB_SYMBOL& aSymbol, const KIID& aSchematicSymbolUUID );
788
794
795 void ShowAllIntersheetRefs( bool aShow );
796
803 virtual void CheckForAutoSaveFile( const wxFileName& aFileName ) override;
804
805
810
814 static const wxString SchematicHierarchyPaneName()
815 {
816 return wxT( "SchematicHierarchy" );
817 }
818
819 DECLARE_EVENT_TABLE()
820
821protected:
827 bool doAutoSave() override;
828
829 void doReCreateMenuBar() override;
830
834 void sendNetlistToCvpcb();
835
836 void onSize( wxSizeEvent& aEvent );
837
838private:
839 // Called when resizing the Hierarchy Navigator panel
840 void OnResizeHierarchyNavigator( wxSizeEvent& aEvent );
841
842 // Sets up the tool framework
843 void setupTools();
844
845 void OnExit( wxCommandEvent& event );
846
847 void OnLoadFile( wxCommandEvent& event );
848 void OnAppendProject( wxCommandEvent& event );
849 void OnImportProject( wxCommandEvent& event );
850
851 void OnClearFileHistory( wxCommandEvent& aEvent );
852
853 bool canCloseWindow( wxCloseEvent& aCloseEvent ) override;
854 void doCloseWindow() override;
855
864 void updateTitle();
865
869 void initScreenZoom();
870
880
887 bool importFile( const wxString& aFileName, int aFileType );
888
896 bool saveSchematicFile( SCH_SHEET* aSheet, const wxString& aSavePath );
897
903 void mapExistingAnnotation( std::map<wxString, wxString>& aMap );
904
905 bool updateAutoSaveFile();
906
907 const wxString& getAutoSaveFileName() const;
908
909private:
910 // The schematic editor control class should be able to access some internal
911 // functions of the editor frame.
912 friend class SCH_EDITOR_CONTROL;
914
917
918 wxPageSetupDialogData m_pageSetupData;
919 std::vector<std::unique_ptr<SCH_ITEM>> m_items_to_repeat;
920
925
927
929
930 bool m_syncingPcbToSchSelection; // Recursion guard when synchronizing selection from PCB
931};
932
933
934#endif // SCH_EDIT_FRAME_H
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:110
Handles how to draw a screen (a board, a schematic ...)
Definition: base_screen.h:41
UNDO_REDO_LIST
Specifies whether we are interacting with the undo or redo stacks.
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:85
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
Definition: kiid.h:48
Carry a payload from one KIWAY_PLAYER to another within a PROJECT.
Definition: kiway_express.h:39
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition: kiway.h:274
Define a library symbol object.
Definition: lib_symbol.h:99
A holder to handle information on schematic or board items.
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:71
Holds all the data relating to one schematic.
Definition: schematic.h:61
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
Object to handle a bitmap image that can be inserted in a schematic.
Definition: sch_bitmap.h:41
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
Handle actions specific to the schematic editor.
Schematic editor (Eeschema) main window.
void ShowSchematicSetupDialog(const wxString &aInitialPage=wxEmptyString)
void RollbackSchematicFromUndo()
Perform an undo of the last edit WITHOUT logging a corresponding redo.
void DefaultExecFlags()
Reset the execution flags to defaults for external netlist and bom generators.
bool IsSyncingSelection()
bool SchematicCleanUp(SCH_SCREEN *aScreen=nullptr)
Perform routine schematic cleaning including breaking wire and buses and deleting identical objects s...
bool IsContentModified() const override
Get if the current schematic has been modified but not saved.
wxPageSetupDialogData m_pageSetupData
void ConvertPart(SCH_SYMBOL *aSymbol)
Definition: picksymbol.cpp:278
void DeleteJunction(SCH_ITEM *aItem, bool aAppend=false)
Removes a given junction and heals any wire segments under the junction.
SELECTION & GetCurrentSelection() override
Get the current selection from the canvas area.
EDA_ITEM * GetItem(const KIID &aId) const override
Fetch an item by KIID.
void mapExistingAnnotation(std::map< wxString, wxString > &aMap)
Fill a map of uuid -> reference from the currently loaded schematic.
Definition: annotate.cpp:38
const wxString & getAutoSaveFileName() const
std::vector< std::unique_ptr< SCH_ITEM > > m_items_to_repeat
For the repeat-last-item cmd.
bool LoadSheetFromFile(SCH_SHEET *aSheet, SCH_SHEET_PATH *aHierarchy, const wxString &aFileName)
Load a the KiCad schematic file aFileName into the sheet aSheet.
Definition: sheet.cpp:105
const SCH_CONNECTION * GetHighlightedConnection() const
bool TrimWire(const VECTOR2I &aStart, const VECTOR2I &aEnd)
If any single wire passes through both points, remove the portion between the two points,...
void SaveProjectSettings() override
Save changes to the project settings to the project (.pro) file.
void OnOpenCvpcb(wxCommandEvent &event)
void SetExecFlags(const int aFlags)
Set (adds) specified flags for next execution of external generator of the netlist or bom.
void OnModify() override
Must be called after a schematic change in order to set the "modify" flag and update other data struc...
void ShowAllIntersheetRefs(bool aShow)
bool OpenProjectFiles(const std::vector< wxString > &aFileSet, int aCtl=0) override
Open a project or set of files given by aFileList.
void doCloseWindow() override
bool AllowCaseSensitiveFileNameClashes(const wxString &aSchematicFileName)
Check aSchematicFileName for a potential file name case sensitivity clashes.
Definition: sheet.cpp:623
void AddItemToScreenAndUndoList(SCH_SCREEN *aScreen, SCH_ITEM *aItem, bool aUndoAppend)
Add an item to the schematic and adds the changes to the undo/redo container.
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.
void ShowFindReplaceDialog(bool aReplace)
Run the Find or Find & Replace dialog.
void InitSheet(SCH_SHEET *aSheet, const wxString &aNewFilename)
Definition: sheet.cpp:97
void UpdateHierarchySelection()
Update the hierarchy navigation tree selection (cross-probe from schematic to hierarchy pane).
bool m_syncingPcbToSchSelection
bool CheckSheetForRecursion(SCH_SHEET *aSheet, SCH_SHEET_PATH *aHierarchy)
Verify that aSheet will not cause a recursion error in aHierarchy.
Definition: sheet.cpp:47
void SetScreen(BASE_SCREEN *aScreen) override
bool AskToSaveChanges()
Check if any of the screens has unsaved changes and asks the user whether to save or drop them.
void OnFindDialogClose()
Notification that the Find dialog has closed.
wxString GetNetListerCommand() const
bool doAutoSave() override
Save the schematic files that have been modified and not yet saved.
void SaveSymbolToSchematic(const LIB_SYMBOL &aSymbol, const KIID &aSchematicSymbolUUID)
Update a schematic symbol from a LIB_SYMBOL.
void onSize(wxSizeEvent &aEvent)
void RecordERCExclusions()
Scan existing markers and record data from any that are Excluded.
void doReCreateMenuBar() override
void ShowChangedLanguage() override
void SendSelectItemsToPcb(const std::vector< EDA_ITEM * > &aItems, bool aForce)
Sends items to Pcbnew for selection.
wxPageSetupDialogData & GetPageSetupData()
void SaveCopyInUndoList(SCH_SCREEN *aScreen, SCH_ITEM *aItemToCopy, UNDO_REDO aTypeCommand, bool aAppend, bool aDirtyConnectivity=true)
Create a copy of the current schematic item, and put it in the undo list.
void SendCrossProbeClearHighlight()
Tell Pcbnew to clear the existing highlighted net, if one exists.
void CommonSettingsChanged(bool aEnvVarsChanged, bool aTextVarsChanged) override
Called after the preferences dialog is run.
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 OnAppendProject(wxCommandEvent &event)
bool WriteNetListFile(int aFormat, const wxString &aFullFileName, unsigned aNetlistOptions, REPORTER *aReporter=nullptr)
Create a netlist file.
void ClearUndoORRedoList(UNDO_REDO_LIST whichList, int aItemCount=-1) override
Free the undo or redo list from aList element.
SCHEMATIC * m_schematic
The currently loaded schematic.
void ClearFindReplaceStatus()
bool BreakSegments(const VECTOR2I &aPoint, SCH_SCREEN *aScreen=nullptr)
Check every wire and bus for a intersection at aPoint and break into two segments at aPoint if an int...
SCH_SHEET_PATH & GetCurrentSheet() const
void ReCreateVToolbar() override
void OnLoadFile(wxCommandEvent &event)
SCHEMATIC & Schematic() const
void updateTitle()
Set the main window title bar text.
void ExecuteRemoteCommand(const char *cmdline) override
Execute a remote command sent by Pcbnew via a socket connection.
const std::vector< std::unique_ptr< SCH_ITEM > > & GetRepeatItems() const
Return the items which are to be repeated with the insert key.
bool saveSchematicFile(SCH_SHEET *aSheet, const wxString &aSavePath)
Save aSheet to a schematic file.
void DrawCurrentSheetToClipboard()
Use the wxWidgets print code to draw an image of the current sheet onto the clipboard.
Definition: sheet.cpp:543
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.
bool BreakSegmentsOnJunctions(SCH_SCREEN *aScreen=nullptr)
Test all junctions and bus entries in the schematic for intersections with wires and buses and breaks...
bool canCloseWindow(wxCloseEvent &aCloseEvent) override
void OnUpdatePCB(wxCommandEvent &event)
int m_exec_flags
Flags of the wxExecute() function to call a custom net list generator.
void RecomputeIntersheetRefs()
Update the schematic's page reference map for all global labels, and refresh the labels so that they ...
bool checkForNoFullyDefinedLibIds(SCH_SHEET *aSheet)
Verify that the symbol library links aSheet and all of its child sheets have been remapped to the sym...
Definition: sheet.cpp:75
void sendNetlistToCvpcb()
Send the KiCad netlist over to CVPCB.
void OnOpenPcbnew(wxCommandEvent &event)
void RecalculateConnections(SCH_CLEANUP_FLAGS aCleanupFlags)
Generate the connection data for the entire schematic hierarchy.
SCH_EDIT_FRAME(KIWAY *aKiway, wxWindow *aParent)
void ToggleSchematicHierarchy()
Toggle the show/hide state of the left side schematic navigation panel.
void OnAnnotate(wxCommandEvent &event)
void SendCrossProbeNetName(const wxString &aNetName)
Sends a net name to Pcbnew for highlighting.
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
bool importFile(const wxString &aFileName, int aFileType)
Load the given filename but sets the path to the current project path.
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
void OnPageSettingsChange() override
Called when modifying the page settings.
bool AddSheetAndUpdateDisplay(const wxString aFullFileName)
Add a sheet file into the current sheet and updates display.
void SelectUnit(SCH_SYMBOL *aSymbol, int aUnit)
Definition: picksymbol.cpp:239
const BOX2I GetDocumentExtents(bool aIncludeAllVisible=true) const override
Returns bbox of document with option to not include some items.
void initScreenZoom()
Initialize the zoom value of the current screen and mark the screen as zoom-initialized.
bool EditSheetProperties(SCH_SHEET *aSheet, SCH_SHEET_PATH *aHierarchy, bool *aClearAnnotationNewItems)
Edit an existing sheet or add a new sheet to the schematic.
Definition: sheet.cpp:527
void OnImportProject(wxCommandEvent &event)
void ClearExecFlags(const int aFlags)
Clear (removes) specified flags that not needed for next execution of external generator of the netli...
static const wxString SchematicHierarchyPaneName()
void setupUIConditions() override
Setup the UI conditions for the various actions and their controls in this frame.
int CheckAnnotate(ANNOTATION_ERROR_HANDLER aErrorHandler, ANNOTATE_SCOPE_T aAnnotateScope=ANNOTATE_ALL, bool aRecursive=true)
Check for annotation errors.
Definition: annotate.cpp:441
void ReCreateOptToolbar() override
void ShowFindReplaceStatus(const wxString &aMsg, int aStatusTime)
bool CreateArchiveLibrary(const wxString &aFileName)
Create a library aFileName that contains all symbols used in the current schematic.
Definition: libarch.cpp:65
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
void BreakSegment(SCH_LINE *aSegment, const VECTOR2I &aPoint, SCH_LINE **aNewSegment=nullptr, SCH_SCREEN *aScreen=nullptr)
Break a single segment into two at the specified point.
void SetHighlightedConnection(const SCH_CONNECTION *aConnection)
virtual void PrintPage(const RENDER_SETTINGS *aSettings) override
Plot or print the current sheet to the clipboard.
int GetSchematicJunctionSize()
void DisplayCurrentSheet()
Draw the current sheet on the display.
void ResolveERCExclusions()
Update markers to match recorded exclusions.
void SetNetListerCommand(const wxString &aCommand)
void PutDataInPreviousState(PICKED_ITEMS_LIST *aList)
Restore an undo or redo command to put data pointed by aList in the previous state.
int ModalAnnotate(const wxString &aMessage)
Run a modal version of the annotate dialog for a specific purpose.
~SCH_EDIT_FRAME() override
bool AppendSchematic()
Import a KiCad schematic into the current sheet.
virtual void CheckForAutoSaveFile(const wxFileName &aFileName) override
This overloaded version checks if the auto save master file "#auto_saved_files#" exists and recovers ...
void UpdateItem(EDA_ITEM *aItem, bool isAddOrDelete=false, bool aUpdateRtree=false) override
Mark an item for refresh.
wxString m_netListerCommand
Command line to call a custom net list generator.
void UpdateNetHighlightStatus()
wxString GetScreenDesc() const override
Return a human-readable description of the current screen.
DIALOG_SCH_FIND * m_findReplaceDialog
void UpdateHierarchyNavigator()
Update the hierarchy navigation tree and history.
void DeleteAnnotation(ANNOTATE_SCOPE_T aAnnotateScope, bool aRecursive, bool *appendUndo)
Clear the current symbol annotation.
Definition: annotate.cpp:60
void AddCopyForRepeatItem(const SCH_ITEM *aItem)
const SCH_CONNECTION * m_highlightedConn
The highlighted net or bus, or nullptr.
void OnResizeHierarchyNavigator(wxSizeEvent &aEvent)
wxString GetCurrentFileName() const override
Get the full filename + path of the currently opened file in the frame.
SCH_JUNCTION * AddJunction(SCH_SCREEN *aScreen, const VECTOR2I &aPos, bool aAppendToUndo, bool aFinal=true)
void SetCrossProbeConnection(const SCH_CONNECTION *aConnection)
Send a connection (net or bus) to Pcbnew for highlighting.
void StartNewUndo()
Create a new, blank stack for future Undo commands to be pushed to.
void TestDanglingEnds()
Test all of the connectable objects in the schematic for unused connection points.
bool SaveProject(bool aSaveAs=false)
Save the currently-open schematic (including its hierarchy) and associated project.
void OnExit(wxCommandEvent &event)
void AutoRotateItem(SCH_SCREEN *aScreen, SCH_ITEM *aItem)
Automatically set the rotation of an item (if the item supports it)
HIERARCHY_PANE * m_hierarchy
SEVERITY GetSeverity(int aErrorCode) const override
void ReCreateHToolbar() override
void FocusOnItem(SCH_ITEM *aItem)
bool CreateArchiveLibraryCacheFile(bool aUseCurrentSheetFilename=false)
Create a symbol library file with the name of the root document plus the '-cache' suffix,...
Definition: libarch.cpp:42
void AnnotateSymbols(ANNOTATE_SCOPE_T aAnnotateScope, ANNOTATE_ORDER_T aSortOption, ANNOTATE_ALGO_T aAlgoOption, bool aRecursive, int aStartNumber, bool aResetAnnotation, bool aRepairTimestamps, REPORTER &aReporter, bool appendUndo=false)
Annotate the symbols in the schematic that are not currently annotated.
Definition: annotate.cpp:194
void SaveCopyForRepeatItem(const SCH_ITEM *aItem)
Clone aItem and owns that clone in this container.
void KiwayMailIn(KIWAY_EXPRESS &aEvent) override
Receive KIWAY_EXPRESS messages from other players.
Instances are attached to a symbol or sheet and provide a place for the symbol's value,...
Definition: sch_field.h:51
Handle actions specific to the schematic editor.
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:147
Segment description base class to describe items which have 2 end points (track, wire,...
Definition: sch_line.h:40
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Definition: sch_sheet_pin.h:66
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:57
Schematic symbol object.
Definition: sch_symbol.h:81
Base window classes and related definitions.
Definition: bitmap.cpp:64
SEVERITY
SCH_CLEANUP_FLAGS
@ LOCAL_CLEANUP
@ NO_CLEANUP
@ GLOBAL_CLEANUP
SCH_SEARCH_T
Schematic search type used by the socket link with Pcbnew.
@ HIGHLIGHT_SYMBOL
@ HIGHLIGHT_PIN
SYMBOL_ORIENTATION_T
enum used in RotationMiroir()
@ SYM_ORIENT_270
@ SYM_ROTATE_CLOCKWISE
@ SYM_ROTATE_COUNTERCLOCKWISE
@ SYM_MIRROR_Y
@ SYM_ORIENT_180
@ SYM_MIRROR_X
@ SYM_NORMAL
@ SYM_ORIENT_90
@ SYM_ORIENT_0
std::function< void(ERCE_T aType, const wxString &aMsg, SCH_REFERENCE *aItemA, SCH_REFERENCE *aItemB)> ANNOTATION_ERROR_HANDLER
Define a standard error handler for annotation errors.
ANNOTATE_ORDER_T
Schematic annotation order options.
ANNOTATE_SCOPE_T
Schematic annotation scope options.
@ ANNOTATE_ALL
Annotate the full schematic.
ANNOTATE_ALGO_T
Schematic annotation type options.
UNDO_REDO
Undo Redo considerations: Basically we have 3 cases New item Deleted item Modified item there is also...