KiCad PCB EDA Suite
eda_base_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) 2009-2015 Jean-Pierre Charras, jp.charras wanadoo.fr
5  * Copyright (C) 2011 Wayne Stambaugh <stambaughw@gmail.com>
6  * Copyright (C) 1992-2020 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 
31 #ifndef EDA_BASE_FRAME_H_
32 #define EDA_BASE_FRAME_H_
33 
34 
35 #include <vector>
36 
37 #include <wx/aui/aui.h>
39 #include <frame_type.h>
40 #include <hotkeys_basic.h>
41 #include <kiway_holder.h>
42 #include <tool/tools_holder.h>
43 #include <widgets/ui_common.h>
44 #include <undo_redo_container.h>
45 #include <eda_units.h>
46 
47 // Option for main frames
48 #define KICAD_DEFAULT_DRAWFRAME_STYLE wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS
49 
50 
51 #define VIEWER3D_FRAMENAME wxT( "Viewer3DFrameName" )
52 #define QUALIFIED_VIEWER3D_FRAMENAME( parent ) \
53  ( wxString( VIEWER3D_FRAMENAME ) + wxT( ":" ) + parent->GetName() )
54 
55 #define KICAD_MANAGER_FRAME_NAME wxT( "KicadFrame" )
56 
57 
58 class wxChoice;
59 class wxEvent;
60 class wxFileName;
61 class EDA_ITEM;
62 class EDA_RECT;
63 class EDA_DRAW_PANEL_GAL;
64 class EDA_MSG_PANEL;
65 class BASE_SCREEN;
66 class PARAM_CFG;
67 class PAGE_INFO;
68 class PLOTTER;
69 class TITLE_BLOCK;
70 class MSG_PANEL_ITEM;
71 class TOOL_MANAGER;
72 class TOOL_DISPATCHER;
73 class ACTIONS;
74 class PAGED_DIALOG;
77 class FILE_HISTORY;
78 class SETTINGS_MANAGER;
79 class SEARCH_STACK;
80 class APP_SETTINGS_BASE;
81 class WX_INFOBAR;
82 struct WINDOW_SETTINGS;
83 struct WINDOW_STATE;
84 
85 #define DEFAULT_MAX_UNDO_ITEMS 0
86 #define ABS_MAX_UNDO_ITEMS (INT_MAX / 2)
87 
89 typedef std::function< void( wxUpdateUIEvent& ) > UIUpdateHandler;
90 
91 wxDECLARE_EVENT( UNITS_CHANGED, wxCommandEvent );
92 
93 
103 class EDA_BASE_FRAME : public wxFrame, public TOOLS_HOLDER, public KIWAY_HOLDER
104 {
105 public:
110  {
113  };
114 
115  EDA_BASE_FRAME( wxWindow* aParent, FRAME_T aFrameType, const wxString& aTitle,
116  const wxPoint& aPos, const wxSize& aSize, long aStyle,
117  const wxString& aFrameName, KIWAY* aKiway );
118 
119  EDA_BASE_FRAME( FRAME_T aFrameType, KIWAY* aKiway );
120 
121  ~EDA_BASE_FRAME();
122 
127  {
128  return m_userUnits;
129  }
130 
131  void SetUserUnits( EDA_UNITS aUnits )
132  {
133  m_userUnits = aUnits;
134  }
135 
136  void ChangeUserUnits( EDA_UNITS aUnits );
137 
138  virtual void ToggleUserUnits() { }
139 
141 
142  virtual SEVERITY GetSeverity( int aErrorCode ) const { return RPT_SEVERITY_UNDEFINED; }
143 
150  bool ProcessEvent( wxEvent& aEvent ) override;
151 
159  virtual void OnCharHook( wxKeyEvent& aKeyEvent );
160 
165  void OnMenuEvent( wxMenuEvent& event );
166 
173  virtual void RegisterUIUpdateHandler( int aID, const ACTION_CONDITIONS& aConditions ) override;
174 
180  virtual void UnregisterUIUpdateHandler( int aID ) override;
181 
190  static void HandleUpdateUIEvent( wxUpdateUIEvent& aEvent, EDA_BASE_FRAME* aFrame,
191  ACTION_CONDITIONS aCond );
192 
193  virtual void OnMove( wxMoveEvent& aEvent )
194  {
195  aEvent.Skip();
196  }
197 
198  virtual void OnSize( wxSizeEvent& aEvent );
199 
200  void OnMaximize( wxMaximizeEvent& aEvent );
201 
202  void SetAutoSaveInterval( int aInterval );
203 
204  int GetAutoSaveInterval() const { return m_autoSaveInterval; }
205 
206  bool IsType( FRAME_T aType ) const { return m_ident == aType; }
207  FRAME_T GetFrameType() const { return m_ident; }
208 
214  virtual const SEARCH_STACK& sys_search();
215 
216  virtual wxString help_name();
217 
218  void OnKicadAbout( wxCommandEvent& event );
219 
223  void OnPreferences( wxCommandEvent& event );
224 
225  void PrintMsg( const wxString& text );
226 
227  void CreateInfoBar();
228 
230 
235 
245  void ShowInfoBarError( const wxString& aErrorMsg, bool aShowCloseButton = false );
246 
261  void ShowInfoBarError( const wxString& aErrorMsg, bool aShowCloseButton,
262  std::function<void(void)> aCallback );
263 
273  void ShowInfoBarWarning( const wxString& aWarningMsg, bool aShowCloseButton = false );
274 
284  void ShowInfoBarMsg( const wxString& aMsg, bool aShowCloseButton = false );
285 
290  virtual APP_SETTINGS_BASE* config() const;
291 
298 
299 
300  void LoadWindowState( const wxString& aFileName );
307  void LoadWindowSettings( const WINDOW_SETTINGS* aCfg );
308 
315  void SaveWindowSettings( WINDOW_SETTINGS* aCfg );
316 
323  virtual void LoadSettings( APP_SETTINGS_BASE* aCfg );
324 
331  virtual void SaveSettings( APP_SETTINGS_BASE* aCfg );
332 
341 
345  virtual void LoadWindowState( const WINDOW_STATE& aState );
346 
357  wxString ConfigBaseName() override
358  {
359  wxString baseCfgName = m_configName.IsEmpty() ? GetName() : m_configName;
360  return baseCfgName;
361  }
362 
371  virtual void SaveProjectSettings() {};
372 
380  void ImportHotkeyConfigFromFile( std::map<std::string, TOOL_ACTION*> aActionMap,
381  const wxString& aDefaultShortname );
382 
395  wxString GetFileFromHistory( int cmdId, const wxString& type,
396  FILE_HISTORY* aFileHistory = nullptr );
397 
404  void ClearFileHistory( FILE_HISTORY* aFileHistory = nullptr );
405 
415  void UpdateFileHistory( const wxString& FullFileName, FILE_HISTORY* aFileHistory = nullptr );
416 
423  {
424  return *m_fileHistory;
425  }
426 
427  void SetMruPath( const wxString& aPath ) { m_mruPath = aPath; }
428 
429  wxString GetMruPath() const { return m_mruPath; }
430 
438  virtual wxString GetCurrentFileName() const { return wxEmptyString; }
439 
445  virtual void ReCreateMenuBar();
446 
450  void AddStandardHelpMenu( wxMenuBar* aMenuBar );
451 
466  bool IsWritable( const wxFileName& aFileName );
467 
480  void CheckForAutoSaveFile( const wxFileName& aFileName );
481 
489  virtual void UpdateStatusBar() { }
490 
494  void ShowChangedLanguage() override;
495 
500  void CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) override;
501 
505  virtual void ThemeChanged();
506 
510  virtual void ProjectChanged() {}
511 
512  const wxString& GetAboutTitle() const { return m_aboutTitle; }
513 
519  virtual bool IsContentModified() const;
520 
529  wxSize GetWindowSize();
530 
543  virtual void ClearUndoORRedoList( UNDO_REDO_LIST aList, int aItemCount = -1 )
544  { }
545 
551  virtual void ClearUndoRedoList();
552 
558  virtual void PushCommandToUndoList( PICKED_ITEMS_LIST* aItem );
559 
565  virtual void PushCommandToRedoList( PICKED_ITEMS_LIST* aItem );
566 
571 
576 
577  virtual int GetUndoCommandCount() const { return m_undoList.m_CommandsList.size(); }
578  virtual int GetRedoCommandCount() const { return m_redoList.m_CommandsList.size(); }
579 
580  int GetMaxUndoItems() const { return m_undoRedoCountMax; }
581 
582  bool NonUserClose( bool aForce )
583  {
584  m_isNonUserClose = true;
585  return Close( aForce );
586  }
587 
591  virtual void HandleSystemColorChange();
592 
593 protected:
595  static constexpr int KICAD_AUI_TB_STYLE = wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_PLAIN_BACKGROUND;
596 
600  static wxString GetAutoSaveFilePrefix()
601  {
602  return wxT( "_autosave-" );
603  }
604 
608  void onAutoSaveTimer( wxTimerEvent& aEvent );
609 
615  virtual bool isAutoSaveRequired() const { return false; }
616 
622  virtual bool doAutoSave();
623 
624  virtual bool canCloseWindow( wxCloseEvent& aCloseEvent ) { return true; }
625  virtual void doCloseWindow() { }
626 
627  void onSystemColorChange( wxSysColourChangedEvent& aEvent );
628 
636  virtual void unitsChangeRefresh() { }
637 
641  virtual void setupUIConditions();
642 
649  void initExitKey();
650 
651  void ensureWindowIsOnScreen();
652 
653  DECLARE_EVENT_TABLE()
654 
655 private:
666  void windowClosing( wxCloseEvent& event );
667 
671  void commonInit( FRAME_T aFrameType );
672 
673  wxWindow* findQuasiModalDialog();
674 
682  virtual bool IsModal() const { return false; }
683 
684 protected:
685  FRAME_T m_ident; // Id Type (pcb, schematic, library..)
686  wxPoint m_framePos;
687  wxSize m_frameSize;
690 
691  // These contain the frame size and position for when it is not maximized
694 
695  wxString m_aboutTitle; // Name of program displayed in About.
696 
697  wxAuiManager m_auimgr;
698  wxString m_perspective; // wxAuiManager perspective.
699 
700  WX_INFOBAR* m_infoBar; // Infobar for the frame
701 
702  wxString m_configName; // Prefix used to identify some params (frame size...)
703  // and to name some config files (legacy hotkey files)
704 
706 
707  FILE_HISTORY* m_fileHistory; // The frame's recently opened file list
708 
711  int m_autoSaveInterval; // The auto save interval time in seconds.
712  wxTimer* m_autoSaveTimer;
713 
714  int m_undoRedoCountMax; // undo/Redo command Max depth
715 
716  UNDO_REDO_CONTAINER m_undoList; // Objects list for the undo command (old data)
717  UNDO_REDO_CONTAINER m_redoList; // Objects list for the redo command (old data)
718 
719  wxString m_mruPath; // Most recently used path.
720 
722 
724  std::map<int, UIUpdateHandler> m_uiUpdateMap;
725 
729 
732 
733 };
734 
735 
757 class EDA_PANE : public wxAuiPaneInfo
758 {
759 public:
761  {
762  Gripper( false );
763  CloseButton( false );
764  PaneBorder( false );
765  }
766 
771  {
772  SetFlag( optionToolbar, true );
773  CaptionVisible( false );
774  TopDockable().BottomDockable();
775  DockFixed( true );
776  Movable( false );
777  Resizable( true ); // expand to fit available space
778  return *this;
779  }
780 
785  {
786  SetFlag( optionToolbar, true );
787  CaptionVisible( false );
788  LeftDockable().RightDockable();
789  DockFixed( true );
790  Movable( false );
791  Resizable( true ); // expand to fit available space
792  return *this;
793  }
794 
799  {
800  CaptionVisible( true );
801  PaneBorder( true );
802  return *this;
803  }
804 
809  {
810  CaptionVisible( false );
811  Layer( 0 );
812  PaneBorder( true );
813  Resizable( true ); // expand to fit available space
814  return *this;
815  }
816 
821  {
822  CaptionVisible( false );
823  BottomDockable( true );
824  DockFixed( true );
825  Movable( false );
826  Resizable( true ); // expand to fit available space
827  return *this;
828  }
829 
834  {
835  CaptionVisible( false );
836  Movable( false );
837  Resizable( true );
838  PaneBorder( false );
839  DockFixed( true );
840  return *this;
841  }
842 };
843 
844 #endif // EDA_BASE_FRAME_H_
virtual void HandleSystemColorChange()
Update the UI in response to a change in the system colors.
void PrintMsg(const wxString &text)
A mix in class which holds the location of a wxWindow's KIWAY.
Definition: kiway_holder.h:36
wxString m_mruPath
virtual void OnCharHook(wxKeyEvent &aKeyEvent)
Capture the key event before it is sent to the GUI.
virtual bool doAutoSave()
This should be overridden by the derived class to handle the auto save feature.
void SetMruPath(const wxString &aPath)
bool m_isClosing
Set by NonUserClose() to indicate that the user did not request the current close.
SETTINGS_MANAGER * GetSettingsManager() const
void ShowChangedLanguage() override
Redraw the menus and what not in current language.
virtual APP_SETTINGS_BASE * config() const
Returns the settings object used in SaveSettings(), and is overloaded in KICAD_MANAGER_FRAME.
virtual void SaveSettings(APP_SETTINGS_BASE *aCfg)
Save common frame parameters to a configuration data file.
void SaveWindowSettings(WINDOW_SETTINGS *aCfg)
Save window settings to the given settings object.
SEVERITY
Definition: ui_common.h:100
UNDO_REDO_CONTAINER m_undoList
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
Definition: frame_type.h:32
void onSystemColorChange(wxSysColourChangedEvent &aEvent)
void windowClosing(wxCloseEvent &event)
(with its unexpected name so it does not collide with the real OnWindowClose() function provided in d...
virtual void PushCommandToRedoList(PICKED_ITEMS_LIST *aItem)
Add a command to redo in the redo list.
static void HandleUpdateUIEvent(wxUpdateUIEvent &aEvent, EDA_BASE_FRAME *aFrame, ACTION_CONDITIONS aCond)
Handle events generated when the UI is trying to figure out the current state of the UI controls rela...
virtual bool isAutoSaveRequired() const
Return the auto save status of the application.
virtual void setupUIConditions()
Setup the UI conditions for the various actions and their controls in this frame.
void onAutoSaveTimer(wxTimerEvent &aEvent)
Handle the auto save timer event.
virtual void SaveProjectSettings()
Save changes to the project settings to the project (.pro) file.
virtual void doCloseWindow()
virtual void RegisterUIUpdateHandler(int aID, const ACTION_CONDITIONS &aConditions) override
Register a UI update handler for the control with ID aID.
virtual void PushCommandToUndoList(PICKED_ITEMS_LIST *aItem)
Add a command to undo in the undo list.
virtual bool IsModal() const
Return true if the frame is shown in our modal mode and false if the frame is shown as an usual frame...
virtual int GetRedoCommandCount() const
wxPoint m_normalFramePos
void ChangeUserUnits(EDA_UNITS aUnits)
Look for files in a number of paths.
Definition: search_stack.h:41
virtual PICKED_ITEMS_LIST * PopCommandFromRedoList()
Return the last command to undo and remove it from list, nothing is deleted.
virtual SEVERITY GetSeverity(int aErrorCode) const
wxAuiManager m_auimgr
bool IsWritable(const wxFileName &aFileName)
Checks if aFileName can be written.
A panel to display various information messages.
Definition: msgpanel.h:103
This class implements a file history object to store a list of files, that can then be added to a men...
Definition: filehistory.h:42
void ImportHotkeyConfigFromFile(std::map< std::string, TOOL_ACTION * > aActionMap, const wxString &aDefaultShortname)
Prompt the user for a hotkey file to read, and read it.
Hold the information shown in the lower right corner of a plot, printout, or editing view.
Definition: title_block.h:40
wxTimer * m_autoSaveTimer
void LoadWindowState(const wxString &aFileName)
void ShowInfoBarWarning(const wxString &aWarningMsg, bool aShowCloseButton=false)
Show the WX_INFOBAR displayed on the top of the canvas with a message and a warning icon on the left ...
std::function< void(wxUpdateUIEvent &) > UIUpdateHandler
This is the handler functor for the update UI events.
virtual void ClearUndoORRedoList(UNDO_REDO_LIST aList, int aItemCount=-1)
Remove the aItemCount of old commands from aList and delete commands, pickers and picked items if nee...
void UpdateFileHistory(const wxString &FullFileName, FILE_HISTORY *aFileHistory=nullptr)
Update the list of recently opened files.
wxString m_perspective
virtual void UpdateStatusBar()
Update the status bar information.
FRAME_T GetFrameType() const
wxString GetFileFromHistory(int cmdId, const wxString &type, FILE_HISTORY *aFileHistory=nullptr)
Fetches the file name from the file history list.
void initExitKey()
Sets the common key-pair for exiting the application (Ctrl-Q) and ties it to the wxID_EXIT event id.
void ShowInfoBarMsg(const wxString &aMsg, bool aShowCloseButton=false)
Show the WX_INFOBAR displayed on the top of the canvas with a message and an info icon on the left of...
Master controller class:
Definition: tool_manager.h:54
wxString GetMruPath() const
A holder to handle a list of undo (or redo) commands.
wxWindow * findQuasiModalDialog()
Stores the common settings that are saved and loaded for each window / frame.
Definition: app_settings.h:81
void ensureWindowIsOnScreen()
wxSize m_normalFrameSize
void CheckForAutoSaveFile(const wxFileName &aFileName)
Check if an auto save file exists for aFileName and takes the appropriate action depending on the use...
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:99
virtual int GetUndoCommandCount() const
std::vector< PICKED_ITEMS_LIST * > m_CommandsList
virtual void unitsChangeRefresh()
Called when when the units setting has changed to allow for any derived classes to handle refreshing ...
virtual void OnSize(wxSizeEvent &aEvent)
std::map< int, UIUpdateHandler > m_uiUpdateMap
Set by the close window event handler after frames are asked if they can close.
virtual void UnregisterUIUpdateHandler(int aID) override
Unregister a UI handler for a given ID that was registered using RegisterUIUpdateHandler.
EDA_BASE_FRAME(wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aFrameName, KIWAY *aKiway)
void FinishAUIInitialization()
virtual const SEARCH_STACK & sys_search()
Return a SEARCH_STACK pertaining to entire program.
bool NonUserClose(bool aForce)
EDA_PANE & VToolbar()
Turn *this into a vertical toolbar for KiCad.
Describe the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:53
Handles how to draw a screen (a board, a schematic ...)
Definition: base_screen.h:40
void AddStandardHelpMenu(wxMenuBar *aMenuBar)
Adds the standard KiCad help menu to the menubar.
virtual WINDOW_SETTINGS * GetWindowSettings(APP_SETTINGS_BASE *aCfg)
Return a pointer to the window settings for this frame.
virtual PICKED_ITEMS_LIST * PopCommandFromUndoList()
Return the last command to undo and remove it from list, nothing is deleted.
Functions to provide common constants and other functions to assist in making a consistent UI.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition: kiway.h:260
int GetMaxUndoItems() const
int GetAutoSaveInterval() const
void OnKicadAbout(wxCommandEvent &event)
A holder to handle information on schematic or board items.
Specialization of the wxAuiPaneInfo class for KiCad panels.
Stores the window positioning/state.
Definition: app_settings.h:68
UNDO_REDO_CONTAINER m_redoList
virtual bool canCloseWindow(wxCloseEvent &aCloseEvent)
EDA_PANE & Canvas()
Turn *this into an undecorated pane suitable for a drawing canvas.
void ClearFileHistory(FILE_HISTORY *aFileHistory=nullptr)
Removes all files from the file history.
UNDO_REDO_LIST
Specifies whether we are interacting with the undo or redo stacks.
virtual bool IsContentModified() const
Get if the contents of the frame have been modified since the last save.
virtual void OnMove(wxMoveEvent &aEvent)
EDA_UNITS
Definition: eda_units.h:38
static wxString GetAutoSaveFilePrefix()
void CommonSettingsChanged(bool aEnvVarsChanged, bool aTextVarsChanged) override
Notification event that some of the common (suite-wide) settings have changed.
A modified version of the wxInfoBar class that allows us to:
Definition: infobar.h:73
EDA_PANE & InfoBar()
Turn *this into a infobar for KiCad.
Base plotter engine class.
Definition: plotter.h:121
void OnMaximize(wxMaximizeEvent &aEvent)
void SetAutoSaveInterval(int aInterval)
virtual void ThemeChanged()
Process light/dark theme change.
virtual void ToggleUserUnits()
wxSize GetWindowSize()
Get the undecorated window size that can be used for restoring the window size.
FILE_HISTORY & GetFileHistory()
Get the frame's main file history.
Board layer functions and definitions.
bool IsType(FRAME_T aType) const
wxString ConfigBaseName() override
Get the configuration base name.
EDA_PANE & Palette()
Turn *this into a captioned palette suitable for a symbol tree, layers manager, etc.
A base class which establishes the interface functions ReadParam and SaveParam, which are implemented...
Definition: config_params.h:81
WX_INFOBAR * m_infoBar
wxDECLARE_EVENT(UNITS_CHANGED, wxCommandEvent)
const wxString & GetAboutTitle() const
Functors that can be used to figure out how the action controls should be displayed in the UI and if ...
The base frame for deriving all KiCad main window classes.
void LoadWindowSettings(const WINDOW_SETTINGS *aCfg)
Load window settings from the given settings object.
Handle the component boundary box.
Definition: eda_rect.h:42
SETTINGS_MANAGER * m_settingsManager
void commonInit(FRAME_T aFrameType)
Collect common initialization functions used in all CTORs.
EDA_UNITS m_userUnits
Map containing the UI update handlers registered with wx for each action.
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:100
virtual wxString help_name()
void ShowInfoBarError(const wxString &aErrorMsg, bool aShowCloseButton=false)
Show the WX_INFOBAR displayed on the top of the canvas with a message and an error icon on the left o...
static constexpr int KICAD_AUI_TB_STYLE
< Default style flags used for wxAUI toolbars.
EDA_PANE & Messages()
Turn *this into a messages pane for KiCad.
virtual void ProjectChanged()
Notification event that the project has changed.
void OnPreferences(wxCommandEvent &event)
Displays the preferences and settings of all opened editors paged dialog.
Gather all the actions that are shared by tools.
Definition: actions.h:40
WX_INFOBAR * GetInfoBar()
void SetUserUnits(EDA_UNITS aUnits)
virtual void InstallPreferences(PAGED_DIALOG *, PANEL_HOTKEYS_EDITOR *)
Allow a frame to load its preference panels (if any) into the preferences dialog.
EDA_MSG_PANEL items for displaying messages.
Definition: msgpanel.h:53
EDA_PANE & HToolbar()
Turn *this to a horizontal toolbar for KiCad.
virtual void ClearUndoRedoList()
Clear the undo and redo list using ClearUndoORRedoList()
virtual wxString GetCurrentFileName() const
Get the full filename + path of the currently opened file in the frame.
bool ProcessEvent(wxEvent &aEvent) override
Override the default process event handler to implement the auto save feature.
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
wxString m_aboutTitle
wxString m_configName
FILE_HISTORY * m_fileHistory
void OnMenuEvent(wxMenuEvent &event)
The TOOL_DISPATCHER needs these to work around some issues in wxWidgets where the menu events aren't ...
virtual void LoadSettings(APP_SETTINGS_BASE *aCfg)
Load common frame parameters from a configuration file.
virtual void ReCreateMenuBar()
Recreates the menu bar.