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;
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 void ReCreateMenuBar() override;
136
137 void setupUIConditions() override;
138
144 bool IsContentModified() const override;
145
150 void OnModify() override;
151
155 void RecordERCExclusions();
156
161
162 SEVERITY GetSeverity( int aErrorCode ) const override;
163
167 wxString GetScreenDesc() const override;
168
187 void ExecuteRemoteCommand( const char* cmdline ) override;
188
189 void KiwayMailIn( KIWAY_EXPRESS& aEvent ) override;
190
194 void AutoRotateItem( SCH_SCREEN* aScreen, SCH_ITEM* aItem );
195
200 void AddItemToScreenAndUndoList( SCH_SCREEN* aScreen, SCH_ITEM* aItem, bool aUndoAppend );
201
205 void ShowFindReplaceDialog( bool aReplace );
206
211
212 void ShowFindReplaceStatus( const wxString& aMsg, int aStatusTime );
214
218 void OnFindDialogClose();
219
231 bool BreakSegment( SCH_LINE* aSegment, const VECTOR2I& aPoint,
232 SCH_LINE** aNewSegment = nullptr, SCH_SCREEN* aScreen = nullptr );
233
244 bool BreakSegments( const VECTOR2I& aPoint, SCH_SCREEN* aScreen = nullptr );
245
255 bool BreakSegmentsOnJunctions( SCH_SCREEN* aScreen = nullptr );
256
261 void TestDanglingEnds();
262
270 void SendSelectItemsToPcb( const std::vector<EDA_ITEM*>& aItems, bool aForce );
271
277 void SendCrossProbeNetName( const wxString& aNetName );
278
284 void SetCrossProbeConnection( const SCH_CONNECTION* aConnection );
285
290
292 {
293 return m_highlightedConn;
294 }
295
296 void SetHighlightedConnection( const SCH_CONNECTION* aConnection )
297 {
298 m_highlightedConn = aConnection;
299 }
300
309 bool ReadyToNetlist( const wxString& aAnnotateMessage );
310
326 bool WriteNetListFile( int aFormat, const wxString& aFullFileName, unsigned aNetlistOptions,
327 REPORTER* aReporter = nullptr );
328
335 void DeleteAnnotation( ANNOTATE_SCOPE_T aAnnotateScope, bool aRecursive, bool* appendUndo );
336
362 void AnnotateSymbols( ANNOTATE_SCOPE_T aAnnotateScope, ANNOTATE_ORDER_T aSortOption,
363 ANNOTATE_ALGO_T aAlgoOption, bool aRecursive, int aStartNumber,
364 bool aResetAnnotation, bool aRepairTimestamps, REPORTER& aReporter,
365 bool appendUndo = false );
366
383 int CheckAnnotate( ANNOTATION_ERROR_HANDLER aErrorHandler,
384 ANNOTATE_SCOPE_T aAnnotateScope = ANNOTATE_ALL,
385 bool aRecursive = true );
386
393 int ModalAnnotate( const wxString& aMessage );
394
395 // Functions used for hierarchy handling
397
398 void SetCurrentSheet( const SCH_SHEET_PATH& aSheet );
399
400 void UpdateItem( EDA_ITEM* aItem, bool isAddOrDelete = false,
401 bool aUpdateRtree = false ) override;
402
406 void HardRedraw() override;
407
411 void DisplayCurrentSheet();
412
417
424 void OnPageSettingsChange() override;
425
434
441
442 wxPageSetupDialogData& GetPageSetupData() { return m_pageSetupData; }
443
444 void NewProject();
445 void LoadProject();
446
454 bool SaveProject( bool aSaveAs = false );
455
456 bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
457
458 wxString GetCurrentFileName() const override;
459
465 bool AppendSchematic();
466
475 bool AddSheetAndUpdateDisplay( const wxString aFullFileName );
476
484 bool AskToSaveChanges();
485
486 SCH_JUNCTION* AddJunction( SCH_SCREEN* aScreen, const VECTOR2I& aPos, bool aAppendToUndo,
487 bool aFinal = true );
488
498 bool SchematicCleanUp( SCH_SCREEN* aScreen = nullptr );
499
510 bool TrimWire( const VECTOR2I& aStart, const VECTOR2I& aEnd );
511
517 std::vector<VECTOR2I> GetSchematicConnections();
518
519 void OnOpenPcbnew( wxCommandEvent& event );
520 void OnOpenCvpcb( wxCommandEvent& event );
521 void OnUpdatePCB( wxCommandEvent& event );
522 void OnAnnotate( wxCommandEvent& event );
523
532 bool CheckSheetForRecursion( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy );
533
545 bool AllowCaseSensitiveFileNameClashes( const wxString& aSchematicFileName );
546
575 bool EditSheetProperties( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy,
576 bool* aClearAnnotationNewItems );
577
578 void InitSheet( SCH_SHEET* aSheet, const wxString& aNewFilename );
579
624 bool LoadSheetFromFile( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy,
625 const wxString& aFileName );
626
633 void DeleteJunction( SCH_ITEM* aItem, bool aAppend = false );
634
635 void ConvertPart( SCH_SYMBOL* aSymbol );
636
637 void SelectUnit( SCH_SYMBOL* aSymbol, int aUnit );
638
639 /* Undo - redo */
640
644 void StartNewUndo();
645
662 void SaveCopyInUndoList( SCH_SCREEN* aScreen, SCH_ITEM* aItemToCopy, UNDO_REDO aTypeCommand,
663 bool aAppend, bool aDirtyConnectivity = true );
664
673 void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList, UNDO_REDO aTypeCommand,
674 bool aAppend, bool aDirtyConnectivity = true );
675
682
694 void ClearUndoORRedoList( UNDO_REDO_LIST whichList, int aItemCount = -1 ) override;
695
699 void SaveCopyForRepeatItem( const SCH_ITEM* aItem );
700 void AddCopyForRepeatItem( const SCH_ITEM* aItem );
701
706 const std::vector<std::unique_ptr<SCH_ITEM>>& GetRepeatItems() const
707 {
708 return m_items_to_repeat;
709 }
710
711 EDA_ITEM* GetItem( const KIID& aId ) const override;
712
718
728 bool CreateArchiveLibraryCacheFile( bool aUseCurrentSheetFilename = false );
729
736 bool CreateArchiveLibrary( const wxString& aFileName );
737
741 virtual void PrintPage( const RENDER_SETTINGS* aSettings ) override;
742
743 void SetNetListerCommand( const wxString& aCommand ) { m_netListerCommand = aCommand; }
744
748 void DefaultExecFlags() { m_exec_flags = wxEXEC_SYNC; }
749
755 void SetExecFlags( const int aFlags ) { m_exec_flags |= aFlags; }
756
763 void ClearExecFlags( const int aFlags ) { m_exec_flags &= ~( aFlags ); }
764
765 wxString GetNetListerCommand() const { return m_netListerCommand; }
766
770 void RecalculateConnections( SCH_CLEANUP_FLAGS aCleanupFlags );
771
775 void CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) override;
776
778
779 void ShowChangedLanguage() override;
780
781 void SetScreen( BASE_SCREEN* aScreen ) override;
782
783 const BOX2I GetDocumentExtents( bool aIncludeAllVisible = true ) const override;
784
785 void FixupJunctions();
786
788
789 void FocusOnItem( SCH_ITEM* aItem );
790
792
801 void SaveSymbolToSchematic( const LIB_SYMBOL& aSymbol, const KIID& aSchematicSymbolUUID );
802
807 void RecomputeIntersheetRefs( bool autoplaceUninitialized = false );
808
809 void ShowAllIntersheetRefs( bool aShow );
810
817 virtual void CheckForAutoSaveFile( const wxFileName& aFileName ) override;
818
819
824
828 static const wxString SchematicHierarchyPaneName()
829 {
830 return wxT( "SchematicHierarchy" );
831 }
832
833 DECLARE_EVENT_TABLE()
834
835protected:
841 bool doAutoSave() override;
842
846 bool isAutoSaveRequired() const override;
847
851 void sendNetlistToCvpcb();
852
853 void onSize( wxSizeEvent& aEvent );
854
855private:
856 // Called when resizing the Hierarchy Navigator panel
857 void OnResizeHierarchyNavigator( wxSizeEvent& aEvent );
858
859 // Sets up the tool framework
860 void setupTools();
861
862 void OnExit( wxCommandEvent& event );
863
864 void OnLoadFile( wxCommandEvent& event );
865 void OnAppendProject( wxCommandEvent& event );
866 void OnImportProject( wxCommandEvent& event );
867
868 void OnClearFileHistory( wxCommandEvent& aEvent );
869
870 bool canCloseWindow( wxCloseEvent& aCloseEvent ) override;
871 void doCloseWindow() override;
872
881 void UpdateTitle();
882
886 void initScreenZoom();
887
897
904 bool importFile( const wxString& aFileName, int aFileType );
905
913 bool saveSchematicFile( SCH_SHEET* aSheet, const wxString& aSavePath );
914
920 void mapExistingAnnotation( std::map<wxString, wxString>& aMap );
921
922 bool updateAutoSaveFile();
923
924 const wxString& getAutoSaveFileName() const;
925
926private:
927 // The schematic editor control class should be able to access some internal
928 // functions of the editor frame.
929 friend class SCH_EDITOR_CONTROL;
930
933
934 wxPageSetupDialogData m_pageSetupData;
935 std::vector<std::unique_ptr<SCH_ITEM>> m_items_to_repeat;
936
941
943
945
946 bool m_syncingPcbToSchSelection; // Recursion guard when synchronizing selection from PCB
947};
948
949
950#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:101
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:47
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:267
Define a library symbol object.
Definition: lib_symbol.h:98
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:60
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.
HIERARCHY_NAVIG_PANEL * m_hierarchy
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:275
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.
bool 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 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 of the current screen and u...
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 UpdateTitle()
Set the main window title bar text.
void doCloseWindow() override
bool AllowCaseSensitiveFileNameClashes(const wxString &aSchematicFileName)
Check aSchematicFileName for a potential file name case sensitivity clashes.
Definition: sheet.cpp:553
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
std::vector< VECTOR2I > GetSchematicConnections()
Collect a unique list of all possible connection points in the schematic.
bool m_syncingPcbToSchSelection
bool isAutoSaveRequired() const override
Return true if the schematic has been modified.
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 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 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:477
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.
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:236
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:461
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 ReCreateMenuBar() override
Recreates the menu bar.
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 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 ...
wxString GetUniqueFilenameForCurrentSheet()
void RecomputeIntersheetRefs(bool autoplaceUninitialized=false)
Update the schematic's page reference map for all global labels, and refresh the labels so that they ...
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)
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:50
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:55
Schematic symbol object.
Definition: sch_symbol.h:79
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...