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-2021 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 <sch_text.h> // enum PINSHEETLABEL_SHAPE
44 #include <template_fieldnames.h>
45 
46 class STATUS_TEXT_POPUP;
47 
48 class SCH_ITEM;
49 class EDA_ITEM;
50 class SCH_LINE;
51 class SCH_TEXT;
52 class SCH_BITMAP;
53 class SCH_SHEET;
54 class SCH_SHEET_PATH;
55 class SCH_SHEET_PIN;
56 class SCH_SYMBOL;
57 class SCH_FIELD;
58 class SCH_JUNCTION;
59 class SCHEMATIC;
60 class DIALOG_SCH_FIND;
61 class wxFindReplaceData;
62 class RESCUER;
64 
65 // @todo Move this to transform alone with all of the transform manipulation code.
68 {
69  SYM_NORMAL, // Normal orientation, no rotation or mirror
70  SYM_ROTATE_CLOCKWISE, // Rotate -90
72  SYM_ORIENT_0, // No rotation and no mirror id SYM_NORMAL
73  SYM_ORIENT_90, // Rotate 90, no mirror
74  SYM_ORIENT_180, // Rotate 180, no mirror
75  SYM_ORIENT_270, // Rotate -90, no mirror
76  SYM_MIRROR_X = 0x100, // Mirror around X axis
77  SYM_MIRROR_Y = 0x200 // Mirror around Y axis
78 };
79 
80 
83 {
87 };
88 
89 
92 {
96 };
98 
99 
102 {
107 };
109 
110 
113 {
116 };
117 
118 
120 {
124 };
125 
126 
131 {
132 public:
133  SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
134  ~SCH_EDIT_FRAME() override;
135 
136  SCH_SCREEN* GetScreen() const override;
137 
138  SELECTION& GetCurrentSelection() override;
139 
140  SCHEMATIC& Schematic() const;
141 
145  bool GetShowAllPins() const override;
146 
150  void SaveProjectSettings() override;
151 
157  bool LoadProjectSettings();
158 
159  void ShowSchematicSetupDialog( const wxString& aInitialPage = wxEmptyString );
160 
161  void LoadSettings( APP_SETTINGS_BASE* aCfg ) override;
162  void SaveSettings( APP_SETTINGS_BASE* aCfg ) override;
163 
164  void CreateScreens();
165  void ReCreateHToolbar() override;
166  void ReCreateVToolbar() override;
167  void ReCreateOptToolbar() override;
168  void ReCreateMenuBar() override;
169 
170  void setupUIConditions() override;
171 
177  bool IsContentModified() const override;
178 
183  void OnModify() override;
184 
188  void RecordERCExclusions();
189 
193  void ResolveERCExclusions();
194 
195  SEVERITY GetSeverity( int aErrorCode ) const override;
196 
200  wxString GetScreenDesc() const override;
201 
220  void ExecuteRemoteCommand( const char* cmdline ) override;
221 
222  void KiwayMailIn( KIWAY_EXPRESS& aEvent ) override;
223 
228  void AddItemToScreenAndUndoList( SCH_SCREEN* aScreen, SCH_ITEM* aItem, bool aUndoAppend );
229 
233  void ShowFindReplaceDialog( bool aReplace );
234 
240  void UpdateHierarchyNavigator( bool aForceUpdate = false );
241 
246 
247  void ShowFindReplaceStatus( const wxString& aMsg, int aStatusTime );
248  void ClearFindReplaceStatus();
249 
253  void OnFindDialogClose();
254 
266  bool BreakSegment( SCH_LINE* aSegment, const wxPoint& aPoint,
267  SCH_LINE** aNewSegment = nullptr, SCH_SCREEN* aScreen = nullptr );
268 
279  bool BreakSegments( const wxPoint& aPoint, SCH_SCREEN* aScreen = nullptr );
280 
290  bool BreakSegmentsOnJunctions( SCH_SCREEN* aScreen = nullptr );
291 
296  void TestDanglingEnds();
297 
309  void SendMessageToPCBNEW( EDA_ITEM* aObjectToSync, SCH_SYMBOL* aPart );
310 
316  void SendCrossProbeNetName( const wxString& aNetName );
317 
323  void SetCrossProbeConnection( const SCH_CONNECTION* aConnection );
324 
329 
331  {
332  return m_highlightedConn;
333  }
334 
335  void SetHighlightedConnection( const SCH_CONNECTION* aConnection )
336  {
337  m_highlightedConn = aConnection;
338  }
339 
348  bool ReadyToNetlist( const wxString& aAnnotateMessage );
349 
365  bool WriteNetListFile( int aFormat, const wxString& aFullFileName, unsigned aNetlistOptions,
366  REPORTER* aReporter = nullptr );
367 
374  void DeleteAnnotation( ANNOTATE_SCOPE_T aAnnotateScope, bool* appendUndo );
375 
397  void AnnotateSymbols( ANNOTATE_SCOPE_T aAnnotateScope, ANNOTATE_ORDER_T aSortOption,
398  ANNOTATE_ALGO_T aAlgoOption, int aStartNumber, bool aResetAnnotation,
399  bool aRepairTimestamps, REPORTER& aReporter );
400 
417  int CheckAnnotate( ANNOTATION_ERROR_HANDLER aErrorHandler,
418  ANNOTATE_SCOPE_T aAnnotateScope = ANNOTATE_ALL );
419 
426  int ModalAnnotate( const wxString& aMessage );
427 
428  // Functions used for hierarchy handling
430 
431  void SetCurrentSheet( const SCH_SHEET_PATH& aSheet );
432 
436  void HardRedraw() override;
437 
441  void DisplayCurrentSheet();
442 
447 
454  void OnPageSettingsChange() override;
455 
464 
470  void SetSheetNumberAndCount();
471 
472  wxPageSetupDialogData& GetPageSetupData() { return m_pageSetupData; }
473 
474  void NewProject();
475  void LoadProject();
476 
484  bool SaveProject( bool aSaveAs = false );
485 
486  bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
487 
488  wxString GetCurrentFileName() const override;
489 
495  bool AppendSchematic();
496 
504  bool AskToSaveChanges();
505 
506  SCH_JUNCTION* AddJunction( SCH_SCREEN* aScreen, const wxPoint& aPos, bool aAppendToUndo,
507  bool aFinal = true );
508 
518  bool SchematicCleanUp( SCH_SCREEN* aScreen = nullptr );
519 
530  bool TrimWire( const wxPoint& aStart, const wxPoint& aEnd );
531 
537  std::vector<wxPoint> GetSchematicConnections();
538 
539  void OnOpenPcbnew( wxCommandEvent& event );
540  void OnOpenCvpcb( wxCommandEvent& event );
541  void OnUpdatePCB( wxCommandEvent& event );
542  void OnAnnotate( wxCommandEvent& event );
543 
552  bool CheckSheetForRecursion( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy );
553 
565  bool AllowCaseSensitiveFileNameClashes( const wxString& aSchematicFileName );
566 
595  bool EditSheetProperties( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy,
596  bool* aClearAnnotationNewItems );
597 
598  void InitSheet( SCH_SHEET* aSheet, const wxString& aNewFilename );
599 
644  bool LoadSheetFromFile( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy,
645  const wxString& aFileName );
646 
653  void DeleteJunction( SCH_ITEM* aItem, bool aAppend = false );
654 
655  void ConvertPart( SCH_SYMBOL* aSymbol );
656 
657  void SelectUnit( SCH_SYMBOL* aSymbol, int aUnit );
658 
659  /* Undo - redo */
660 
664  void StartNewUndo();
665 
681  void SaveCopyInUndoList( SCH_SCREEN* aScreen, SCH_ITEM* aItemToCopy, UNDO_REDO aTypeCommand,
682  bool aAppend );
683 
691  void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList, UNDO_REDO aTypeCommand,
692  bool aAppend );
693 
700 
712  void ClearUndoORRedoList( UNDO_REDO_LIST whichList, int aItemCount = -1 ) override;
713 
717  void SaveCopyForRepeatItem( const SCH_ITEM* aItem );
718 
725 
726  EDA_ITEM* GetItem( const KIID& aId ) const override;
727 
733 
743  bool CreateArchiveLibraryCacheFile( bool aUseCurrentSheetFilename = false );
744 
751  bool CreateArchiveLibrary( const wxString& aFileName );
752 
756  virtual void PrintPage( const RENDER_SETTINGS* aSettings ) override;
757 
758  void SetNetListerCommand( const wxString& aCommand ) { m_netListerCommand = aCommand; }
759 
763  void DefaultExecFlags() { m_exec_flags = wxEXEC_SYNC; }
764 
770  void SetExecFlags( const int aFlags ) { m_exec_flags |= aFlags; }
771 
778  void ClearExecFlags( const int aFlags ) { m_exec_flags &= ~( aFlags ); }
779 
780  wxString GetNetListerCommand() const { return m_netListerCommand; }
781 
785  void RecalculateConnections( SCH_CLEANUP_FLAGS aCleanupFlags );
786 
790  void InstallPreferences( PAGED_DIALOG* aParent, PANEL_HOTKEYS_EDITOR* aHotkeysPanel ) override;
791 
795  void CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) override;
796 
798 
799  void ShowChangedLanguage() override;
800 
801  void SetScreen( BASE_SCREEN* aScreen ) override;
802 
803  const BOX2I GetDocumentExtents( bool aIncludeAllVisible = true ) const override;
804 
805  void FixupJunctions();
806 
808 
809  void FocusOnItem( SCH_ITEM* aItem );
810 
819  void SaveSymbolToSchematic( const LIB_SYMBOL& aSymbol, const KIID& aSchematicSymbolUUID );
820 
826 
827  void ShowAllIntersheetRefs( bool aShow );
828 
835  virtual void CheckForAutoSaveFile( const wxFileName& aFileName ) override;
836 
837  DECLARE_EVENT_TABLE()
838 
839 protected:
845  bool doAutoSave() override;
846 
850  bool isAutoSaveRequired() const override;
851 
855  void sendNetlistToCvpcb();
856 
857  void onSize( wxSizeEvent& aEvent );
858 
859 private:
860  // Sets up the tool framework
861  void setupTools();
862 
863  void OnExit( wxCommandEvent& event );
864 
865  void OnLoadFile( wxCommandEvent& event );
866  void OnAppendProject( wxCommandEvent& event );
867  void OnImportProject( wxCommandEvent& event );
868 
869  void OnClearFileHistory( wxCommandEvent& aEvent );
870 
871  bool canCloseWindow( wxCloseEvent& aCloseEvent ) override;
872  void doCloseWindow() override;
873 
882  void UpdateTitle();
883 
887  void initScreenZoom();
888 
897  bool checkForNoFullyDefinedLibIds( SCH_SHEET* aSheet );
898 
905  bool importFile( const wxString& aFileName, int aFileType );
906 
914  bool saveSchematicFile( SCH_SHEET* aSheet, const wxString& aSavePath );
915 
921  void mapExistingAnnotation( std::map<wxString, wxString>& aMap );
922 
923  bool updateAutoSaveFile();
924 
925  const wxString& getAutoSaveFileName() const;
926 
927 private:
928  // The schematic editor control class should be able to access some internal
929  // functions of the editor frame.
930  friend class SCH_EDITOR_CONTROL;
931 
934 
935  wxPageSetupDialogData m_pageSetupData;
938  int m_exec_flags;
940 
943 };
944 
945 
946 #endif // SCH_EDIT_FRAME_H
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
bool ReadyToNetlist(const wxString &aAnnotateMessage)
Check if we are ready to write a netlist file for the current schematic.
bool CheckSheetForRecursion(SCH_SHEET *aSheet, SCH_SHEET_PATH *aHierarchy)
Verify that aSheet will not cause a recursion error in aHierarchy.
Definition: sheet.cpp:47
const wxString & getAutoSaveFileName() const
wxString m_netListerCommand
Command line to call a custom net list generator.
void ShowFindReplaceStatus(const wxString &aMsg, int aStatusTime)
Instances are attached to a symbol or sheet and provide a place for the symbol's value,...
Definition: sch_field.h:49
SEVERITY GetSeverity(int aErrorCode) const override
void onSize(wxSizeEvent &aEvent)
void OnOpenCvpcb(wxCommandEvent &event)
bool SchematicCleanUp(SCH_SCREEN *aScreen=nullptr)
Perform routine schematic cleaning including breaking wire and buses and deleting identical objects s...
SCHEMATIC * m_schematic
The currently loaded schematic.
Carry a payload from one KIWAY_PLAYER to another within a PROJECT.
Definition: kiway_express.h:38
void DefaultExecFlags()
Reset the execution flags to defaults for external netlist and bom generators.
void UpdateNetHighlightStatus()
HIERARCHY_NAVIG_DLG * FindHierarchyNavigator()
bool OpenProjectFiles(const std::vector< wxString > &aFileSet, int aCtl=0) override
Open a project or set of files given by aFileList.
Annotate the selection.
void mapExistingAnnotation(std::map< wxString, wxString > &aMap)
Fill a map of uuid -> reference from the currently loaded schematic.
Definition: annotate.cpp:38
void OnLoadFile(wxCommandEvent &event)
Annotate the full schematic.
void SendCrossProbeNetName(const wxString &aNetName)
Sends a net name to Pcbnew for highlighting.
SELECTION & GetCurrentSelection() override
Get the current selection from the canvas area.
void RecalculateConnections(SCH_CLEANUP_FLAGS aCleanupFlags)
Generate the connection data for the entire schematic hierarchy.
virtual void PrintPage(const RENDER_SETTINGS *aSettings) override
Plot or print the current sheet to the clipboard.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
virtual void CheckForAutoSaveFile(const wxFileName &aFileName) override
This overloaded version checks if the auto save master file "#auto_saved_files#" exists and recovers ...
void SaveProjectSettings() override
Save changes to the project settings to the project (.pro) file.
Holds all the data relating to one schematic.
Definition: schematic.h:59
void StartNewUndo()
Create a new, blank stack for future Undo commands to be pushed to.
void ConvertPart(SCH_SYMBOL *aSymbol)
Definition: picksymbol.cpp:250
ANNOTATE_ORDER_T
Schematic annotation order options.
bool BreakSegments(const wxPoint &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...
void SetScreen(BASE_SCREEN *aScreen) override
const SCH_CONNECTION * GetHighlightedConnection() const
void ReCreateMenuBar() override
Recreates the menu bar.
Extension of STATUS_POPUP for displaying a single line text.
Definition: status_popup.h:79
void SendCrossProbeClearHighlight()
Tell Pcbnew to clear the existing highlighted net, if one exists.
const BOX2I GetDocumentExtents(bool aIncludeAllVisible=true) const override
Returns bbox of document with option to not include some items.
bool AskToSaveChanges()
Check if any of the screens has unsaved changes and asks the user whether to save or drop them.
void ResolveERCExclusions()
Update markers to match recorded exclusions.
void UpdateTitle()
Set the main window title bar text.
void OnAppendProject(wxCommandEvent &event)
void InitSheet(SCH_SHEET *aSheet, const wxString &aNewFilename)
Definition: sheet.cpp:97
void DeleteAnnotation(ANNOTATE_SCOPE_T aAnnotateScope, bool *appendUndo)
Clear the current symbol annotation.
Definition: annotate.cpp:63
Definition: bitmap.cpp:64
void setupUIConditions() override
Setup the UI conditions for the various actions and their controls in this frame.
void DrawCurrentSheetToClipboard()
Use the wxWidgets print code to draw an image of the current sheet onto the clipboard.
Definition: sheet.cpp:477
int GetSchematicJunctionSize()
SCH_CLEANUP_FLAGS
Schematic editor (Eeschema) main window.
void OnPageSettingsChange() override
Called when modifying the page settings.
void AnnotateSymbols(ANNOTATE_SCOPE_T aAnnotateScope, ANNOTATE_ORDER_T aSortOption, ANNOTATE_ALGO_T aAlgoOption, int aStartNumber, bool aResetAnnotation, bool aRepairTimestamps, REPORTER &aReporter)
Annotate the symbols in the schematic that are not currently annotated.
Definition: annotate.cpp:131
void SelectUnit(SCH_SYMBOL *aSymbol, int aUnit)
Definition: picksymbol.cpp:211
void DisplayCurrentSheet()
Draw the current sheet on the display.
Definition: hierarch.cpp:313
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:70
void OnFindDialogClose()
Notification that the Find dialog has closed.
int CheckAnnotate(ANNOTATION_ERROR_HANDLER aErrorHandler, ANNOTATE_SCOPE_T aAnnotateScope=ANNOTATE_ALL)
Check for annotation errors.
Definition: annotate.cpp:352
Define a library symbol object.
Definition: lib_symbol.h:96
bool canCloseWindow(wxCloseEvent &aCloseEvent) override
bool importFile(const wxString &aFileName, int aFileType)
Load the given filename but sets the path to the current project path.
UNDO_REDO
Undo Redo considerations: Basically we have 3 cases New item Deleted item Modified item there is also...
bool IsContentModified() const override
Get if the current schematic has been modified but not saved.
void OnImportProject(wxCommandEvent &event)
SCH_JUNCTION * AddJunction(SCH_SCREEN *aScreen, const wxPoint &aPos, bool aAppendToUndo, bool aFinal=true)
bool SaveProject(bool aSaveAs=false)
Save the currently-open schematic (including its hierarchy) and associated project.
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
wxString GetScreenDesc() const override
Return a human-readable description of the current screen.
Handle actions specific to the schematic editor.
void ShowChangedLanguage() override
void OnClearFileHistory(wxCommandEvent &aEvent)
Definition: kiid.h:44
void doCloseWindow() override
void ReCreateHToolbar() override
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
bool AllowCaseSensitiveFileNameClashes(const wxString &aSchematicFileName)
Check aSchematicFileName for a potential file name case sensitivity clashes.
Definition: sheet.cpp:553
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:99
void TestDanglingEnds()
Test all of the connectable objects in the schematic for unused connection points.
void HardRedraw() override
Rebuild the GAL and redraw the screen.
wxPageSetupDialogData m_pageSetupData
bool WriteNetListFile(int aFormat, const wxString &aFullFileName, unsigned aNetlistOptions, REPORTER *aReporter=nullptr)
Create a netlist file.
bool saveSchematicFile(SCH_SHEET *aSheet, const wxString &aSavePath)
Save aSheet to a schematic file.
Handles how to draw a screen (a board, a schematic ...)
Definition: base_screen.h:40
Annotate by position of symbol in the schematic sheet object list.
void SaveCopyForRepeatItem(const SCH_ITEM *aItem)
Clone aItem and owns that clone in this container.
void initScreenZoom()
Initialize the zoom value of the current screen and mark the screen as zoom-initialized.
void ShowAllIntersheetRefs(bool aShow)
Annotate using the first free reference number starting at the sheet number * 100.
SCHEMATIC & Schematic() const
void UpdateHierarchyNavigator(bool aForceUpdate=false)
Run the Hierarchy Navigator dialog.
Base window classes and related definitions.
bool AppendSchematic()
Import a KiCad schematic into the current sheet.
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 KiwayMailIn(KIWAY_EXPRESS &aEvent) override
Receive KIWAY_EXPRESS messages from other players.
std::vector< wxPoint > GetSchematicConnections()
Collect a unique list of all possible connection points in the schematic.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition: kiway.h:260
ANNOTATE_SCOPE_T
Schematic annotation scope options.
SCH_ITEM * m_item_to_repeat
Last item to insert by the repeat command.
DIALOG_SCH_FIND * m_findReplaceDialog
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Definition: sch_sheet_pin.h:65
bool isAutoSaveRequired() const override
Return true if the schematic has been modified.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
wxPageSetupDialogData & GetPageSetupData()
A holder to handle information on schematic or board items.
SEVERITY
SYMBOL_ORIENTATION_T
enum used in RotationMiroir()
void OnUpdatePCB(wxCommandEvent &event)
void ReCreateOptToolbar() override
Object to handle a bitmap image that can be inserted in a schematic.
Definition: sch_bitmap.h:40
void SaveSymbolToSchematic(const LIB_SYMBOL &aSymbol, const KIID &aSchematicSymbolUUID)
Update a schematic symbol from a LIB_SYMBOL.
bool LoadProjectSettings()
Load the KiCad project file (*.pro) settings specific to Eeschema.
const SCH_CONNECTION * m_highlightedConn
The highlighted net or bus, or nullptr.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:54
bool doAutoSave() override
Save the schematic files that have been modified and not yet saved.
Annotate by Y position from top to bottom.
UNDO_REDO_LIST
Specifies whether we are interacting with the undo or redo stacks.
bool BreakSegmentsOnJunctions(SCH_SCREEN *aScreen=nullptr)
Test all junctions and bus entries in the schematic for intersections with wires and buses and breaks...
void OnAnnotate(wxCommandEvent &event)
Annotate incrementally using the first free reference number.
void ClearFindReplaceStatus()
void SetHighlightedConnection(const SCH_CONNECTION *aConnection)
void ClearExecFlags(const int aFlags)
Clear (removes) specified flags that not needed for next execution of external generator of the netli...
bool BreakSegment(SCH_LINE *aSegment, const wxPoint &aPoint, SCH_LINE **aNewSegment=nullptr, SCH_SCREEN *aScreen=nullptr)
Break a single segment into two at the specified point.
SCH_ITEM * GetRepeatItem() const
Return the item which is to be repeated with the insert key.
int ModalAnnotate(const wxString &aMessage)
Run a modal version of the annotate dialog for a specific purpose.
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_SEARCH_T
Schematic search type used by the socket link with Pcbnew.
void InstallPreferences(PAGED_DIALOG *aParent, PANEL_HOTKEYS_EDITOR *aHotkeysPanel) override
Allow Eeschema to install its preferences panels into the preferences dialog.
Schematic symbol object.
Definition: sch_symbol.h:78
void OnExit(wxCommandEvent &event)
Segment description base class to describe items which have 2 end points (track, wire,...
Definition: sch_line.h:37
SCH_EDIT_FRAME(KIWAY *aKiway, wxWindow *aParent)
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
void SaveCopyInUndoList(SCH_SCREEN *aScreen, SCH_ITEM *aItemToCopy, UNDO_REDO aTypeCommand, bool aAppend)
Create a copy of the current schematic item, and put it in the undo list.
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
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.
void RecomputeIntersheetRefs()
Update the schematic's page reference map for all global labels, and refresh the labels so that they ...
void DeleteJunction(SCH_ITEM *aItem, bool aAppend=false)
Removes a given junction and heals any wire segments under the junction.
void RollbackSchematicFromUndo()
Perform an undo of the last edit WITHOUT logging a corresponding redo.
ANNOTATE_ALGO_T
Schematic annotation type options.
Annotate by X position from left to right.
void ShowFindReplaceDialog(bool aReplace)
Run the Find or Find & Replace dialog.
void OnOpenPcbnew(wxCommandEvent &event)
void SetCrossProbeConnection(const SCH_CONNECTION *aConnection)
Send a connection (net or bus) to Pcbnew for highlighting.
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:99
wxString GetCurrentFileName() const override
Get the full filename + path of the currently opened file in the frame.
~SCH_EDIT_FRAME() override
void ExecuteRemoteCommand(const char *cmdline) override
Execute a remote command sent by Pcbnew via a socket connection.
wxString GetUniqueFilenameForCurrentSheet()
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
Annotate using the first free reference number starting at the sheet number * 1000.
wxString GetNetListerCommand() const
SCH_SHEET_PATH & GetCurrentSheet() const
bool TrimWire(const wxPoint &aStart, const wxPoint &aEnd)
If any single wire passes through both points, remove the portion between the two points,...
void FocusOnItem(SCH_ITEM *aItem)
void PutDataInPreviousState(PICKED_ITEMS_LIST *aList)
Restore an undo or redo command to put data pointed by aList in the previous state.
void SendMessageToPCBNEW(EDA_ITEM *aObjectToSync, SCH_SYMBOL *aPart)
Send a message to Pcbnew via a socket connection.
EDA_ITEM * GetItem(const KIID &aId) const override
Fetch an item by KIID.
void OnModify() override
Must be called after a schematic change in order to set the "modify" flag of the current screen and u...
Annotate the current sheet.
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
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 ClearUndoORRedoList(UNDO_REDO_LIST whichList, int aItemCount=-1) override
Free the undo or redo list from aList element.
int m_exec_flags
Flags of the wxExecute() function to call a custom net list generator.
void ShowSchematicSetupDialog(const wxString &aInitialPage=wxEmptyString)
void CommonSettingsChanged(bool aEnvVarsChanged, bool aTextVarsChanged) override
Called after the preferences dialog is run.
bool CreateArchiveLibrary(const wxString &aFileName)
Create a library aFileName that contains all symbols used in the current schematic.
Definition: libarch.cpp:65
void SetExecFlags(const int aFlags)
Set (adds) specified flags for next execution of external generator of the netlist or bom.
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:182
void SetNetListerCommand(const wxString &aCommand)
void RecordERCExclusions()
Scan existing markers and record data from any that are Excluded.
bool GetShowAllPins() const override
Allow edit frame to show/hide hidden pins.
void ReCreateVToolbar() override
void sendNetlistToCvpcb()
Send the KiCad netlist over to CVPCB.