KiCad PCB EDA Suite
EDA_BASE_FRAME Class Reference

Class EDA_BASE_FRAME is the base frame for deriving all KiCad main window classes. More...

#include <eda_base_frame.h>

Inheritance diagram for EDA_BASE_FRAME:
KICAD_MANAGER_FRAME KIWAY_PLAYER CVPCB_MAINFRAME EDA_3D_VIEWER EDA_DRAW_FRAME SIM_PLOT_FRAME_BASE GERBVIEW_FRAME PCB_BASE_FRAME PL_EDITOR_FRAME SCH_BASE_FRAME SIM_PLOT_FRAME DISPLAY_FOOTPRINTS_FRAME FOOTPRINT_VIEWER_FRAME FOOTPRINT_WIZARD_FRAME PCB_BASE_EDIT_FRAME LIB_EDIT_FRAME LIB_VIEW_FRAME SCH_EDIT_FRAME FOOTPRINT_EDIT_FRAME PCB_EDIT_FRAME

Public Member Functions

 EDA_BASE_FRAME (wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aFrameName)
 
 ~EDA_BASE_FRAME ()
 
bool ProcessEvent (wxEvent &aEvent) override
 Function ProcessEvent overrides the default process event handler to implement the auto save feature. More...
 
void SetAutoSaveInterval (int aInterval)
 
int GetAutoSaveInterval () const
 
bool IsType (FRAME_T aType) const
 
void GetKicadHelp (wxCommandEvent &event)
 
void GetKicadContribute (wxCommandEvent &event)
 
void GetKicadAbout (wxCommandEvent &event)
 
void PrintMsg (const wxString &text)
 
virtual void LoadSettings (wxConfigBase *aCfg)
 Function LoadSettings loads common frame parameters from a configuration file. More...
 
virtual void SaveSettings (wxConfigBase *aCfg)
 Function SaveSettings saves common frame parameters to a configuration data file. More...
 
wxString ConfigBaseName ()
 Function ConfigBaseName. More...
 
virtual void SaveProjectSettings (bool aAskForSave)
 Function SaveProjectSettings saves changes to the project settings to the project (.pro) file. More...
 
virtual void OnSelectPreferredEditor (wxCommandEvent &event)
 Function OnSelectPreferredEditor Open a dialog to select the editor that will used in KiCad to edit or display files (reports ... More...
 
int ReadHotkeyConfig (struct EDA_HOTKEY_CONFIG *aDescList)
 Function ReadHotkeyConfig Read configuration data and fill the current hotkey list with hotkeys. More...
 
virtual int WriteHotkeyConfig (struct EDA_HOTKEY_CONFIG *aDescList, wxString *aFullFileName=NULL)
 Function WriteHotkeyConfig Store the current hotkey list It is stored using the standard wxConfig mechanism or a file. More...
 
int ReadHotkeyConfigFile (const wxString &aFilename, struct EDA_HOTKEY_CONFIG *aDescList)
 Function ReadHotkeyConfigFile Read an old configuration file (&ltfile&gt.key) and fill the current hotkey list with hotkeys. More...
 
void ImportHotkeyConfigFromFile (EDA_HOTKEY_CONFIG *aDescList, const wxString &aDefaultShortname)
 Function ImportHotkeyConfigFromFile Prompt the user for an old hotkey file to read, and read it. More...
 
void ExportHotkeyConfigToFile (EDA_HOTKEY_CONFIG *aDescList, const wxString &aDefaultShortname)
 Function ExportHotkeyConfigToFile Prompt the user for an old hotkey file to read, and read it. More...
 
wxString GetFileFromHistory (int cmdId, const wxString &type, wxFileHistory *aFileHistory=NULL)
 Function GetFileFromHistory fetches the file name from the file history list. More...
 
void UpdateFileHistory (const wxString &FullFileName, wxFileHistory *aFileHistory=NULL)
 Function UpdateFileHistory Updates the list of recently opened files. More...
 
void SetMruPath (const wxString &aPath)
 
wxString GetMruPath () const
 
virtual void ReCreateMenuBar ()
 Function ReCreateMenuBar Creates recreates the menu bar. More...
 
bool IsWritable (const wxFileName &aFileName)
 Function IsWritable checks if aFileName can be written. More...
 
void CheckForAutoSaveFile (const wxFileName &aFileName, const wxString &aBackupFileExtension)
 Function CheckForAutoSaveFile checks if an auto save file exists for aFileName and takes the appropriate action depending on the user input. More...
 
virtual void ShowChangedLanguage ()
 Function ShowChangedLanguage redraws the menus and what not in current language. More...
 
virtual void OnChangeIconsOptions (wxCommandEvent &event)
 Function OnChangeIconsOptions Selects the current icons options in menus (or toolbars) in Kicad (the default for toolbars/menus is 26x26 pixels, and shows icons in menus). More...
 
virtual void ShowChangedIcons ()
 Function ShowChangedIcons redraws items menus after a icon was changed option. More...
 
void AddMenuIconsOptions (wxMenu *MasterMenu)
 Function AddMenuIconsOptions creates a menu list for icons in menu and icon sizes choice, and add it as submenu to MasterMenu. More...
 
bool PostCommandMenuEvent (int evt_type)
 Function PostCommandMenuEvent. More...
 
virtual int GetIconScale ()
 Function GetIconScale. More...
 
virtual void SetIconScale (int aScale)
 Function SetIconScale. More...
 

Protected Member Functions

void onAutoSaveTimer (wxTimerEvent &aEvent)
 Function onAutoSaveTimer handles the auto save timer event. More...
 
virtual bool isAutoSaveRequired () const
 Function autoSaveRequired returns the auto save status of the application. More...
 
virtual bool doAutoSave ()
 Function doAutoSave should be overridden by the derived class to handle the auto save feature. More...
 
virtual wxConfigBase * config ()
 Function config returns the wxConfigBase used in SaveSettings(), and is overloaded in KICAD_MANAGER_FRAME. More...
 
virtual const SEARCH_STACKsys_search ()
 Function sys_search returns a SEARCH_STACK pertaining to entire program, and is overloaded in KICAD_MANAGER_FRAME. More...
 
virtual wxString help_name ()
 

Protected Attributes

FRAME_T m_Ident
 Id Type (pcb, schematic, library..) More...
 
wxPoint m_FramePos
 
wxSize m_FrameSize
 
wxString m_configFrameName
 prefix used in config to identify some params (frame size...) if empty, the frame name defined in CTOR is used More...
 
wxAuiToolBar * m_mainToolBar
 Standard horizontal Toolbar. More...
 
wxString m_AboutTitle
 Name of program displayed in About. More...
 
wxAuiManager m_auimgr
 
bool m_hasAutoSave
 Flag to indicate if this frame supports auto save. More...
 
bool m_autoSaveState
 Flag to indicate the last auto save state. More...
 
int m_autoSaveInterval
 The auto save interval time in seconds. More...
 
wxTimer * m_autoSaveTimer
 The timer used to implement the auto save feature;. More...
 
wxString m_perspective
 wxAuiManager perspective. More...
 
wxString m_mruPath
 Most recently used path. More...
 

Static Protected Attributes

static constexpr int KICAD_AUI_TB_STYLE = wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_PLAIN_BACKGROUND
 

Default style flags used for wxAUI toolbars

More...
 

Private Member Functions

void windowClosing (wxCloseEvent &event)
 Function windowClosing (with its unexpected name so it does not collide with the real OnWindowClose() function provided in derived classes) is called just before a window closing, and is used to call a derivation specific SaveSettings(). More...
 
wxWindow * findQuasiModalDialog ()
 
void removePaneBorder (wxShowEvent &event)
 Removes border from wxAui panes. More...
 

Detailed Description

Class EDA_BASE_FRAME is the base frame for deriving all KiCad main window classes.

This class is not intended to be used directly. It provides support for automatic calls to a SaveSettings() function. SaveSettings() for a derived class can choose to do nothing, or rely on basic SaveSettings() support in this base class to do most of the work by calling it from the derived class's SaveSettings().

This class is not a KIWAY_PLAYER because KICAD_MANAGER_FRAME is derived from it and that class is not a player.

Definition at line 109 of file eda_base_frame.h.

Constructor & Destructor Documentation

EDA_BASE_FRAME::EDA_BASE_FRAME ( wxWindow *  aParent,
FRAME_T  aFrameType,
const wxString &  aTitle,
const wxPoint aPos,
const wxSize &  aSize,
long  aStyle,
const wxString &  aFrameName 
)

Definition at line 73 of file eda_base_frame.cpp.

References ID_AUTO_SAVE_TIMER, m_autoSaveInterval, m_autoSaveState, m_autoSaveTimer, m_FramePos, m_FrameSize, m_hasAutoSave, m_Ident, m_mainToolBar, m_mruPath, onAutoSaveTimer(), removePaneBorder(), windowClosing(), wxPoint::x, and wxPoint::y.

Referenced by isAutoSaveRequired().

75  :
76  wxFrame( aParent, wxID_ANY, aTitle, aPos, aSize, aStyle, aFrameName )
77 {
78  wxSize minsize;
79 
80  m_Ident = aFrameType;
81  m_mainToolBar = NULL;
82  m_hasAutoSave = false;
83  m_autoSaveState = false;
84  m_autoSaveInterval = -1;
85  m_autoSaveTimer = new wxTimer( this, ID_AUTO_SAVE_TIMER );
86  m_mruPath = wxStandardPaths::Get().GetDocumentsDir();
87  minsize.x = 470;
88  minsize.y = 350;
89 
90  SetSizeHints( minsize.x, minsize.y, -1, -1, -1, -1 );
91 
92  if( ( aSize.x < minsize.x ) || ( aSize.y < minsize.y ) )
93  SetSize( 0, 0, minsize.x, minsize.y );
94 
95  // Create child subwindows.
96 
97  // Dimensions of the user area of the main window.
98  GetClientSize( &m_FrameSize.x, &m_FrameSize.y );
99 
100  m_FramePos.x = m_FramePos.y = 0;
101 
102  Connect( ID_AUTO_SAVE_TIMER, wxEVT_TIMER,
103  wxTimerEventHandler( EDA_BASE_FRAME::onAutoSaveTimer ) );
104 
105  // hook wxEVT_CLOSE_WINDOW so we can call SaveSettings(). This function seems
106  // to be called before any other hook for wxCloseEvent, which is necessary.
107  Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( EDA_BASE_FRAME::windowClosing ) );
108 
109  // remove border from wxAui panes for all derived classes
110  Connect( wxEVT_SHOW, wxShowEventHandler( EDA_BASE_FRAME::removePaneBorder ) );
111 }
bool m_autoSaveState
Flag to indicate the last auto save state.
wxString m_mruPath
Most recently used path.
void windowClosing(wxCloseEvent &event)
Function windowClosing (with its unexpected name so it does not collide with the real OnWindowClose()...
void onAutoSaveTimer(wxTimerEvent &aEvent)
Function onAutoSaveTimer handles the auto save timer event.
wxTimer * m_autoSaveTimer
The timer used to implement the auto save feature;.
void removePaneBorder(wxShowEvent &event)
Removes border from wxAui panes.
FRAME_T m_Ident
Id Type (pcb, schematic, library..)
wxAuiToolBar * m_mainToolBar
Standard horizontal Toolbar.
bool m_hasAutoSave
Flag to indicate if this frame supports auto save.
int m_autoSaveInterval
The auto save interval time in seconds.
EDA_BASE_FRAME::~EDA_BASE_FRAME ( )

Definition at line 176 of file eda_base_frame.cpp.

References m_autoSaveTimer.

Referenced by isAutoSaveRequired().

177 {
178  delete m_autoSaveTimer;
179 
180  // This is needed for OSX: avoids further OnDraw processing after this
181  // destructor and before the native window is destroyed
182  this->Freeze();
183 }
wxTimer * m_autoSaveTimer
The timer used to implement the auto save feature;.

Member Function Documentation

void EDA_BASE_FRAME::AddMenuIconsOptions ( wxMenu *  MasterMenu)

Function AddMenuIconsOptions creates a menu list for icons in menu and icon sizes choice, and add it as submenu to MasterMenu.

Parameters
MasterMenuThe main menu. The sub menu list will be accessible from the menu item with id ID_KICAD_SELECT_ICONS_OPTIONS

Definition at line 693 of file eda_base_frame.cpp.

References AddMenuItem(), ID_KICAD_SELECT_ICONS_IN_MENUS, ID_KICAD_SELECT_ICONS_OPTIONS, KiBitmap(), and Pgm().

Referenced by GetMruPath(), preparePreferencesMenu(), PL_EDITOR_FRAME::ReCreateMenuBar(), KICAD_MANAGER_FRAME::ReCreateMenuBar(), and GERBVIEW_FRAME::ReCreateMenuBar().

694 {
695  wxMenu* menu = NULL;
696  wxMenuItem* item = MasterMenu->FindItem( ID_KICAD_SELECT_ICONS_OPTIONS );
697 
698  if( item ) // This menu exists, do nothing
699  return;
700 
701  menu = new wxMenu;
702 
703  menu->Append( new wxMenuItem( menu, ID_KICAD_SELECT_ICONS_IN_MENUS,
704  _( "Icons in Menus" ), wxEmptyString,
705  wxITEM_CHECK ) );
706  menu->Check( ID_KICAD_SELECT_ICONS_IN_MENUS, Pgm().GetUseIconsInMenus() );
707 
708  AddMenuItem( MasterMenu, menu,
710  _( "Icons Options" ),
711  _( "Select show icons in menus and icons sizes" ),
712  KiBitmap( icon_xpm ) );
713 }
wxMenuItem * AddMenuItem(wxMenu *aMenu, int aId, const wxString &aText, const wxBitmap &aImage, wxItemKind aType=wxITEM_NORMAL)
Function AddMenuItem is an inline helper function to create and insert a menu item with an icon into ...
Definition: bitmap.cpp:174
PGM_BASE & Pgm()
The global Program "get" accessor.
Definition: kicad.cpp:65
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Function KiBitmap constructs a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:78
void EDA_BASE_FRAME::CheckForAutoSaveFile ( const wxFileName &  aFileName,
const wxString &  aBackupFileExtension 
)

Function CheckForAutoSaveFile checks if an auto save file exists for aFileName and takes the appropriate action depending on the user input.

If an auto save file exists for aFileName, the user is prompted if they wish to replace file aFileName with the auto saved file. If the user chooses to replace the file, the backup file of aFileName is removed, aFileName is renamed to the backup file name, and the auto save file is renamed to aFileName. If user chooses to keep the existing version of aFileName, the auto save file is removed.

Parameters
aFileNameA wxFileName object containing the file name to check.
aBackupFileExtensionA wxString object containing the backup file extension used to create the backup file name.

Definition at line 598 of file eda_base_frame.cpp.

References AUTOSAVE_PREFIX_FILENAME, Format(), GetChars(), Pgm(), and traceAutoSave.

Referenced by GetMruPath(), and PCB_EDIT_FRAME::OpenProjectFiles().

600 {
601  wxCHECK_RET( aFileName.IsOk(), wxT( "Invalid file name!" ) );
602  wxCHECK_RET( !aBackupFileExtension.IsEmpty(), wxT( "Invalid backup file extension!" ) );
603 
604  wxFileName autoSaveFileName = aFileName;
605 
606  // Check for auto save file.
607  autoSaveFileName.SetName( AUTOSAVE_PREFIX_FILENAME + aFileName.GetName() );
608 
609  wxLogTrace( traceAutoSave,
610  wxT( "Checking for auto save file " ) + autoSaveFileName.GetFullPath() );
611 
612  if( !autoSaveFileName.FileExists() )
613  return;
614 
615  wxString msg = wxString::Format( _(
616  "Well this is potentially embarrassing!\n"
617  "It appears that the last time you were editing the file\n"
618  "\"%s\"\n"
619  "it was not saved properly. Do you wish to restore the last saved edits you made?" ),
620  GetChars( aFileName.GetFullName() )
621  );
622 
623  int response = wxMessageBox( msg, Pgm().App().GetAppName(), wxYES_NO | wxICON_QUESTION, this );
624 
625  // Make a backup of the current file, delete the file, and rename the auto save file to
626  // the file name.
627  if( response == wxYES )
628  {
629  // Get the backup file name.
630  wxFileName backupFileName = aFileName;
631  backupFileName.SetExt( aBackupFileExtension );
632 
633  // If an old backup file exists, delete it. If an old copy of the file exists, rename
634  // it to the backup file name
635  if( aFileName.FileExists() )
636  {
637  // Remove the old file backup file.
638  if( backupFileName.FileExists() )
639  wxRemoveFile( backupFileName.GetFullPath() );
640 
641  // Rename the old file to the backup file name.
642  if( !wxRenameFile( aFileName.GetFullPath(), backupFileName.GetFullPath() ) )
643  {
644  msg.Printf( _( "Could not create backup file \"%s\"" ),
645  GetChars( backupFileName.GetFullPath() ) );
646  wxMessageBox( msg );
647  }
648  }
649 
650  if( !wxRenameFile( autoSaveFileName.GetFullPath(), aFileName.GetFullPath() ) )
651  {
652  wxMessageBox( _( "The auto save file could not be renamed to the board file name." ),
653  Pgm().App().GetAppName(), wxOK | wxICON_EXCLAMATION, this );
654  }
655  }
656  else
657  {
658  wxLogTrace( traceAutoSave,
659  wxT( "Removing auto save file " ) + autoSaveFileName.GetFullPath() );
660 
661  // Remove the auto save file when using the previous file as is.
662  wxRemoveFile( autoSaveFileName.GetFullPath() );
663  }
664 }
const wxChar *const traceAutoSave
Flag to enable auto save feature debug tracing.
PGM_BASE & Pgm()
The global Program "get" accessor.
Definition: kicad.cpp:65
#define AUTOSAVE_PREFIX_FILENAME
Prefix to create filenames for schematic files or other difile when auto-saved to retrieve a crash...
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
wxConfigBase * EDA_BASE_FRAME::config ( )
protectedvirtual
wxString EDA_BASE_FRAME::ConfigBaseName ( )
inline

Function ConfigBaseName.

Returns
a base name prefix used in Load/Save settings to build the full name of keys used in config. This is usually the name of the frame set by CTOR, unless m_configFrameName contains a base name. this is the case of frames which can be shown in normal or modal mode. This is needed because we want only one base name prefix, regardless the mode used.

Definition at line 260 of file eda_base_frame.h.

References m_configFrameName.

Referenced by LoadSettings(), EDA_DRAW_FRAME::LoadSettings(), SaveSettings(), and EDA_DRAW_FRAME::SaveSettings().

261  {
262  wxString baseCfgName = m_configFrameName.IsEmpty() ? GetName() : m_configFrameName;
263  return baseCfgName;
264  }
wxString m_configFrameName
prefix used in config to identify some params (frame size...) if empty, the frame name defined in CTO...
bool EDA_BASE_FRAME::doAutoSave ( )
protectedvirtual

Function doAutoSave should be overridden by the derived class to handle the auto save feature.

Returns
true if the auto save was successful otherwise false.

Reimplemented in PCB_EDIT_FRAME, and SCH_EDIT_FRAME.

Definition at line 251 of file eda_base_frame.cpp.

Referenced by isAutoSaveRequired(), and onAutoSaveTimer().

252 {
253  wxCHECK_MSG( false, true, wxT( "Auto save timer function not overridden. Bad programmer!" ) );
254 }
void EDA_BASE_FRAME::ExportHotkeyConfigToFile ( EDA_HOTKEY_CONFIG aDescList,
const wxString &  aDefaultShortname 
)

Function ExportHotkeyConfigToFile Prompt the user for an old hotkey file to read, and read it.

Parameters
aDescList= current hotkey list descr. to initialize.
aDefaultShortname= a default short name (extention not needed) like eechema, kicad...

Definition at line 757 of file hotkeys_basic.cpp.

References DEFAULT_HOTKEY_FILENAME_EXT, EDA_FILE_SELECTOR(), and Prj().

Referenced by KICAD_MANAGER_FRAME::Process_Config(), LIB_EDIT_FRAME::Process_Config(), SCH_EDIT_FRAME::Process_Config(), PL_EDITOR_FRAME::Process_Config(), PCB_EDIT_FRAME::Process_Config(), GERBVIEW_FRAME::Process_Config(), FOOTPRINT_EDIT_FRAME::ProcessPreferences(), and SaveProjectSettings().

759 {
760  wxString ext = DEFAULT_HOTKEY_FILENAME_EXT;
761  wxString mask = wxT( "*." ) + ext;
762 
763 #if 0
764  wxString path = wxPathOnly( Prj().GetProjectFullName() );
765 #else
766  wxString path = GetMruPath();
767 #endif
768  wxFileName fn( aDefaultShortname );
769  fn.SetExt( DEFAULT_HOTKEY_FILENAME_EXT );
770 
771  wxString filename = EDA_FILE_SELECTOR( _( "Write Hotkey Configuration File:" ),
772  path,
773  fn.GetFullPath(),
774  ext,
775  mask,
776  this,
777  wxFD_SAVE,
778  true );
779 
780  if( filename.IsEmpty() )
781  return;
782 
783  WriteHotkeyConfig( aDescList, &filename );
784  SetMruPath( wxFileName( filename ).GetPath() );
785 }
void SetMruPath(const wxString &aPath)
PROJECT & Prj()
Definition: kicad.cpp:270
wxString EDA_FILE_SELECTOR(const wxString &aTitle, const wxString &aPath, const wxString &aFileName, const wxString &aExtension, const wxString &aWildcard, wxWindow *aParent, int aStyle, const bool aKeepWorkingDirectory, const wxPoint &aPosition, wxString *aMruPath)
Function EDA_FILE_SELECTOR.
Definition: gestfich.cpp:82
virtual int WriteHotkeyConfig(struct EDA_HOTKEY_CONFIG *aDescList, wxString *aFullFileName=NULL)
Function WriteHotkeyConfig Store the current hotkey list It is stored using the standard wxConfig mec...
#define DEFAULT_HOTKEY_FILENAME_EXT
Definition: hotkeys_basic.h:34
wxString GetMruPath() const
wxWindow * EDA_BASE_FRAME::findQuasiModalDialog ( )
private

Definition at line 114 of file eda_base_frame.cpp.

References FRAME_SCH, DIALOG_SHIM::IsQuasiModal(), and m_Ident.

Referenced by ProcessEvent(), and windowClosing().

115 {
116  for( auto& iter : GetChildren() )
117  {
118  DIALOG_SHIM* dlg = dynamic_cast<DIALOG_SHIM*>( iter );
119  if( dlg && dlg->IsQuasiModal() )
120  return dlg;
121  }
122 
123  // FIXME: CvPcb is currently implemented on top of KIWAY_PLAYER rather than DIALOG_SHIM,
124  // so we have to look for it separately.
125  if( m_Ident == FRAME_SCH )
126  {
127  wxWindow* cvpcb = wxWindow::FindWindowByName( "CvpcbFrame" );
128  if( cvpcb )
129  return cvpcb;
130  }
131 
132  return nullptr;
133 }
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:70
FRAME_T m_Ident
Id Type (pcb, schematic, library..)
bool IsQuasiModal()
Definition: dialog_shim.h:103
int EDA_BASE_FRAME::GetAutoSaveInterval ( ) const
inline

Definition at line 219 of file eda_base_frame.h.

References m_autoSaveInterval.

Referenced by DIALOG_GENERALOPTIONS::init(), and SCH_EDIT_FRAME::OnPreferencesOptions().

219 { return m_autoSaveInterval; }
int m_autoSaveInterval
The auto save interval time in seconds.
wxString EDA_BASE_FRAME::GetFileFromHistory ( int  cmdId,
const wxString &  type,
wxFileHistory *  aFileHistory = NULL 
)

Function GetFileFromHistory fetches the file name from the file history list.

and removes the selected file, if this file does not exists Note also the menu is updated, if wxFileHistory::UseMenu was called at init time

Parameters
cmdIdThe command ID associated with the aFileHistory object.
typePlease document me!
aFileHistoryThe wxFileHistory in use. If null, the main application file history is used
Returns
a wxString containing the selected filename

Definition at line 420 of file eda_base_frame.cpp.

References Format(), GetChars(), KIFACE_I::GetFileHistory(), i, and Kiface().

Referenced by GERBVIEW_FRAME::OnDrlFileHistory(), KICAD_MANAGER_FRAME::OnFileHistory(), PL_EDITOR_FRAME::OnFileHistory(), PCB_EDIT_FRAME::OnFileHistory(), GERBVIEW_FRAME::OnGbrFileHistory(), GERBVIEW_FRAME::OnJobFileHistory(), GERBVIEW_FRAME::OnZipFileHistory(), and SaveProjectSettings().

422 {
423  wxFileHistory* fileHistory = aFileHistory;
424 
425  if( !fileHistory )
426  fileHistory = &Kiface().GetFileHistory();
427 
428  int baseId = fileHistory->GetBaseId();
429 
430  wxASSERT( cmdId >= baseId && cmdId < baseId + (int) fileHistory->GetCount() );
431 
432  unsigned i = cmdId - baseId;
433 
434  if( i < fileHistory->GetCount() )
435  {
436  wxString fn = fileHistory->GetHistoryFile( i );
437 
438  if( wxFileName::FileExists( fn ) )
439  return fn;
440  else
441  {
442  wxString msg = wxString::Format(
443  _( "File \"%s\" was not found." ),
444  GetChars( fn ) );
445 
446  wxMessageBox( msg );
447 
448  fileHistory->RemoveFileFromHistory( i );
449  }
450  }
451 
452  return wxEmptyString;
453 }
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
Definition: kicad.cpp:52
wxFileHistory & GetFileHistory()
Definition: kiface_i.h:123
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
size_t i
Definition: json11.cpp:597
virtual int EDA_BASE_FRAME::GetIconScale ( )
inlinevirtual

Function GetIconScale.

Return the desired scaling for toolbar/menubar icons in fourths (e.g. 4 is unity). A negative number indicates autoscale based on font size.

Reimplemented in PCB_EDIT_FRAME, SCH_EDIT_FRAME, GERBVIEW_FRAME, LIB_EDIT_FRAME, and FOOTPRINT_EDIT_FRAME.

Definition at line 453 of file eda_base_frame.h.

Referenced by get_scale_factor(), and FOOTPRINT_EDIT_FRAME::GetIconScale().

453 { return -1; }
void EDA_BASE_FRAME::GetKicadAbout ( wxCommandEvent &  event)

Definition at line 547 of file eda_base_frame.cpp.

References ShowAboutDialog().

Referenced by add_search_paths(), and IsType().

548 {
549  void ShowAboutDialog(EDA_BASE_FRAME * aParent); // See AboutDialog_main.cpp
550  ShowAboutDialog( this );
551 }
void ShowAboutDialog(EDA_BASE_FRAME *aParent)
Class EDA_BASE_FRAME is the base frame for deriving all KiCad main window classes.
void EDA_BASE_FRAME::GetKicadContribute ( wxCommandEvent &  event)

Definition at line 534 of file eda_base_frame.cpp.

References URL_GET_INVOLVED.

Referenced by add_search_paths(), and IsType().

535 {
536  if( !wxLaunchDefaultBrowser( URL_GET_INVOLVED ) )
537  {
538  wxString msg;
539  msg.Printf( _( "Could not launch the default browser.\n"
540  "For information on how to help the KiCad project, visit %s" ),
542  wxMessageBox( msg, _( "Get involved with KiCad" ), wxOK, this );
543  }
544 }
#define URL_GET_INVOLVED
void EDA_BASE_FRAME::GetKicadHelp ( wxCommandEvent &  event)

Definition at line 456 of file eda_base_frame.cpp.

References DIM, Format(), GetAssociatedDocument(), GetChars(), help_name(), SearchHelpFileFullPath(), and sys_search().

Referenced by add_search_paths(), and IsType().

457 {
458  const SEARCH_STACK& search = sys_search();
459 
460  /* We have to get document for beginners,
461  * or the full specific doc
462  * if event id is wxID_INDEX, we want the document for beginners.
463  * else the specific doc file (its name is in Kiface().GetHelpFileName())
464  * The document for beginners is the same for all KiCad utilities
465  */
466  if( event.GetId() == wxID_INDEX )
467  {
468  // List of possible names for Getting Started in KiCad
469  const wxChar* names[2] = {
470  wxT( "getting_started_in_kicad" ),
471  wxT( "Getting_Started_in_KiCad" )
472  };
473 
474  wxString helpFile;
475  // Search for "getting_started_in_kicad.html" or "getting_started_in_kicad.pdf"
476  // or "Getting_Started_in_KiCad.html" or "Getting_Started_in_KiCad.pdf"
477  for( unsigned ii = 0; ii < DIM( names ); ii++ )
478  {
479  helpFile = SearchHelpFileFullPath( search, names[ii] );
480 
481  if( !helpFile.IsEmpty() )
482  break;
483  }
484 
485  if( !helpFile )
486  {
487  wxString msg = wxString::Format( _(
488  "Html or pdf help file \n\"%s\"\n or\n\"%s\" could not be found." ), names[0], names[1] );
489  wxMessageBox( msg );
490  }
491  else
492  {
493  GetAssociatedDocument( this, helpFile );
494  }
495 
496  return;
497  }
498 
499  wxString base_name = help_name();
500  wxString helpFile = SearchHelpFileFullPath( search, base_name );
501 
502  if( !helpFile )
503  {
504  wxString msg = wxString::Format( _(
505  "Help file \"%s\" could not be found." ),
506  GetChars( base_name )
507  );
508  wxMessageBox( msg );
509  }
510  else
511  {
512  GetAssociatedDocument( this, helpFile );
513  }
514 }
#define DIM(x)
of elements in an array
Definition: macros.h:98
bool GetAssociatedDocument(wxWindow *aParent, const wxString &aDocName, const wxPathList *aPaths)
Function GetAssociatedDocument open a document (file) with the suitable browser.
Definition: eda_doc.cpp:87
Class SEARCH_STACK looks for files in a number of places.
Definition: search_stack.h:41
virtual const SEARCH_STACK & sys_search()
Function sys_search returns a SEARCH_STACK pertaining to entire program, and is overloaded in KICAD_M...
wxString SearchHelpFileFullPath(const SEARCH_STACK &aSStack, const wxString &aBaseName)
Function SearchHelpFileFullPath returns the help file&#39;s full path.
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
virtual wxString help_name()
wxString EDA_BASE_FRAME::help_name ( )
protectedvirtual

Reimplemented in KICAD_MANAGER_FRAME.

Definition at line 396 of file eda_base_frame.cpp.

References KIFACE_I::GetHelpFileName(), and Kiface().

Referenced by GetKicadHelp(), and isAutoSaveRequired().

397 {
398  return Kiface().GetHelpFileName();
399 }
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
Definition: kicad.cpp:52
const wxString & GetHelpFileName() const
Function GetHelpFileName returns just the basename portion of the current help file.
Definition: kiface_i.h:121
void EDA_BASE_FRAME::ImportHotkeyConfigFromFile ( EDA_HOTKEY_CONFIG aDescList,
const wxString &  aDefaultShortname 
)

Function ImportHotkeyConfigFromFile Prompt the user for an old hotkey file to read, and read it.

Parameters
aDescList= current hotkey list descr. to initialize.
aDefaultShortname= a default short name (extention not needed) like eechema, kicad...

Definition at line 728 of file hotkeys_basic.cpp.

References DEFAULT_HOTKEY_FILENAME_EXT, and EDA_FILE_SELECTOR().

Referenced by KICAD_MANAGER_FRAME::Process_Config(), LIB_EDIT_FRAME::Process_Config(), SCH_EDIT_FRAME::Process_Config(), PL_EDITOR_FRAME::Process_Config(), PCB_EDIT_FRAME::Process_Config(), GERBVIEW_FRAME::Process_Config(), FOOTPRINT_EDIT_FRAME::ProcessPreferences(), and SaveProjectSettings().

730 {
731  wxString ext = DEFAULT_HOTKEY_FILENAME_EXT;
732  wxString mask = wxT( "*." ) + ext;
733 
734 
735  wxString path = GetMruPath();
736  wxFileName fn( aDefaultShortname );
737  fn.SetExt( DEFAULT_HOTKEY_FILENAME_EXT );
738 
739  wxString filename = EDA_FILE_SELECTOR( _( "Read Hotkey Configuration File:" ),
740  path,
741  fn.GetFullPath(),
742  ext,
743  mask,
744  this,
745  wxFD_OPEN,
746  true );
747 
748  if( filename.IsEmpty() )
749  return;
750 
751  ReadHotkeyConfigFile( filename, aDescList );
752  WriteHotkeyConfig( aDescList );
753  SetMruPath( wxFileName( filename ).GetPath() );
754 }
void SetMruPath(const wxString &aPath)
int ReadHotkeyConfigFile(const wxString &aFilename, struct EDA_HOTKEY_CONFIG *aDescList)
Function ReadHotkeyConfigFile Read an old configuration file (&ltfile&gt.key) and fill the current ho...
wxString EDA_FILE_SELECTOR(const wxString &aTitle, const wxString &aPath, const wxString &aFileName, const wxString &aExtension, const wxString &aWildcard, wxWindow *aParent, int aStyle, const bool aKeepWorkingDirectory, const wxPoint &aPosition, wxString *aMruPath)
Function EDA_FILE_SELECTOR.
Definition: gestfich.cpp:82
virtual int WriteHotkeyConfig(struct EDA_HOTKEY_CONFIG *aDescList, wxString *aFullFileName=NULL)
Function WriteHotkeyConfig Store the current hotkey list It is stored using the standard wxConfig mec...
#define DEFAULT_HOTKEY_FILENAME_EXT
Definition: hotkeys_basic.h:34
wxString GetMruPath() const
virtual bool EDA_BASE_FRAME::isAutoSaveRequired ( ) const
inlineprotectedvirtual

Function autoSaveRequired returns the auto save status of the application.

Override this function if your derived frame supports automatic file saving.

Reimplemented in PCB_EDIT_FRAME, and SCH_EDIT_FRAME.

Definition at line 175 of file eda_base_frame.h.

References config(), doAutoSave(), EDA_BASE_FRAME(), help_name(), ProcessEvent(), SetAutoSaveInterval(), sys_search(), and ~EDA_BASE_FRAME().

Referenced by ProcessEvent().

175 { return false; }
bool EDA_BASE_FRAME::IsWritable ( const wxFileName &  aFileName)

Function IsWritable checks if aFileName can be written.

The function performs a number of tests on aFileName to verify that it can be saved. If aFileName defines a path with no file name, them the path is tested for user write permission. If aFileName defines a file name that does not exist in the path, the path is tested for user write permission. If aFileName defines a file that already exits, the file name is tested for user write permissions.

Note
The file name path must be set or an assertion will be raised on debug builds and return false on release builds.
Parameters
aFileNameThe full path and/or file name of the file to test.
Returns
False if aFileName cannot be written.

Definition at line 554 of file eda_base_frame.cpp.

References GetChars().

Referenced by SCH_EDIT_FRAME::doAutoSave(), GetMruPath(), SCH_EDIT_FRAME::SaveEEFile(), LIB_EDIT_FRAME::saveLibrary(), PCB_EDIT_FRAME::SavePcbCopy(), PCB_EDIT_FRAME::SavePcbFile(), CVPCB_MAINFRAME::SaveProjectFile(), and SCH_EDIT_FRAME::SaveProjectSettings().

555 {
556  wxString msg;
557  wxFileName fn = aFileName;
558 
559  // Check for absence of a file path with a file name. Unfortunately KiCad
560  // uses paths relative to the current project path without the ./ part which
561  // confuses wxFileName. Making the file name path absolute may be less than
562  // elegant but it solves the problem.
563  if( fn.GetPath().IsEmpty() && fn.HasName() )
564  fn.MakeAbsolute();
565 
566  wxCHECK_MSG( fn.IsOk(), false,
567  wxT( "File name object is invalid. Bad programmer!" ) );
568  wxCHECK_MSG( !fn.GetPath().IsEmpty(), false,
569  wxT( "File name object path <" ) + fn.GetFullPath() +
570  wxT( "> is not set. Bad programmer!" ) );
571 
572  if( fn.IsDir() && !fn.IsDirWritable() )
573  {
574  msg.Printf( _( "You do not have write permissions to folder \"%s\"." ),
575  GetChars( fn.GetPath() ) );
576  }
577  else if( !fn.FileExists() && !fn.IsDirWritable() )
578  {
579  msg.Printf( _( "You do not have write permissions to save file \"%s\" to folder \"%s\"." ),
580  GetChars( fn.GetFullName() ), GetChars( fn.GetPath() ) );
581  }
582  else if( fn.FileExists() && !fn.IsFileWritable() )
583  {
584  msg.Printf( _( "You do not have write permissions to save file \"%s\"." ),
585  GetChars( fn.GetFullPath() ) );
586  }
587 
588  if( !msg.IsEmpty() )
589  {
590  wxMessageBox( msg );
591  return false;
592  }
593 
594  return true;
595 }
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
void EDA_BASE_FRAME::LoadSettings ( wxConfigBase *  aCfg)
virtual

Function LoadSettings loads common frame parameters from a configuration file.

Don't forget to call the base method or your frames won't remember their positions and sizes.

Reimplemented in EDA_DRAW_FRAME, PCB_BASE_FRAME, GERBVIEW_FRAME, PCB_EDIT_FRAME, LIB_EDIT_FRAME, SCH_EDIT_FRAME, KICAD_MANAGER_FRAME, CVPCB_MAINFRAME, PL_EDITOR_FRAME, EDA_3D_VIEWER, FOOTPRINT_WIZARD_FRAME, SIM_PLOT_FRAME, FOOTPRINT_VIEWER_FRAME, LIB_VIEW_FRAME, and FOOTPRINT_EDIT_FRAME.

Definition at line 276 of file eda_base_frame.cpp.

References ConfigBaseName(), DEFAULT_AUTO_SAVE_INTERVAL, entryAutoSaveInterval, entryMaximized, entryMruPath, entryPerspective, entryPosX, entryPosY, entrySizeX, entrySizeY, m_autoSaveInterval, m_FramePos, m_FrameSize, m_hasAutoSave, m_mruPath, m_perspective, wxPoint::x, and wxPoint::y.

Referenced by IsType(), SIM_PLOT_FRAME::LoadSettings(), EDA_3D_VIEWER::LoadSettings(), CVPCB_MAINFRAME::LoadSettings(), KICAD_MANAGER_FRAME::LoadSettings(), and EDA_DRAW_FRAME::LoadSettings().

277 {
278  int maximized = 0;
279 
280  wxString baseCfgName = ConfigBaseName();
281 
282  wxString text = baseCfgName + entryPosX;
283  aCfg->Read( text, &m_FramePos.x );
284 
285  text = baseCfgName + entryPosY;
286  aCfg->Read( text, &m_FramePos.y );
287 
288  text = baseCfgName + entrySizeX;
289  aCfg->Read( text, &m_FrameSize.x, wxDefaultSize.x );
290 
291  text = baseCfgName + entrySizeY;
292  aCfg->Read( text, &m_FrameSize.y, wxDefaultSize.x );
293 
294  text = baseCfgName + entryMaximized;
295  aCfg->Read( text, &maximized, 0 );
296 
297  if( m_hasAutoSave )
298  {
299  text = baseCfgName + entryAutoSaveInterval;
300  aCfg->Read( text, &m_autoSaveInterval, DEFAULT_AUTO_SAVE_INTERVAL );
301  }
302 
303  // Ensure the window is on a connected display, and is visible.
304  // (at least a corner of the frame must be visible on screen)
305  // Sometimes, if a window was moved on an auxiliary display, and when this
306  // display is no more available, it is not the case.
307  wxRect rect( m_FramePos, m_FrameSize );
308 
309  if( wxDisplay::GetFromPoint( rect.GetTopLeft() ) == wxNOT_FOUND &&
310  wxDisplay::GetFromPoint( rect.GetTopRight() ) == wxNOT_FOUND &&
311  wxDisplay::GetFromPoint( rect.GetBottomLeft() ) == wxNOT_FOUND &&
312  wxDisplay::GetFromPoint( rect.GetBottomRight() ) == wxNOT_FOUND )
313  {
314  m_FramePos = wxDefaultPosition;
315  }
316 
317  // Ensure Window title bar is visible
318 #if defined( __WXMAC__ )
319  // for macOSX, the window must be below system (macOSX) toolbar
320  // Ypos_min = GetMBarHeight(); seems no more exist in new API (subject to change)
321  int Ypos_min = 20;
322 #else
323  int Ypos_min = 0;
324 #endif
325  if( m_FramePos.y < Ypos_min )
326  m_FramePos.y = Ypos_min;
327 
328  if( maximized )
329  Maximize();
330 
331  aCfg->Read( baseCfgName + entryPerspective, &m_perspective );
332  aCfg->Read( baseCfgName + entryMruPath, &m_mruPath );
333 }
wxString m_mruPath
Most recently used path.
wxString ConfigBaseName()
Function ConfigBaseName.
static const wxString entryPosX
X position of frame, in pixels (suffix)
wxString m_perspective
wxAuiManager perspective.
static const wxString entryPerspective
Configuration file entry for wxAuiManger perspective.
#define DEFAULT_AUTO_SAVE_INTERVAL
The default auto save interval is 10 minutes.
static const wxString entrySizeX
Width of frame, in pixels (suffix)
static const wxString entrySizeY
Height of frame, in pixels (suffix)
static const wxString entryPosY
Y position of frame, in pixels (suffix)
static const wxString entryAutoSaveInterval
Configuration file entry name for auto save interval.
static const wxString entryMaximized
Nonzero iff frame is maximized (suffix)
bool m_hasAutoSave
Flag to indicate if this frame supports auto save.
static const wxString entryMruPath
Configuration file entry for most recently used path.
int m_autoSaveInterval
The auto save interval time in seconds.
void EDA_BASE_FRAME::onAutoSaveTimer ( wxTimerEvent &  aEvent)
protected

Function onAutoSaveTimer handles the auto save timer event.

Definition at line 244 of file eda_base_frame.cpp.

References doAutoSave(), m_autoSaveInterval, and m_autoSaveTimer.

Referenced by EDA_BASE_FRAME().

245 {
246  if( !doAutoSave() )
247  m_autoSaveTimer->Start( m_autoSaveInterval * 1000, wxTIMER_ONE_SHOT );
248 }
virtual bool doAutoSave()
Function doAutoSave should be overridden by the derived class to handle the auto save feature...
wxTimer * m_autoSaveTimer
The timer used to implement the auto save feature;.
int m_autoSaveInterval
The auto save interval time in seconds.
void EDA_BASE_FRAME::OnChangeIconsOptions ( wxCommandEvent &  event)
virtual

Function OnChangeIconsOptions Selects the current icons options in menus (or toolbars) in Kicad (the default for toolbars/menus is 26x26 pixels, and shows icons in menus).

Reimplemented in KIWAY_PLAYER, and KICAD_MANAGER_FRAME.

Definition at line 682 of file eda_base_frame.cpp.

References ID_KICAD_SELECT_ICONS_IN_MENUS, Pgm(), ReCreateMenuBar(), and PGM_BASE::SetUseIconsInMenus().

Referenced by GetMruPath(), KICAD_MANAGER_FRAME::OnChangeIconsOptions(), and KIWAY_PLAYER::OnChangeIconsOptions().

683 {
684  if( event.GetId() == ID_KICAD_SELECT_ICONS_IN_MENUS )
685  {
686  Pgm().SetUseIconsInMenus( event.IsChecked() );
687  }
688 
689  ReCreateMenuBar();
690 }
void SetUseIconsInMenus(bool aUseIcons)
True to use menu icons.
Definition: pgm_base.h:327
PGM_BASE & Pgm()
The global Program "get" accessor.
Definition: kicad.cpp:65
virtual void ReCreateMenuBar()
Function ReCreateMenuBar Creates recreates the menu bar.
void EDA_BASE_FRAME::OnSelectPreferredEditor ( wxCommandEvent &  event)
virtual

Function OnSelectPreferredEditor Open a dialog to select the editor that will used in KiCad to edit or display files (reports ...

) The full filename editor is saved in configuration (global params)

Definition at line 517 of file eda_base_frame.cpp.

References PGM_BASE::AskUserForPreferredEditor(), PGM_BASE::GetEditorName(), Pgm(), and PGM_BASE::SetEditorName().

Referenced by SaveProjectSettings().

518 {
519  // Ask for the current editor and instruct GetEditorName() to not show
520  // unless we pass false as argument.
521  wxString editorname = Pgm().GetEditorName( false );
522 
523  // Ask the user to select a new editor, but suggest the current one as the default.
524  editorname = Pgm().AskUserForPreferredEditor( editorname );
525 
526  // If we have a new editor name request it to be copied to m_editor_name and saved
527  // to the preferences file. If the user cancelled the dialog then the previous
528  // value will be retained.
529  if( !editorname.IsEmpty() )
530  Pgm().SetEditorName( editorname );
531 }
VTBL_ENTRY void SetEditorName(const wxString &aFileName)
Definition: pgm_base.cpp:330
PGM_BASE & Pgm()
The global Program "get" accessor.
Definition: kicad.cpp:65
VTBL_ENTRY const wxString AskUserForPreferredEditor(const wxString &aDefaultEditor=wxEmptyString)
Shows a dialog that instructs the user to select a new preferred editor.
Definition: pgm_base.cpp:375
VTBL_ENTRY const wxString & GetEditorName(bool aCanShowFileChooser=true)
Return the preferred editor name.
Definition: pgm_base.cpp:338
bool EDA_BASE_FRAME::PostCommandMenuEvent ( int  evt_type)

Function PostCommandMenuEvent.

Post a menu event to the frame, which can be used to trigger actions bound to menu items.

Definition at line 667 of file eda_base_frame.cpp.

Referenced by GetMruPath(), FOOTPRINT_EDIT_FRAME::OnHotKey(), FOOTPRINT_EDIT_FRAME::OnHotkeyDeleteItem(), FOOTPRINT_EDIT_FRAME::OnHotkeyDuplicateItem(), PCB_EDIT_FRAME::OnHotkeyDuplicateOrArrayItem(), FOOTPRINT_EDIT_FRAME::OnHotkeyEditItem(), FOOTPRINT_EDIT_FRAME::OnHotkeyMoveItem(), FOOTPRINT_EDIT_FRAME::OnHotkeyMoveItemExact(), and FOOTPRINT_EDIT_FRAME::OnHotkeyRotateItem().

668 {
669  if( evt_type != 0 )
670  {
671  wxCommandEvent evt( wxEVT_COMMAND_MENU_SELECTED );
672  evt.SetEventObject( this );
673  evt.SetId( evt_type );
674  wxPostEvent( this, evt );
675  return true;
676  }
677 
678  return false;
679 }
void EDA_BASE_FRAME::PrintMsg ( const wxString &  text)

Definition at line 402 of file eda_base_frame.cpp.

Referenced by IsType().

403 {
404  SetStatusText( text );
405 }
bool EDA_BASE_FRAME::ProcessEvent ( wxEvent &  aEvent)
override

Function ProcessEvent overrides the default process event handler to implement the auto save feature.

Warning
If you override this function in a derived class, make sure you call down to this or the auto save feature will be disabled.

Definition at line 186 of file eda_base_frame.cpp.

References findQuasiModalDialog(), isAutoSaveRequired(), m_autoSaveInterval, m_autoSaveState, m_autoSaveTimer, m_hasAutoSave, and traceAutoSave.

Referenced by isAutoSaveRequired(), LIB_VIEW_FRAME::onSelectNextSymbol(), LIB_VIEW_FRAME::onSelectPreviousSymbol(), KIWAY::ProcessEvent(), LIB_VIEW_FRAME::ReCreateListCmp(), GERBVIEW_CONTROL::SwitchUnits(), and PCBNEW_CONTROL::SwitchUnits().

187 {
188 #ifdef __WXMAC__
189  // Apple in its infinite wisdom will raise a disabled window before even passing
190  // us the event, so we have no way to stop it. Instead, we have to catch an
191  // improperly ordered disabled window and quasi-modal dialog here and reorder
192  // them.
193  if( !IsEnabled() && IsActive() )
194  {
195  wxWindow* dlg = findQuasiModalDialog();
196  if( dlg )
197  dlg->Raise();
198  }
199 #endif
200 
201  if( !wxFrame::ProcessEvent( aEvent ) )
202  return false;
203 
204  if( IsShown() && m_hasAutoSave && IsActive() &&
206  {
207  if( !m_autoSaveState )
208  {
209  wxLogTrace( traceAutoSave, wxT( "Starting auto save timer." ) );
210  m_autoSaveTimer->Start( m_autoSaveInterval * 1000, wxTIMER_ONE_SHOT );
211  m_autoSaveState = true;
212  }
213  else if( m_autoSaveTimer->IsRunning() )
214  {
215  wxLogTrace( traceAutoSave, wxT( "Stopping auto save timer." ) );
216  m_autoSaveTimer->Stop();
217  m_autoSaveState = false;
218  }
219  }
220 
221  return true;
222 }
bool m_autoSaveState
Flag to indicate the last auto save state.
const wxChar *const traceAutoSave
Flag to enable auto save feature debug tracing.
wxTimer * m_autoSaveTimer
The timer used to implement the auto save feature;.
wxWindow * findQuasiModalDialog()
virtual bool isAutoSaveRequired() const
Function autoSaveRequired returns the auto save status of the application.
bool m_hasAutoSave
Flag to indicate if this frame supports auto save.
int m_autoSaveInterval
The auto save interval time in seconds.
int EDA_BASE_FRAME::ReadHotkeyConfig ( struct EDA_HOTKEY_CONFIG aDescList)

Function ReadHotkeyConfig Read configuration data and fill the current hotkey list with hotkeys.

Parameters
aDescList= current hotkey list descr. to initialize.

Definition at line 649 of file hotkeys_basic.cpp.

References ReadHotkeyConfig().

Referenced by SaveProjectSettings().

650 {
651  ::ReadHotkeyConfig( GetName(), aDescList );
652  return 1;
653 }
int ReadHotkeyConfig(struct EDA_HOTKEY_CONFIG *aDescList)
Function ReadHotkeyConfig Read configuration data and fill the current hotkey list with hotkeys...
int EDA_BASE_FRAME::ReadHotkeyConfigFile ( const wxString &  aFilename,
struct EDA_HOTKEY_CONFIG aDescList 
)

Function ReadHotkeyConfigFile Read an old configuration file (&ltfile&gt.key) and fill the current hotkey list with hotkeys.

Parameters
aFilename= file name to read.
aDescList= current hotkey list descr. to initialize.

Definition at line 594 of file hotkeys_basic.cpp.

References DEFAULT_HOTKEY_FILENAME_EXT, and ParseHotkeyConfig().

Referenced by SaveProjectSettings().

596 {
597  wxFileName fn( aFilename );
598  fn.SetExt( DEFAULT_HOTKEY_FILENAME_EXT );
599 
600  wxFile cfgfile( fn.GetFullPath() );
601 
602  if( !cfgfile.IsOpened() ) // There is a problem to open file
603  return 0;
604 
605  // get length
606  cfgfile.SeekEnd();
607  wxFileOffset size = cfgfile.Tell();
608  cfgfile.Seek( 0 );
609 
610  // read data
611  std::vector<char> buffer( size );
612  cfgfile.Read( buffer.data(), size );
613  wxString data( buffer.data(), wxConvUTF8 );
614 
615  // parse
616  ParseHotkeyConfig( data, aDescList );
617 
618  // cleanup
619  cfgfile.Close();
620  return 1;
621 }
void ParseHotkeyConfig(const wxString &data, struct EDA_HOTKEY_CONFIG *aDescList)
#define DEFAULT_HOTKEY_FILENAME_EXT
Definition: hotkeys_basic.h:34
void EDA_BASE_FRAME::ReCreateMenuBar ( void  )
virtual

Function ReCreateMenuBar Creates recreates the menu bar.

Needed when the language is changed

Reimplemented in PCB_EDIT_FRAME, EDA_DRAW_FRAME, SCH_EDIT_FRAME, GERBVIEW_FRAME, LIB_EDIT_FRAME, KICAD_MANAGER_FRAME, PCB_BASE_FRAME, PL_EDITOR_FRAME, FOOTPRINT_EDIT_FRAME, CVPCB_MAINFRAME, FOOTPRINT_VIEWER_FRAME, and LIB_VIEW_FRAME.

Definition at line 257 of file eda_base_frame.cpp.

Referenced by GetMruPath(), InstallHotkeyFrame(), OnChangeIconsOptions(), ShowChangedIcons(), and ShowChangedLanguage().

258 {
259 }
void EDA_BASE_FRAME::removePaneBorder ( wxShowEvent &  event)
private

Removes border from wxAui panes.

Definition at line 160 of file eda_base_frame.cpp.

References i, and m_auimgr.

Referenced by EDA_BASE_FRAME().

161 {
162  // nothing to be set
163  if( !m_auimgr.GetManagedWindow() )
164  return;
165 
166  // remove the ugly 1-pixel white border on AUI panes
167  wxAuiPaneInfoArray panes = m_auimgr.GetAllPanes();
168 
169  for( size_t i = 0; i < panes.GetCount(); i++ )
170  m_auimgr.GetPane( panes.Item( i ).name ).PaneBorder( false );
171 
172  m_auimgr.Update();
173 }
wxAuiManager m_auimgr
size_t i
Definition: json11.cpp:597
virtual void EDA_BASE_FRAME::SaveProjectSettings ( bool  aAskForSave)
inlinevirtual

Function SaveProjectSettings saves changes to the project settings to the project (.pro) file.

The method is virtual so you can override it to call the suitable save method. The base method do nothing

Parameters
aAskForSave= true to open a dialog before saving the settings

Reimplemented in PCB_EDIT_FRAME, and SCH_EDIT_FRAME.

Definition at line 274 of file eda_base_frame.h.

References ExportHotkeyConfigToFile(), GetFileFromHistory(), ImportHotkeyConfigFromFile(), OnSelectPreferredEditor(), ReadHotkeyConfig(), ReadHotkeyConfigFile(), UpdateFileHistory(), and WriteHotkeyConfig().

Referenced by DIALOG_PAGES_SETTINGS::OnOkClick(), SCH_EDIT_FRAME::OnPreferencesOptions(), and SCH_EDIT_FRAME::Process_Config().

274 {};
void EDA_BASE_FRAME::SaveSettings ( wxConfigBase *  aCfg)
virtual

Function SaveSettings saves common frame parameters to a configuration data file.

Don't forget to call the base class's SaveSettings() from your derived SaveSettings() otherwise the frames won't remember their positions and sizes.

Reimplemented in EDA_DRAW_FRAME, PCB_BASE_FRAME, GERBVIEW_FRAME, PCB_EDIT_FRAME, LIB_EDIT_FRAME, SCH_EDIT_FRAME, KICAD_MANAGER_FRAME, CVPCB_MAINFRAME, PL_EDITOR_FRAME, EDA_3D_VIEWER, FOOTPRINT_WIZARD_FRAME, SIM_PLOT_FRAME, FOOTPRINT_VIEWER_FRAME, LIB_VIEW_FRAME, and FOOTPRINT_EDIT_FRAME.

Definition at line 336 of file eda_base_frame.cpp.

References ConfigBaseName(), entryAutoSaveInterval, entryMruPath, entryPerspective, m_auimgr, m_autoSaveInterval, m_FramePos, m_FrameSize, m_hasAutoSave, m_mruPath, wxPoint::x, and wxPoint::y.

Referenced by IsType(), SIM_PLOT_FRAME::SaveSettings(), EDA_3D_VIEWER::SaveSettings(), CVPCB_MAINFRAME::SaveSettings(), KICAD_MANAGER_FRAME::SaveSettings(), EDA_DRAW_FRAME::SaveSettings(), and windowClosing().

337 {
338  wxString text;
339 
340  if( IsIconized() )
341  return;
342 
343  wxString baseCfgName = ConfigBaseName();
344 
345  m_FrameSize = GetSize();
346  m_FramePos = GetPosition();
347 
348  text = baseCfgName + wxT( "Pos_x" );
349  aCfg->Write( text, (long) m_FramePos.x );
350 
351  text = baseCfgName + wxT( "Pos_y" );
352  aCfg->Write( text, (long) m_FramePos.y );
353 
354  text = baseCfgName + wxT( "Size_x" );
355  aCfg->Write( text, (long) m_FrameSize.x );
356 
357  text = baseCfgName + wxT( "Size_y" );
358  aCfg->Write( text, (long) m_FrameSize.y );
359 
360  text = baseCfgName + wxT( "Maximized" );
361  aCfg->Write( text, IsMaximized() );
362 
363  if( m_hasAutoSave )
364  {
365  text = baseCfgName + entryAutoSaveInterval;
366  aCfg->Write( text, m_autoSaveInterval );
367  }
368 
369  // Once this is fully implemented, wxAuiManager will be used to maintain
370  // the persistance of the main frame and all it's managed windows and
371  // all of the legacy frame persistence position code can be removed.
372  wxString perspective = m_auimgr.SavePerspective();
373 
374  // printf( "perspective(%s): %s\n",
375  // TO_UTF8( m_FrameName + entryPerspective ), TO_UTF8( perspective ) );
376  aCfg->Write( baseCfgName + entryPerspective, perspective );
377  aCfg->Write( baseCfgName + entryMruPath, m_mruPath );
378 }
wxString m_mruPath
Most recently used path.
wxString ConfigBaseName()
Function ConfigBaseName.
wxAuiManager m_auimgr
static const wxString entryPerspective
Configuration file entry for wxAuiManger perspective.
static const wxString entryAutoSaveInterval
Configuration file entry name for auto save interval.
bool m_hasAutoSave
Flag to indicate if this frame supports auto save.
static const wxString entryMruPath
Configuration file entry for most recently used path.
int m_autoSaveInterval
The auto save interval time in seconds.
void EDA_BASE_FRAME::SetAutoSaveInterval ( int  aInterval)

Definition at line 225 of file eda_base_frame.cpp.

References m_autoSaveInterval, m_autoSaveState, and m_autoSaveTimer.

Referenced by isAutoSaveRequired(), DIALOG_GENERALOPTIONS::OnOkClick(), and SCH_EDIT_FRAME::OnPreferencesOptions().

226 {
227  m_autoSaveInterval = aInterval;
228 
229  if( m_autoSaveTimer->IsRunning() )
230  {
231  if( m_autoSaveInterval > 0 )
232  {
233  m_autoSaveTimer->Start( m_autoSaveInterval * 1000, wxTIMER_ONE_SHOT );
234  }
235  else
236  {
237  m_autoSaveTimer->Stop();
238  m_autoSaveState = false;
239  }
240  }
241 }
bool m_autoSaveState
Flag to indicate the last auto save state.
wxTimer * m_autoSaveTimer
The timer used to implement the auto save feature;.
int m_autoSaveInterval
The auto save interval time in seconds.
virtual void EDA_BASE_FRAME::SetIconScale ( int  aScale)
inlinevirtual

Function SetIconScale.

Modify the scale of icons in the window; should refresh them and save the setting.

Reimplemented in PCB_EDIT_FRAME, SCH_EDIT_FRAME, GERBVIEW_FRAME, and LIB_EDIT_FRAME.

Definition at line 460 of file eda_base_frame.h.

460 {}
void EDA_BASE_FRAME::SetMruPath ( const wxString &  aPath)
inline

Definition at line 361 of file eda_base_frame.h.

Referenced by KICAD_MANAGER_FRAME::LoadProject().

361 { m_mruPath = aPath; }
wxString m_mruPath
Most recently used path.
void EDA_BASE_FRAME::ShowChangedIcons ( )
virtual

Function ShowChangedIcons redraws items menus after a icon was changed option.

Definition at line 269 of file eda_base_frame.cpp.

References ReCreateMenuBar().

Referenced by GetMruPath(), and KIWAY::ShowChangedIcons().

270 {
271  ReCreateMenuBar();
272  GetMenuBar()->Refresh();
273 }
virtual void ReCreateMenuBar()
Function ReCreateMenuBar Creates recreates the menu bar.
void EDA_BASE_FRAME::ShowChangedLanguage ( )
virtual

Function ShowChangedLanguage redraws the menus and what not in current language.

Reimplemented in PCB_EDIT_FRAME, GERBVIEW_FRAME, PCB_BASE_FRAME, and CVPCB_MAINFRAME.

Definition at line 262 of file eda_base_frame.cpp.

References ReCreateMenuBar().

Referenced by GetMruPath(), KIWAY::SetLanguage(), CVPCB_MAINFRAME::ShowChangedLanguage(), PCB_BASE_FRAME::ShowChangedLanguage(), and GERBVIEW_FRAME::ShowChangedLanguage().

263 {
264  ReCreateMenuBar();
265  GetMenuBar()->Refresh();
266 }
virtual void ReCreateMenuBar()
Function ReCreateMenuBar Creates recreates the menu bar.
const SEARCH_STACK & EDA_BASE_FRAME::sys_search ( )
protectedvirtual

Function sys_search returns a SEARCH_STACK pertaining to entire program, and is overloaded in KICAD_MANAGER_FRAME.

Reimplemented in KICAD_MANAGER_FRAME.

Definition at line 390 of file eda_base_frame.cpp.

References Kiface(), and KIFACE_I::KifaceSearch().

Referenced by GetKicadHelp(), and isAutoSaveRequired().

391 {
392  return Kiface().KifaceSearch();
393 }
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
Definition: kicad.cpp:52
SEARCH_STACK & KifaceSearch()
Only for DSO specific &#39;non-library&#39; files.
Definition: kiface_i.h:127
void EDA_BASE_FRAME::UpdateFileHistory ( const wxString &  FullFileName,
wxFileHistory *  aFileHistory = NULL 
)

Function UpdateFileHistory Updates the list of recently opened files.

Note also the menu is updated, if wxFileHistory::UseMenu was called at init time

Parameters
FullFileNameThe full file name including the path.
aFileHistoryThe wxFileHistory in use. If NULL, the main application file history is used.

Definition at line 408 of file eda_base_frame.cpp.

References KIFACE_I::GetFileHistory(), and Kiface().

Referenced by SCH_EDIT_FRAME::importFile(), GERBVIEW_FRAME::LoadExcellonFiles(), GERBVIEW_FRAME::loadListOfGerberFiles(), PL_EDITOR_FRAME::LoadPageLayoutDescrFile(), KICAD_MANAGER_FRAME::LoadProject(), KICAD_MANAGER_FRAME::OnCloseWindow(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::SavePcbFile(), SaveProjectSettings(), and GERBVIEW_FRAME::unarchiveFiles().

410 {
411  wxFileHistory* fileHistory = aFileHistory;
412 
413  if( !fileHistory )
414  fileHistory = &Kiface().GetFileHistory();
415 
416  fileHistory->AddFileToHistory( FullFileName );
417 }
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
Definition: kicad.cpp:52
wxFileHistory & GetFileHistory()
Definition: kiface_i.h:123
void EDA_BASE_FRAME::windowClosing ( wxCloseEvent &  event)
private

Function windowClosing (with its unexpected name so it does not collide with the real OnWindowClose() function provided in derived classes) is called just before a window closing, and is used to call a derivation specific SaveSettings().

SaveSettings() is called for all derived wxFrames in this base class overload. (Calling it from a destructor is deprecated since the wxFrame's position is not available in the destructor on linux.) In other words, you should not need to call SaveSettings() anywhere, except in this one function found only in this class.

Definition at line 136 of file eda_base_frame.cpp.

References config(), findQuasiModalDialog(), and SaveSettings().

Referenced by EDA_BASE_FRAME().

137 {
138  // Don't allow closing when a quasi-modal is open.
139  wxWindow* quasiModal = findQuasiModalDialog();
140  if( quasiModal )
141  {
142  // Raise and notify; don't give the user a warning regarding "quasi-modal dialogs"
143  // when they have no idea what those are.
144  quasiModal->Raise();
145  wxBell();
146 
147  event.Veto();
148  return;
149  }
150 
151  wxConfigBase* cfg = config();
152 
153  if( cfg )
154  SaveSettings( cfg ); // virtual, wxFrame specific
155 
156  event.Skip(); // we did not "handle" the event, only eavesdropped on it.
157 }
virtual void SaveSettings(wxConfigBase *aCfg)
Function SaveSettings saves common frame parameters to a configuration data file. ...
virtual wxConfigBase * config()
Function config returns the wxConfigBase used in SaveSettings(), and is overloaded in KICAD_MANAGER_F...
wxWindow * findQuasiModalDialog()
int EDA_BASE_FRAME::WriteHotkeyConfig ( struct EDA_HOTKEY_CONFIG aDescList,
wxString *  aFullFileName = NULL 
)
virtual

Function WriteHotkeyConfig Store the current hotkey list It is stored using the standard wxConfig mechanism or a file.

Parameters
aDescList= pointer to the current hotkey list.
aFullFileName= a wxString pointer to a full file name. if NULL, use the standard wxConfig mechanism (default) the output format is: shortcut "key" "function" lines starting with # are comments

Reimplemented in EDA_DRAW_FRAME.

Definition at line 528 of file hotkeys_basic.cpp.

References AddDelimiterString(), DEFAULT_HOTKEY_FILENAME_EXT, GetChars(), GetNewConfig(), HOTKEYS_CONFIG_KEY, KeyNameFromKeyCode(), EDA_HOTKEY_CONFIG::m_HK_InfoList, EDA_HOTKEY::m_InfoMsg, EDA_HOTKEY::m_KeyCode, EDA_HOTKEY_CONFIG::m_SectionTag, EDA_HOTKEY_CONFIG::m_Title, and TO_UTF8.

Referenced by SaveProjectSettings(), HOTKEYS_EDITOR_DIALOG::TransferDataFromWindow(), and EDA_DRAW_FRAME::WriteHotkeyConfig().

530 {
531  wxString msg;
532  wxString keyname, infokey;
533 
534  msg = wxT( "$hotkey list\n" );
535 
536  // Print the current hotkey list
537  EDA_HOTKEY** list;
538 
539  for( ; aDescList->m_HK_InfoList != nullptr; aDescList++ )
540  {
541  if( aDescList->m_Title )
542  {
543  msg += wxT( "# " );
544  msg += *aDescList->m_Title;
545  msg += wxT( "\n" );
546  }
547 
548  msg += *aDescList->m_SectionTag;
549  msg += wxT( "\n" );
550 
551  list = aDescList->m_HK_InfoList;
552 
553  for( ; *list != nullptr; list++ )
554  {
555  EDA_HOTKEY* hk_decr = *list;
556  msg += wxT( "shortcut " );
557  keyname = KeyNameFromKeyCode( hk_decr->m_KeyCode );
558  AddDelimiterString( keyname );
559  infokey = hk_decr->m_InfoMsg;
560  AddDelimiterString( infokey );
561  msg += keyname + wxT( ": " ) + infokey + wxT( "\n" );
562  }
563  }
564 
565  msg += wxT( "$Endlist\n" );
566 
567  if( aFullFileName )
568  {
569  FILE* file = wxFopen( *aFullFileName, wxT( "wt" ) );
570 
571  if( file )
572  {
573  fputs( TO_UTF8( msg ), file );
574  fclose( file );
575  }
576  else
577  {
578  msg.Printf( wxT( "Unable to write file %s" ), GetChars( *aFullFileName ) );
579  return 0;
580  }
581  }
582  else
583  {
584  wxFileName fn( GetName() );
585  fn.SetExt( DEFAULT_HOTKEY_FILENAME_EXT );
586  std::unique_ptr<wxConfigBase> config( GetNewConfig( fn.GetFullPath() ) );
587  config->Write( HOTKEYS_CONFIG_KEY, msg );
588  }
589 
590  return 1;
591 }
EDA_HOTKEY ** m_HK_InfoList
Definition: hotkeys_basic.h:91
wxConfigBase * GetNewConfig(const wxString &aProgName)
Function GetNewConfig.
Definition: common.cpp:206
virtual wxConfigBase * config()
Function config returns the wxConfigBase used in SaveSettings(), and is overloaded in KICAD_MANAGER_F...
#define TO_UTF8(wxstring)
Macro TO_UTF8 converts a wxString to a UTF8 encoded C string for all wxWidgets build modes...
Definition: macros.h:47
#define HOTKEYS_CONFIG_KEY
void AddDelimiterString(wxString &string)
Function AddDelimiterString Add un " to the start and the end of string (if not already done)...
Definition: gestfich.cpp:44
wxString * m_SectionTag
Definition: hotkeys_basic.h:90
wxString m_InfoMsg
Definition: hotkeys_basic.h:64
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
class EDA_HOTKEY is a class to handle hot key commands.
Definition: hotkeys_basic.h:57
wxString * m_Title
Definition: hotkeys_basic.h:92
wxString KeyNameFromKeyCode(int aKeycode, bool *aIsFound)
Function KeyNameFromKeyCode return the key name from the key code Only some wxWidgets key values are ...
#define DEFAULT_HOTKEY_FILENAME_EXT
Definition: hotkeys_basic.h:34

Member Data Documentation

wxString EDA_BASE_FRAME::m_AboutTitle
protected

Name of program displayed in About.

Definition at line 141 of file eda_base_frame.h.

int EDA_BASE_FRAME::m_autoSaveInterval
protected

The auto save interval time in seconds.

Definition at line 152 of file eda_base_frame.h.

Referenced by EDA_BASE_FRAME(), GetAutoSaveInterval(), LoadSettings(), onAutoSaveTimer(), ProcessEvent(), SaveSettings(), and SetAutoSaveInterval().

bool EDA_BASE_FRAME::m_autoSaveState
protected

Flag to indicate the last auto save state.

Definition at line 149 of file eda_base_frame.h.

Referenced by SCH_EDIT_FRAME::doAutoSave(), PCB_EDIT_FRAME::doAutoSave(), EDA_BASE_FRAME(), ProcessEvent(), and SetAutoSaveInterval().

wxTimer* EDA_BASE_FRAME::m_autoSaveTimer
protected

The timer used to implement the auto save feature;.

Definition at line 155 of file eda_base_frame.h.

Referenced by EDA_BASE_FRAME(), onAutoSaveTimer(), ProcessEvent(), SetAutoSaveInterval(), and ~EDA_BASE_FRAME().

wxString EDA_BASE_FRAME::m_configFrameName
protected

prefix used in config to identify some params (frame size...) if empty, the frame name defined in CTOR is used

Definition at line 136 of file eda_base_frame.h.

Referenced by ConfigBaseName(), and LIB_VIEW_FRAME::LIB_VIEW_FRAME().

bool EDA_BASE_FRAME::m_hasAutoSave
protected

Flag to indicate if this frame supports auto save.

Definition at line 146 of file eda_base_frame.h.

Referenced by EDA_BASE_FRAME(), LoadSettings(), ProcessEvent(), and SaveSettings().

FRAME_T EDA_BASE_FRAME::m_Ident
protected

Id Type (pcb, schematic, library..)

Definition at line 132 of file eda_base_frame.h.

Referenced by EDA_BASE_FRAME(), and findQuasiModalDialog().

wxAuiToolBar* EDA_BASE_FRAME::m_mainToolBar
protected

Standard horizontal Toolbar.

Definition at line 139 of file eda_base_frame.h.

Referenced by PCB_EDIT_FRAME::createPopUpMenuForFpPads(), EDA_BASE_FRAME(), GERBVIEW_FRAME::GERBVIEW_FRAME(), EDA_DRAW_FRAME::GetToolbarTool(), EDA_DRAW_FRAME::GetToolToggled(), KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME(), LIB_EDIT_FRAME::LIB_EDIT_FRAME(), LIB_VIEW_FRAME::LIB_VIEW_FRAME(), FOOTPRINT_VIEWER_FRAME::OnCloseWindow(), PCB_EDIT_FRAME::OnPlaceOrRouteFootprints(), PCB_EDIT_FRAME::OnRightClick(), LIB_EDIT_FRAME::OnUpdateDeMorganConvert(), LIB_EDIT_FRAME::OnUpdateDeMorganNormal(), FOOTPRINT_EDIT_FRAME::OnUpdateSelectTool(), LIB_EDIT_FRAME::OnUpdateSelectTool(), SCH_EDIT_FRAME::OnUpdateSelectTool(), PCB_EDIT_FRAME::OnUpdateVerticalToolbar(), PCB_BASE_FRAME::PcbGeneralLocateAndDisplay(), PL_EDITOR_FRAME::PL_EDITOR_FRAME(), PCB_EDIT_FRAME::PrepareLayerIndicator(), LIB_EDIT_FRAME::Process_Special_Functions(), KICAD_MANAGER_FRAME::RecreateBaseHToolbar(), DISPLAY_FOOTPRINTS_FRAME::ReCreateHToolbar(), LIB_VIEW_FRAME::ReCreateHToolbar(), FOOTPRINT_EDIT_FRAME::ReCreateHToolbar(), FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar(), PL_EDITOR_FRAME::ReCreateHToolbar(), FOOTPRINT_WIZARD_FRAME::ReCreateHToolbar(), GERBVIEW_FRAME::ReCreateHToolbar(), SCH_EDIT_FRAME::ReCreateHToolbar(), LIB_EDIT_FRAME::ReCreateHToolbar(), PCB_EDIT_FRAME::ReCreateHToolbar(), PCB_EDIT_FRAME::ReCreateLayerBox(), EDA_3D_VIEWER::ReCreateMainToolbar(), GERBVIEW_FRAME::ReCreateOptToolbar(), GERBVIEW_FRAME::ReCreateVToolbar(), SCH_EDIT_FRAME::RedrawActiveWindow(), and EDA_3D_VIEWER::RenderEngineChanged().

wxString EDA_BASE_FRAME::m_perspective
protected

wxAuiManager perspective.

Definition at line 157 of file eda_base_frame.h.

Referenced by LoadSettings().


The documentation for this class was generated from the following files: