KiCad PCB EDA Suite
SIM_PLOT_FRAME_BASE Class Reference

Class SIM_PLOT_FRAME_BASE. More...

#include <sim_plot_frame_base.h>

Inheritance diagram for SIM_PLOT_FRAME_BASE:
KIWAY_PLAYER EDA_BASE_FRAME KIWAY_HOLDER SIM_PLOT_FRAME

Public Types

enum  HOLDER_TYPE { DIALOG, FRAME, PANEL, SCREEN }
 

Public Member Functions

 SIM_PLOT_FRAME_BASE (wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Spice Simulator"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL, const wxString &name=wxT("SIM_PLOT_FRAME"))
 
 ~SIM_PLOT_FRAME_BASE ()
 
void m_splitterLeftRightOnIdle (wxIdleEvent &)
 
void m_splitterPlotAndConsoleOnIdle (wxIdleEvent &)
 
void m_splitterSignalsOnIdle (wxIdleEvent &)
 
void m_splitterTuneValuesOnIdle (wxIdleEvent &)
 
virtual bool OpenProjectFiles (const std::vector< wxString > &aFileList, int aCtl=0)
 Function OpenProjectFiles is abstract, and opens a project or set of files given by aFileList. More...
 
virtual bool ShowModal (wxString *aResult=NULL, wxWindow *aResultantFocusWindow=NULL)
 Function ShowModal puts up this wxFrame as if it were a modal dialog, with all other instantiated wxFrames disabled until this KIWAY_PLAYER derivative calls DismissModal(). More...
 
virtual void KiwayMailIn (KIWAY_EXPRESS &aEvent)
 Function KiwayMailIn receives KIWAY_EXPRESS messages from other players. More...
 
bool Destroy () override
 Our version of Destroy() which is virtual from wxWidgets. More...
 
bool IsModal ()
 
void SetModal (bool aIsModal)
 
bool IsDismissed ()
 Function IsDismissed returns false only if both the frame is acting in modal mode and it has not been dismissed yet with DismissModal(). More...
 
void DismissModal (bool aRetVal, const wxString &aResult=wxEmptyString)
 
EDA_UNITS GetUserUnits () const
 Return the user units currently in use. More...
 
void SetUserUnits (EDA_UNITS aUnits)
 
void ChangeUserUnits (EDA_UNITS aUnits)
 
TOOL_MANAGERGetToolManager () const
 Return the MVC controller. More...
 
virtual void PushTool (const std::string &actionName)
 NB: the definition of "tool" is different at the user level. More...
 
virtual void PopTool (const std::string &actionName)
 
bool ToolStackIsEmpty ()
 
std::string CurrentToolName () const
 
bool IsCurrentTool (const TOOL_ACTION &aAction) const
 
virtual void DisplayToolMsg (const wxString &msg)
 
bool GetDoImmediateActions () const
 Indicates that hotkeys should perform an immediate action even if another tool is currently active. More...
 
bool GetDragSelects () const
 Indicates that a drag should draw a selection rectangle, even when started over an item. More...
 
bool GetMoveWarpsCursor () const
 Indicates that a move operation should warp the mouse pointer to the origin of the move object. More...
 
bool ProcessEvent (wxEvent &aEvent) override
 Override the default process event handler to implement the auto save feature. More...
 
virtual void OnCharHook (wxKeyEvent &event)
 Capture the key event before it is sent to the GUI. More...
 
void OnMenuOpen (wxMenuEvent &event)
 Workaround some issues in wxWidgets where the menu events aren't captured by the menus themselves. More...
 
void SetAutoSaveInterval (int aInterval)
 
int GetAutoSaveInterval () const
 
bool IsType (FRAME_T aType) const
 
virtual const SEARCH_STACKsys_search ()
 Return a SEARCH_STACK pertaining to entire program. More...
 
virtual wxString help_name ()
 
void OnKicadAbout (wxCommandEvent &event)
 
void OnPreferences (wxCommandEvent &event)
 
void PrintMsg (const wxString &text)
 
virtual wxConfigBase * config ()
 Returns the wxConfigBase used in SaveSettings(), and is overloaded in KICAD_MANAGER_FRAME. More...
 
virtual void InstallPreferences (PAGED_DIALOG *, PANEL_HOTKEYS_EDITOR *)
 Function InstallPreferences Allow a frame to load its preference panels (if any) into the preferences dialog. More...
 
virtual void LoadSettings (wxConfigBase *aCfg)
 Load common frame parameters from a configuration file. More...
 
virtual void SaveSettings (wxConfigBase *aCfg)
 Saves common frame parameters to a configuration data file. More...
 
wxString ConfigBaseName ()
 
virtual void SaveProjectSettings (bool aAskForSave)
 Save changes to the project settings to the project (.pro) file. More...
 
void ImportHotkeyConfigFromFile (std::map< std::string, TOOL_ACTION * > aActionMap, const wxString &aDefaultShortname)
 Prompt the user for a hotkey file to read, and read it. More...
 
wxString GetFileFromHistory (int cmdId, const wxString &type, FILE_HISTORY *aFileHistory=NULL)
 Fetches the file name from the file history list. More...
 
void UpdateFileHistory (const wxString &FullFileName, FILE_HISTORY *aFileHistory=NULL)
 Update the list of recently opened files. More...
 
void SetMruPath (const wxString &aPath)
 
wxString GetMruPath () const
 
virtual void ReCreateMenuBar ()
 Recreates the menu bar. More...
 
void AddStandardHelpMenu (wxMenuBar *aMenuBar)
 Adds the standard KiCad help menu to the menubar. More...
 
bool IsWritable (const wxFileName &aFileName)
 Checks if aFileName can be written. More...
 
void CheckForAutoSaveFile (const wxFileName &aFileName)
 Check if an auto save file exists for aFileName and takes the appropriate action depending on the user input. More...
 
virtual void UpdateStatusBar ()
 Update the status bar information. More...
 
virtual void SyncToolbars ()
 Update the toolbars (mostly settings/check buttons/checkboxes) with the current controller state. More...
 
virtual void ShowChangedLanguage ()
 Redraw the menus and what not in current language. More...
 
virtual void CommonSettingsChanged (bool aEnvVarsChanged)
 Notification event that some of the common (suite-wide) settings have changed. More...
 
virtual void RefreshCanvas ()
 Notification to refresh the drawing canvas (if any). More...
 
const wxString & GetAboutTitle () const
 
void SetShutdownBlockReason (const wxString &reason)
 Sets the block reason why the window/application is preventing OS shutdown. More...
 
void RemoveShutdownBlockReason ()
 Removes any shutdown block reason set. More...
 
bool SupportsShutdownBlockReason ()
 Whether or not the window supports setting a shutdown block reason. More...
 
virtual bool IsContentModified ()
 Get if the contents of the frame have been modified since the last save. More...
 
HOLDER_TYPE GetType ()
 
KIWAYKiway () const
 Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in. More...
 
PROJECTPrj () const
 Function Prj returns a reference to the PROJECT "associated with" this KIWAY. More...
 
void SetKiway (wxWindow *aDest, KIWAY *aKiway)
 Function SetKiway. More...
 

Protected Member Functions

virtual void menuNewPlot (wxCommandEvent &event)
 
virtual void menuOpenWorkbook (wxCommandEvent &event)
 
virtual void menuSaveWorkbook (wxCommandEvent &event)
 
virtual void menuSaveImage (wxCommandEvent &event)
 
virtual void menuSaveCsv (wxCommandEvent &event)
 
virtual void menuExit (wxCommandEvent &event)
 
virtual void menuZoomIn (wxCommandEvent &event)
 
virtual void menuZoomOut (wxCommandEvent &event)
 
virtual void menuZoomFit (wxCommandEvent &event)
 
virtual void menuShowGrid (wxCommandEvent &event)
 
virtual void menuShowGridUpdate (wxUpdateUIEvent &event)
 
virtual void menuShowLegend (wxCommandEvent &event)
 
virtual void menuShowLegendUpdate (wxUpdateUIEvent &event)
 
virtual void menuShowDotted (wxCommandEvent &event)
 
virtual void menuShowDottedUpdate (wxUpdateUIEvent &event)
 
virtual void onPlotChanged (wxAuiNotebookEvent &event)
 
virtual void onPlotClose (wxAuiNotebookEvent &event)
 
virtual void onSignalDblClick (wxMouseEvent &event)
 
virtual void onSignalRClick (wxListEvent &event)
 
void kiway_express (KIWAY_EXPRESS &aEvent)
 event handler, routes to derivative specific virtual KiwayMailIn() More...
 
void language_change (wxCommandEvent &event)
 Function language_change is an event handler called on a language menu selection. More...
 
void onAutoSaveTimer (wxTimerEvent &aEvent)
 Handle the auto save timer event. More...
 
virtual bool isAutoSaveRequired () const
 Return the auto save status of the application. More...
 
virtual bool doAutoSave ()
 This should be overridden by the derived class to handle the auto save feature. More...
 
virtual void unitsChangeRefresh ()
 Called when when the units setting has changed to allow for any derived classes to handle refreshing and controls that have units based measurements in them. More...
 

Static Protected Member Functions

static wxString GetBackupSuffix ()
 
static wxString GetAutoSaveFilePrefix ()
 

Protected Attributes

wxMenuBar * m_mainMenu
 
wxMenu * m_fileMenu
 
wxMenu * m_simulationMenu
 
wxMenuItem * m_runSimulation
 
wxMenuItem * m_addSignals
 
wxMenuItem * m_probeSignals
 
wxMenuItem * m_tuneValue
 
wxMenuItem * m_showNetlist
 
wxMenuItem * m_settings
 
wxMenu * m_viewMenu
 
wxBoxSizer * m_sizerMain
 
wxToolBar * m_toolBar
 
wxSplitterWindow * m_splitterLeftRight
 
wxPanel * m_panelLeft
 
wxBoxSizer * m_sizer11
 
wxSplitterWindow * m_splitterPlotAndConsole
 
wxPanel * m_plotPanel
 
wxBoxSizer * m_sizerPlot
 
wxAuiNotebook * m_plotNotebook
 
wxPanel * m_welcomePanel
 
wxBoxSizer * m_sizer8
 
wxStaticText * m_staticTextInfo
 
wxPanel * m_panelConsole
 
wxBoxSizer * m_sizerConsole
 
wxTextCtrl * m_simConsole
 
wxPanel * m_sidePanel
 
wxBoxSizer * m_sideSizer
 
wxSplitterWindow * m_splitterSignals
 
wxPanel * m_panelSignals
 
wxStaticText * m_staticText2
 
wxListView * m_signals
 
wxPanel * m_panelCursorsAndTune
 
wxSplitterWindow * m_splitterTuneValues
 
wxPanel * m_panelCursors
 
wxStaticText * m_staticText3
 
wxListCtrl * m_cursors
 
wxPanel * m_tunePanel
 
wxStaticText * m_staticText4
 
wxBoxSizer * m_tuneSizer
 
bool m_modal
 
WX_EVENT_LOOPm_modal_loop
 
wxWindow * m_modal_resultant_parent
 
wxString m_modal_string
 
bool m_modal_ret_val
 
FRAME_T m_Ident
 
wxPoint m_FramePos
 
wxSize m_FrameSize
 
wxString m_AboutTitle
 
wxAuiManager m_auimgr
 
wxString m_configName
 
TOOL_MANAGERm_toolManager
 
ACTIONSm_actions
 
std::vector< std::string > m_toolStack
 
bool m_immediateActions
 
bool m_dragSelects
 
bool m_moveWarpsCursor
 
bool m_hasAutoSave
 
bool m_autoSaveState
 
int m_autoSaveInterval
 
wxTimer * m_autoSaveTimer
 
wxString m_perspective
 
wxString m_mruPath
 
EDA_UNITS m_userUnits
 

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...
 

Detailed Description

Class SIM_PLOT_FRAME_BASE.

Definition at line 50 of file sim_plot_frame_base.h.

Member Enumeration Documentation

◆ HOLDER_TYPE

enum KIWAY_HOLDER::HOLDER_TYPE
inherited
Enumerator
DIALOG 
FRAME 
PANEL 
SCREEN 

Definition at line 42 of file kiway_holder.h.

Constructor & Destructor Documentation

◆ SIM_PLOT_FRAME_BASE()

SIM_PLOT_FRAME_BASE::SIM_PLOT_FRAME_BASE ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxString &  title = _("Spice Simulator"),
const wxPoint pos = wxDefaultPosition,
const wxSize &  size = wxSize( -1,-1 ),
long  style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL,
const wxString &  name = wxT("SIM_PLOT_FRAME") 
)

Definition at line 12 of file sim_plot_frame_base.cpp.

12  : KIWAY_PLAYER( parent, id, title, pos, size, style, name )
13 {
14  this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
15 
16  m_mainMenu = new wxMenuBar( 0 );
17  m_fileMenu = new wxMenu();
18  wxMenuItem* m_newPlot;
19  m_newPlot = new wxMenuItem( m_fileMenu, wxID_NEW, wxString( _("New Plot") ) , wxEmptyString, wxITEM_NORMAL );
20  m_fileMenu->Append( m_newPlot );
21 
22  m_fileMenu->AppendSeparator();
23 
24  wxMenuItem* m_openWorkbook;
25  m_openWorkbook = new wxMenuItem( m_fileMenu, wxID_OPEN, wxString( _("Open Workbook") ) , wxEmptyString, wxITEM_NORMAL );
26  m_fileMenu->Append( m_openWorkbook );
27 
28  wxMenuItem* m_saveWorkbook;
29  m_saveWorkbook = new wxMenuItem( m_fileMenu, wxID_SAVE, wxString( _("Save Workbook") ) , wxEmptyString, wxITEM_NORMAL );
30  m_fileMenu->Append( m_saveWorkbook );
31 
32  m_fileMenu->AppendSeparator();
33 
34  wxMenuItem* m_saveImage;
35  m_saveImage = new wxMenuItem( m_fileMenu, ID_SAVE_AS_IMAGE, wxString( _("Save as Image") ) , wxEmptyString, wxITEM_NORMAL );
36  m_fileMenu->Append( m_saveImage );
37 
38  wxMenuItem* m_saveCsv;
39  m_saveCsv = new wxMenuItem( m_fileMenu, ID_SAVE_AS_CSV, wxString( _("Save as .csv File") ) , wxEmptyString, wxITEM_NORMAL );
40  m_fileMenu->Append( m_saveCsv );
41 
42  m_fileMenu->AppendSeparator();
43 
44  wxMenuItem* m_exitSim;
45  m_exitSim = new wxMenuItem( m_fileMenu, wxID_CLOSE, wxString( _("Close Simulation") ) + wxT('\t') + wxT("CTRL+W"), wxEmptyString, wxITEM_NORMAL );
46  m_fileMenu->Append( m_exitSim );
47 
48  m_mainMenu->Append( m_fileMenu, _("File") );
49 
50  m_simulationMenu = new wxMenu();
51  m_runSimulation = new wxMenuItem( m_simulationMenu, ID_MENU_RUN_SIM, wxString( _("Run Simulation") ) + wxT('\t') + wxT("R"), wxEmptyString, wxITEM_NORMAL );
53 
54  m_simulationMenu->AppendSeparator();
55 
56  m_addSignals = new wxMenuItem( m_simulationMenu, ID_MENU_ADD_SIGNAL, wxString( _("Add Signals...") ) + wxT('\t') + wxT("A"), wxEmptyString, wxITEM_NORMAL );
57  m_simulationMenu->Append( m_addSignals );
58 
59  m_probeSignals = new wxMenuItem( m_simulationMenu, ID_MENU_PROBE_SIGNALS, wxString( _("Probe from schematics") ) + wxT('\t') + wxT("P"), wxEmptyString, wxITEM_NORMAL );
61 
62  m_tuneValue = new wxMenuItem( m_simulationMenu, ID_MENU_TUNE_SIGNALS, wxString( _("Tune Component Value") ) + wxT('\t') + wxT("T"), wxEmptyString, wxITEM_NORMAL );
63  m_simulationMenu->Append( m_tuneValue );
64 
65  m_simulationMenu->AppendSeparator();
66 
67  m_showNetlist = new wxMenuItem( m_simulationMenu, ID_MENU_SHOW_NETLIST, wxString( _("Show SPICE Netlist...") ) , _("Shows current simulation's netlist. Useful for debugging SPICE errors."), wxITEM_NORMAL );
69 
70  m_simulationMenu->AppendSeparator();
71 
72  m_settings = new wxMenuItem( m_simulationMenu, ID_MENU_SET_SIMUL, wxString( _("Settings...") ) , wxEmptyString, wxITEM_NORMAL );
73  m_simulationMenu->Append( m_settings );
74 
75  m_mainMenu->Append( m_simulationMenu, _("Simulation") );
76 
77  m_viewMenu = new wxMenu();
78  wxMenuItem* m_zoomIn;
79  m_zoomIn = new wxMenuItem( m_viewMenu, wxID_ZOOM_IN, wxString( _("Zoom In") ) , wxEmptyString, wxITEM_NORMAL );
80  m_viewMenu->Append( m_zoomIn );
81 
82  wxMenuItem* m_zoomOut;
83  m_zoomOut = new wxMenuItem( m_viewMenu, wxID_ZOOM_OUT, wxString( _("Zoom Out") ) , wxEmptyString, wxITEM_NORMAL );
84  m_viewMenu->Append( m_zoomOut );
85 
86  wxMenuItem* m_zoomFit;
87  m_zoomFit = new wxMenuItem( m_viewMenu, wxID_ZOOM_FIT, wxString( _("Fit on Screen") ) , wxEmptyString, wxITEM_NORMAL );
88  m_viewMenu->Append( m_zoomFit );
89 
90  m_viewMenu->AppendSeparator();
91 
92  wxMenuItem* m_showGrid;
93  m_showGrid = new wxMenuItem( m_viewMenu, ID_MENU_SHOW_GRID, wxString( _("Show &Grid") ) , wxEmptyString, wxITEM_CHECK );
94  m_viewMenu->Append( m_showGrid );
95 
96  wxMenuItem* m_showLegend;
97  m_showLegend = new wxMenuItem( m_viewMenu, ID_MENU_SHOW_LEGEND, wxString( _("Show &Legend") ) , wxEmptyString, wxITEM_CHECK );
98  m_viewMenu->Append( m_showLegend );
99 
100  m_viewMenu->AppendSeparator();
101 
102  wxMenuItem* m_showDotted;
103  m_showDotted = new wxMenuItem( m_viewMenu, ID_MENU_DOTTED, wxString( _("Dotted Current/Phase") ) , wxEmptyString, wxITEM_CHECK );
104  m_viewMenu->Append( m_showDotted );
105 
106  m_mainMenu->Append( m_viewMenu, _("View") );
107 
108  this->SetMenuBar( m_mainMenu );
109 
110  m_sizerMain = new wxBoxSizer( wxVERTICAL );
111 
112  m_toolBar = new wxToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_FLAT|wxTB_HORIZONTAL|wxTB_TEXT );
113  m_toolBar->Realize();
114 
115  m_sizerMain->Add( m_toolBar, 0, wxEXPAND, 5 );
116 
117  m_splitterLeftRight = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH|wxSP_LIVE_UPDATE|wxBORDER_NONE );
118  m_splitterLeftRight->SetSashGravity( 0.7 );
119  m_splitterLeftRight->Connect( wxEVT_IDLE, wxIdleEventHandler( SIM_PLOT_FRAME_BASE::m_splitterLeftRightOnIdle ), NULL, this );
120  m_splitterLeftRight->SetMinimumPaneSize( 50 );
121 
122  m_panelLeft = new wxPanel( m_splitterLeftRight, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
123  m_panelLeft->SetMinSize( wxSize( 300,-1 ) );
124 
125  m_sizer11 = new wxBoxSizer( wxVERTICAL );
126 
127  m_splitterPlotAndConsole = new wxSplitterWindow( m_panelLeft, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH|wxSP_LIVE_UPDATE );
128  m_splitterPlotAndConsole->SetSashGravity( 0.8 );
129  m_splitterPlotAndConsole->Connect( wxEVT_IDLE, wxIdleEventHandler( SIM_PLOT_FRAME_BASE::m_splitterPlotAndConsoleOnIdle ), NULL, this );
130  m_splitterPlotAndConsole->SetMinimumPaneSize( 50 );
131 
132  m_plotPanel = new wxPanel( m_splitterPlotAndConsole, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
133  m_plotPanel->SetMinSize( wxSize( -1,200 ) );
134 
135  m_sizerPlot = new wxBoxSizer( wxHORIZONTAL );
136 
137  m_plotNotebook = new wxAuiNotebook( m_plotPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_CLOSE_ON_ALL_TABS|wxAUI_NB_MIDDLE_CLICK_CLOSE|wxAUI_NB_TAB_MOVE|wxAUI_NB_TAB_SPLIT|wxAUI_NB_TOP );
138  m_plotNotebook->SetMinSize( wxSize( 200,-1 ) );
139 
140  m_welcomePanel = new wxPanel( m_plotNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
141  m_sizer8 = new wxBoxSizer( wxVERTICAL );
142 
143 
144  m_sizer8->Add( 0, 0, 1, wxEXPAND, 5 );
145 
146  wxBoxSizer* bSizer81;
147  bSizer81 = new wxBoxSizer( wxHORIZONTAL );
148 
149 
150  bSizer81->Add( 0, 0, 1, wxEXPAND, 5 );
151 
152  m_staticTextInfo = new wxStaticText( m_welcomePanel, wxID_ANY, _("Start the simulation by clicking the Run Simulation button"), wxDefaultPosition, wxDefaultSize, 0 );
153  m_staticTextInfo->Wrap( -1 );
154  m_staticTextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
155  m_staticTextInfo->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
156 
157  bSizer81->Add( m_staticTextInfo, 0, wxALL|wxEXPAND, 5 );
158 
159 
160  bSizer81->Add( 0, 0, 1, wxEXPAND, 5 );
161 
162 
163  m_sizer8->Add( bSizer81, 0, wxEXPAND, 5 );
164 
165 
166  m_sizer8->Add( 0, 0, 1, wxEXPAND, 5 );
167 
168 
169  m_welcomePanel->SetSizer( m_sizer8 );
170  m_welcomePanel->Layout();
171  m_sizer8->Fit( m_welcomePanel );
172  m_plotNotebook->AddPage( m_welcomePanel, _("a page"), false, wxNullBitmap );
173 
174  m_sizerPlot->Add( m_plotNotebook, 1, wxEXPAND, 5 );
175 
176 
177  m_plotPanel->SetSizer( m_sizerPlot );
178  m_plotPanel->Layout();
179  m_sizerPlot->Fit( m_plotPanel );
180  m_panelConsole = new wxPanel( m_splitterPlotAndConsole, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
181  m_panelConsole->SetMinSize( wxSize( -1,100 ) );
182 
183  m_sizerConsole = new wxBoxSizer( wxVERTICAL );
184 
185  m_simConsole = new wxTextCtrl( m_panelConsole, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY );
186  m_simConsole->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
187 
188  m_sizerConsole->Add( m_simConsole, 1, wxEXPAND, 5 );
189 
190 
191  m_panelConsole->SetSizer( m_sizerConsole );
192  m_panelConsole->Layout();
194  m_splitterPlotAndConsole->SplitHorizontally( m_plotPanel, m_panelConsole, 500 );
195  m_sizer11->Add( m_splitterPlotAndConsole, 1, wxEXPAND, 5 );
196 
197 
198  m_panelLeft->SetSizer( m_sizer11 );
199  m_panelLeft->Layout();
200  m_sizer11->Fit( m_panelLeft );
201  m_sidePanel = new wxPanel( m_splitterLeftRight, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
202  m_sidePanel->SetMinSize( wxSize( 200,-1 ) );
203 
204  m_sideSizer = new wxBoxSizer( wxVERTICAL );
205 
206  m_splitterSignals = new wxSplitterWindow( m_sidePanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH|wxSP_LIVE_UPDATE );
207  m_splitterSignals->SetSashGravity( 0.33 );
208  m_splitterSignals->Connect( wxEVT_IDLE, wxIdleEventHandler( SIM_PLOT_FRAME_BASE::m_splitterSignalsOnIdle ), NULL, this );
209  m_splitterSignals->SetMinimumPaneSize( 20 );
210 
211  m_panelSignals = new wxPanel( m_splitterSignals, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
212  wxBoxSizer* bSizer10;
213  bSizer10 = new wxBoxSizer( wxVERTICAL );
214 
215  m_staticText2 = new wxStaticText( m_panelSignals, wxID_ANY, _("Signals"), wxDefaultPosition, wxDefaultSize, 0 );
216  m_staticText2->Wrap( -1 );
217  bSizer10->Add( m_staticText2, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
218 
219  m_signals = new wxListView( m_panelSignals, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL );
220  bSizer10->Add( m_signals, 1, wxEXPAND, 5 );
221 
222 
223  m_panelSignals->SetSizer( bSizer10 );
224  m_panelSignals->Layout();
225  bSizer10->Fit( m_panelSignals );
226  m_panelCursorsAndTune = new wxPanel( m_splitterSignals, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
227  m_panelCursorsAndTune->SetMinSize( wxSize( -1,300 ) );
228 
229  wxBoxSizer* bSizer9;
230  bSizer9 = new wxBoxSizer( wxVERTICAL );
231 
232  m_splitterTuneValues = new wxSplitterWindow( m_panelCursorsAndTune, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH|wxSP_LIVE_UPDATE|wxBORDER_NONE );
233  m_splitterTuneValues->SetSashGravity( 0.5 );
234  m_splitterTuneValues->Connect( wxEVT_IDLE, wxIdleEventHandler( SIM_PLOT_FRAME_BASE::m_splitterTuneValuesOnIdle ), NULL, this );
235  m_splitterTuneValues->SetMinimumPaneSize( 20 );
236 
237  m_panelCursors = new wxPanel( m_splitterTuneValues, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
238  wxBoxSizer* bSizer12;
239  bSizer12 = new wxBoxSizer( wxVERTICAL );
240 
241  m_staticText3 = new wxStaticText( m_panelCursors, wxID_ANY, _("Cursors"), wxDefaultPosition, wxDefaultSize, 0 );
242  m_staticText3->Wrap( -1 );
243  bSizer12->Add( m_staticText3, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
244 
245  m_cursors = new wxListCtrl( m_panelCursors, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL );
246  bSizer12->Add( m_cursors, 1, wxEXPAND, 5 );
247 
248 
249  m_panelCursors->SetSizer( bSizer12 );
250  m_panelCursors->Layout();
251  bSizer12->Fit( m_panelCursors );
252  m_tunePanel = new wxPanel( m_splitterTuneValues, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
253  wxBoxSizer* bSizer13;
254  bSizer13 = new wxBoxSizer( wxVERTICAL );
255 
256  m_staticText4 = new wxStaticText( m_tunePanel, wxID_ANY, _("Tune"), wxDefaultPosition, wxDefaultSize, 0 );
257  m_staticText4->Wrap( -1 );
258  bSizer13->Add( m_staticText4, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
259 
260  m_tuneSizer = new wxBoxSizer( wxHORIZONTAL );
261 
262 
263  bSizer13->Add( m_tuneSizer, 1, wxEXPAND, 5 );
264 
265 
266  m_tunePanel->SetSizer( bSizer13 );
267  m_tunePanel->Layout();
268  bSizer13->Fit( m_tunePanel );
269  m_splitterTuneValues->SplitHorizontally( m_panelCursors, m_tunePanel, 0 );
270  bSizer9->Add( m_splitterTuneValues, 1, wxEXPAND, 5 );
271 
272 
273  m_panelCursorsAndTune->SetSizer( bSizer9 );
274  m_panelCursorsAndTune->Layout();
275  bSizer9->Fit( m_panelCursorsAndTune );
276  m_splitterSignals->SplitHorizontally( m_panelSignals, m_panelCursorsAndTune, 0 );
277  m_sideSizer->Add( m_splitterSignals, 1, wxEXPAND, 5 );
278 
279 
280  m_sidePanel->SetSizer( m_sideSizer );
281  m_sidePanel->Layout();
282  m_sideSizer->Fit( m_sidePanel );
283  m_splitterLeftRight->SplitVertically( m_panelLeft, m_sidePanel, 700 );
284  m_sizerMain->Add( m_splitterLeftRight, 1, wxEXPAND, 5 );
285 
286 
287  this->SetSizer( m_sizerMain );
288  this->Layout();
289  m_sizerMain->Fit( this );
290 
291  this->Centre( wxBOTH );
292 
293  // Connect Events
294  m_fileMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuNewPlot ), this, m_newPlot->GetId());
295  m_fileMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuOpenWorkbook ), this, m_openWorkbook->GetId());
296  m_fileMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveWorkbook ), this, m_saveWorkbook->GetId());
297  m_fileMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveImage ), this, m_saveImage->GetId());
298  m_fileMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveCsv ), this, m_saveCsv->GetId());
299  m_fileMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuExit ), this, m_exitSim->GetId());
300  m_viewMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomIn ), this, m_zoomIn->GetId());
301  m_viewMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomOut ), this, m_zoomOut->GetId());
302  m_viewMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomFit ), this, m_zoomFit->GetId());
303  m_viewMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuShowGrid ), this, m_showGrid->GetId());
304  this->Connect( m_showGrid->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SIM_PLOT_FRAME_BASE::menuShowGridUpdate ) );
305  m_viewMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuShowLegend ), this, m_showLegend->GetId());
306  this->Connect( m_showLegend->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SIM_PLOT_FRAME_BASE::menuShowLegendUpdate ) );
307  m_viewMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuShowDotted ), this, m_showDotted->GetId());
308  this->Connect( m_showDotted->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SIM_PLOT_FRAME_BASE::menuShowDottedUpdate ) );
309  m_plotNotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( SIM_PLOT_FRAME_BASE::onPlotChanged ), NULL, this );
310  m_plotNotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler( SIM_PLOT_FRAME_BASE::onPlotClose ), NULL, this );
311  m_signals->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SIM_PLOT_FRAME_BASE::onSignalDblClick ), NULL, this );
312  m_signals->Connect( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxListEventHandler( SIM_PLOT_FRAME_BASE::onSignalRClick ), NULL, this );
313 }
#define ID_MENU_PROBE_SIGNALS
#define ID_SAVE_AS_IMAGE
wxSplitterWindow * m_splitterSignals
virtual void menuSaveWorkbook(wxCommandEvent &event)
KIWAY_PLAYER(KIWAY *aKiway, wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aWdoName=wxFrameNameStr)
virtual void menuShowLegendUpdate(wxUpdateUIEvent &event)
void m_splitterLeftRightOnIdle(wxIdleEvent &)
void m_splitterSignalsOnIdle(wxIdleEvent &)
virtual void onPlotChanged(wxAuiNotebookEvent &event)
wxStaticText * m_staticText2
virtual void menuShowGrid(wxCommandEvent &event)
virtual void menuZoomOut(wxCommandEvent &event)
wxStaticText * m_staticText3
#define ID_SAVE_AS_CSV
virtual void menuShowDotted(wxCommandEvent &event)
wxSplitterWindow * m_splitterTuneValues
wxAuiNotebook * m_plotNotebook
wxStaticText * m_staticText4
virtual void menuSaveCsv(wxCommandEvent &event)
virtual void onSignalRClick(wxListEvent &event)
wxStaticText * m_staticTextInfo
virtual void menuShowLegend(wxCommandEvent &event)
#define NULL
#define ID_MENU_SHOW_NETLIST
virtual void onPlotClose(wxAuiNotebookEvent &event)
wxSplitterWindow * m_splitterLeftRight
wxMenuItem * m_runSimulation
#define ID_MENU_TUNE_SIGNALS
virtual void menuOpenWorkbook(wxCommandEvent &event)
virtual void menuZoomIn(wxCommandEvent &event)
void m_splitterPlotAndConsoleOnIdle(wxIdleEvent &)
#define ID_MENU_SHOW_LEGEND
virtual void onSignalDblClick(wxMouseEvent &event)
#define ID_MENU_SET_SIMUL
virtual void menuShowGridUpdate(wxUpdateUIEvent &event)
virtual void menuNewPlot(wxCommandEvent &event)
#define ID_MENU_ADD_SIGNAL
virtual void menuSaveImage(wxCommandEvent &event)
const char * name
Definition: DXF_plotter.cpp:60
#define ID_MENU_SHOW_GRID
#define _(s)
Definition: 3d_actions.cpp:31
#define ID_MENU_DOTTED
void m_splitterTuneValuesOnIdle(wxIdleEvent &)
virtual void menuZoomFit(wxCommandEvent &event)
virtual void menuExit(wxCommandEvent &event)
wxSplitterWindow * m_splitterPlotAndConsole
virtual void menuShowDottedUpdate(wxUpdateUIEvent &event)
#define ID_MENU_RUN_SIM

References _, ID_MENU_ADD_SIGNAL, ID_MENU_DOTTED, ID_MENU_PROBE_SIGNALS, ID_MENU_RUN_SIM, ID_MENU_SET_SIMUL, ID_MENU_SHOW_GRID, ID_MENU_SHOW_LEGEND, ID_MENU_SHOW_NETLIST, ID_MENU_TUNE_SIGNALS, ID_SAVE_AS_CSV, ID_SAVE_AS_IMAGE, m_addSignals, m_cursors, m_fileMenu, m_mainMenu, m_panelConsole, m_panelCursors, m_panelCursorsAndTune, m_panelLeft, m_panelSignals, m_plotNotebook, m_plotPanel, m_probeSignals, m_runSimulation, m_settings, m_showNetlist, m_sidePanel, m_sideSizer, m_signals, m_simConsole, m_simulationMenu, m_sizer11, m_sizer8, m_sizerConsole, m_sizerMain, m_sizerPlot, m_splitterLeftRight, m_splitterLeftRightOnIdle(), m_splitterPlotAndConsole, m_splitterPlotAndConsoleOnIdle(), m_splitterSignals, m_splitterSignalsOnIdle(), m_splitterTuneValues, m_splitterTuneValuesOnIdle(), m_staticText2, m_staticText3, m_staticText4, m_staticTextInfo, m_toolBar, m_tunePanel, m_tuneSizer, m_tuneValue, m_viewMenu, m_welcomePanel, menuExit(), menuNewPlot(), menuOpenWorkbook(), menuSaveCsv(), menuSaveImage(), menuSaveWorkbook(), menuShowDotted(), menuShowDottedUpdate(), menuShowGrid(), menuShowGridUpdate(), menuShowLegend(), menuShowLegendUpdate(), menuZoomFit(), menuZoomIn(), menuZoomOut(), NULL, onPlotChanged(), onPlotClose(), onSignalDblClick(), and onSignalRClick().

◆ ~SIM_PLOT_FRAME_BASE()

SIM_PLOT_FRAME_BASE::~SIM_PLOT_FRAME_BASE ( )

Definition at line 315 of file sim_plot_frame_base.cpp.

316 {
317  // Disconnect Events
318  this->Disconnect( ID_MENU_SHOW_GRID, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SIM_PLOT_FRAME_BASE::menuShowGridUpdate ) );
319  this->Disconnect( ID_MENU_SHOW_LEGEND, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SIM_PLOT_FRAME_BASE::menuShowLegendUpdate ) );
320  this->Disconnect( ID_MENU_DOTTED, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SIM_PLOT_FRAME_BASE::menuShowDottedUpdate ) );
321  m_plotNotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( SIM_PLOT_FRAME_BASE::onPlotChanged ), NULL, this );
322  m_plotNotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler( SIM_PLOT_FRAME_BASE::onPlotClose ), NULL, this );
323  m_signals->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SIM_PLOT_FRAME_BASE::onSignalDblClick ), NULL, this );
324  m_signals->Disconnect( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxListEventHandler( SIM_PLOT_FRAME_BASE::onSignalRClick ), NULL, this );
325 
326 }
virtual void menuShowLegendUpdate(wxUpdateUIEvent &event)
virtual void onPlotChanged(wxAuiNotebookEvent &event)
wxAuiNotebook * m_plotNotebook
virtual void onSignalRClick(wxListEvent &event)
#define NULL
virtual void onPlotClose(wxAuiNotebookEvent &event)
#define ID_MENU_SHOW_LEGEND
virtual void onSignalDblClick(wxMouseEvent &event)
virtual void menuShowGridUpdate(wxUpdateUIEvent &event)
#define ID_MENU_SHOW_GRID
#define ID_MENU_DOTTED
virtual void menuShowDottedUpdate(wxUpdateUIEvent &event)

References ID_MENU_DOTTED, ID_MENU_SHOW_GRID, ID_MENU_SHOW_LEGEND, m_plotNotebook, m_signals, menuShowDottedUpdate(), menuShowGridUpdate(), menuShowLegendUpdate(), NULL, onPlotChanged(), onPlotClose(), onSignalDblClick(), and onSignalRClick().

Member Function Documentation

◆ AddStandardHelpMenu()

void EDA_BASE_FRAME::AddStandardHelpMenu ( wxMenuBar *  aMenuBar)
inherited

Adds the standard KiCad help menu to the menubar.

Definition at line 412 of file eda_base_frame.cpp.

413 {
414  COMMON_CONTROL* commonControl = m_toolManager->GetTool<COMMON_CONTROL>();
415  ACTION_MENU* helpMenu = new ACTION_MENU( false );
416 
417  helpMenu->SetTool( commonControl );
418 
419  helpMenu->Add( ACTIONS::help );
420  helpMenu->Add( ACTIONS::gettingStarted );
421  helpMenu->Add( ACTIONS::listHotKeys );
422  helpMenu->Add( ACTIONS::getInvolved );
423 
424  helpMenu->AppendSeparator();
425  helpMenu->Add( _( "&About KiCad" ), "", wxID_ABOUT, about_xpm );
426 
427  aMenuBar->Append( helpMenu, _( "&Help" ) );
428 }
static TOOL_ACTION listHotKeys
Definition: actions.h:167
ACTION_MENU.
Definition: action_menu.h:43
const BITMAP_OPAQUE about_xpm[1]
Definition: about.cpp:84
COMMON_CONTROL.
#define _(s)
Definition: 3d_actions.cpp:31
static TOOL_ACTION help
Definition: actions.h:166
TOOL_MANAGER * m_toolManager
static TOOL_ACTION getInvolved
Definition: actions.h:168
static TOOL_ACTION gettingStarted
Definition: actions.h:165

References _, about_xpm, ACTIONS::getInvolved, ACTIONS::gettingStarted, TOOL_MANAGER::GetTool(), ACTIONS::help, ACTIONS::listHotKeys, and EDA_BASE_FRAME::m_toolManager.

Referenced by EDA_3D_VIEWER::CreateMenuBar(), KICAD_MANAGER_FRAME::ReCreateMenuBar(), LIB_VIEW_FRAME::ReCreateMenuBar(), FOOTPRINT_VIEWER_FRAME::ReCreateMenuBar(), FOOTPRINT_EDIT_FRAME::ReCreateMenuBar(), LIB_EDIT_FRAME::ReCreateMenuBar(), CVPCB_MAINFRAME::ReCreateMenuBar(), GERBVIEW_FRAME::ReCreateMenuBar(), SCH_EDIT_FRAME::ReCreateMenuBar(), and PCB_EDIT_FRAME::ReCreateMenuBar().

◆ ChangeUserUnits()

void EDA_BASE_FRAME::ChangeUserUnits ( EDA_UNITS  aUnits)
inlineinherited

Definition at line 221 of file eda_base_frame.h.

222  {
223  SetUserUnits( aUnits );
225  }
virtual void unitsChangeRefresh()
Called when when the units setting has changed to allow for any derived classes to handle refreshing ...
void SetUserUnits(EDA_UNITS aUnits)

References EDA_BASE_FRAME::SetUserUnits(), and EDA_BASE_FRAME::unitsChangeRefresh().

Referenced by COMMON_TOOLS::ImperialUnits(), COMMON_TOOLS::MetricUnits(), and COMMON_TOOLS::ToggleUnits().

◆ CheckForAutoSaveFile()

void EDA_BASE_FRAME::CheckForAutoSaveFile ( const wxFileName &  aFileName)
inherited

Check 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.

Definition at line 735 of file eda_base_frame.cpp.

736 {
737  wxCHECK_RET( aFileName.IsOk(), wxT( "Invalid file name!" ) );
738 
739  wxFileName autoSaveFileName = aFileName;
740 
741  // Check for auto save file.
742  autoSaveFileName.SetName( GetAutoSaveFilePrefix() + aFileName.GetName() );
743 
744  wxLogTrace( traceAutoSave,
745  wxT( "Checking for auto save file " ) + autoSaveFileName.GetFullPath() );
746 
747  if( !autoSaveFileName.FileExists() )
748  return;
749 
750  wxString msg = wxString::Format( _(
751  "Well this is potentially embarrassing!\n"
752  "It appears that the last time you were editing the file\n"
753  "\"%s\"\n"
754  "it was not saved properly. Do you wish to restore the last saved edits you made?" ),
755  GetChars( aFileName.GetFullName() )
756  );
757 
758  int response = wxMessageBox( msg, Pgm().App().GetAppName(), wxYES_NO | wxICON_QUESTION, this );
759 
760  // Make a backup of the current file, delete the file, and rename the auto save file to
761  // the file name.
762  if( response == wxYES )
763  {
764  // Get the backup file name.
765  wxFileName backupFileName = aFileName;
766  backupFileName.SetExt( aFileName.GetExt() + GetBackupSuffix() );
767 
768  // If an old backup file exists, delete it. If an old copy of the file exists, rename
769  // it to the backup file name
770  if( aFileName.FileExists() )
771  {
772  // Rename the old file to the backup file name.
773  if( !wxRenameFile( aFileName.GetFullPath(), backupFileName.GetFullPath(), true ) )
774  {
775  msg.Printf( _( "Could not create backup file \"%s\"" ),
776  GetChars( backupFileName.GetFullPath() ) );
777  wxMessageBox( msg );
778  }
779  }
780 
781  if( !wxRenameFile( autoSaveFileName.GetFullPath(), aFileName.GetFullPath() ) )
782  {
783  wxMessageBox( _( "The auto save file could not be renamed to the board file name." ),
784  Pgm().App().GetAppName(), wxOK | wxICON_EXCLAMATION, this );
785  }
786  }
787  else
788  {
789  wxLogTrace( traceAutoSave,
790  wxT( "Removing auto save file " ) + autoSaveFileName.GetFullPath() );
791 
792  // Remove the auto save file when using the previous file as is.
793  wxRemoveFile( autoSaveFileName.GetFullPath() );
794  }
795 }
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:98
const wxChar *const traceAutoSave
Flag to enable auto save feature debug tracing.
static wxString GetBackupSuffix()
static wxString GetAutoSaveFilePrefix()
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:101
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
#define _(s)
Definition: 3d_actions.cpp:31

References _, Format(), EDA_BASE_FRAME::GetAutoSaveFilePrefix(), EDA_BASE_FRAME::GetBackupSuffix(), GetChars(), Pgm(), and traceAutoSave.

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

◆ CommonSettingsChanged()

void EDA_BASE_FRAME::CommonSettingsChanged ( bool  aEnvVarsChanged)
virtualinherited

Notification event that some of the common (suite-wide) settings have changed.

Update menus, toolbars, local variables, etc.

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

Definition at line 441 of file eda_base_frame.cpp.

442 {
443  if( GetToolManager() )
445 
446  if( GetMenuBar() )
447  {
448  // For icons in menus, icon scaling & hotkeys
449  ReCreateMenuBar();
450  GetMenuBar()->Refresh();
451  }
452 
453  wxConfigBase* settings = Pgm().CommonSettings();
454 
455  settings->Read( WARP_MOUSE_ON_MOVE_KEY, &m_moveWarpsCursor );
456  settings->Read( PREFER_SELECT_TO_DRAG_KEY, &m_dragSelects );
457  settings->Read( IMMEDIATE_ACTIONS_KEY, &m_immediateActions );
458 }
#define IMMEDIATE_ACTIONS_KEY
Definition: pgm_base.h:58
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:98
#define PREFER_SELECT_TO_DRAG_KEY
Definition: pgm_base.h:59
void UpdateHotKeys(bool aFullUpdate)
Function UpdateHotKeys() Optionally reads the hotkey config files and then rebuilds the internal hotk...
ACTION_MANAGER * GetActionManager()
Definition: tool_manager.h:163
#define WARP_MOUSE_ON_MOVE_KEY
Definition: pgm_base.h:57
virtual void ReCreateMenuBar()
Recreates the menu bar.

References TOOL_MANAGER::GetActionManager(), EDA_BASE_FRAME::GetToolManager(), IMMEDIATE_ACTIONS_KEY, EDA_BASE_FRAME::m_dragSelects, EDA_BASE_FRAME::m_immediateActions, EDA_BASE_FRAME::m_moveWarpsCursor, Pgm(), PREFER_SELECT_TO_DRAG_KEY, EDA_BASE_FRAME::ReCreateMenuBar(), ACTION_MANAGER::UpdateHotKeys(), and WARP_MOUSE_ON_MOVE_KEY.

Referenced by EDA_DRAW_FRAME::CommonSettingsChanged(), EDA_3D_VIEWER::CommonSettingsChanged(), and KIWAY::CommonSettingsChanged().

◆ config()

wxConfigBase * EDA_BASE_FRAME::config ( )
virtualinherited

Returns the wxConfigBase used in SaveSettings(), and is overloaded in KICAD_MANAGER_FRAME.

Reimplemented in KICAD_MANAGER_FRAME.

Definition at line 584 of file eda_base_frame.cpp.

585 {
586  // KICAD_MANAGER_FRAME overrides this
587  wxConfigBase* ret = Kiface().KifaceSettings();
588  //wxASSERT( ret );
589  return ret;
590 }
wxConfigBase * KifaceSettings() const
Definition: kiface_i.h:103
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.

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

Referenced by CVPCB_MAINFRAME::CVPCB_MAINFRAME(), FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME(), GERBVIEW_FRAME::GERBVIEW_FRAME(), PCB_EDIT_FRAME::GetSettings(), LIB_VIEW_FRAME::LIB_VIEW_FRAME(), SIM_PLOT_FRAME::onClose(), FOOTPRINT_WIZARD_FRAME::OnCloseWindow(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), and EDA_BASE_FRAME::windowClosing().

◆ ConfigBaseName()

wxString EDA_BASE_FRAME::ConfigBaseName ( )
inlineinherited
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, except for frames shown in multiple modes in which case the m_configName must be set to the base name so that a single config can be used.

Definition at line 345 of file eda_base_frame.h.

346  {
347  wxString baseCfgName = m_configName.IsEmpty() ? GetName() : m_configName;
348  return baseCfgName;
349  }
wxString m_configName

References EDA_BASE_FRAME::m_configName.

Referenced by DISPLAY_FOOTPRINTS_FRAME::LoadSettings(), FOOTPRINT_VIEWER_FRAME::LoadSettings(), EDA_BASE_FRAME::LoadSettings(), EDA_DRAW_FRAME::LoadSettings(), DISPLAY_FOOTPRINTS_FRAME::SaveSettings(), FOOTPRINT_VIEWER_FRAME::SaveSettings(), EDA_BASE_FRAME::SaveSettings(), EDA_DRAW_FRAME::SaveSettings(), and ACTION_MANAGER::UpdateHotKeys().

◆ CurrentToolName()

std::string EDA_BASE_FRAME::CurrentToolName ( ) const
inherited

Definition at line 267 of file eda_base_frame.cpp.

268 {
269  if( m_toolStack.empty() )
270  return ACTIONS::selectionTool.GetName();
271  else
272  return m_toolStack.back();
273 }
std::vector< std::string > m_toolStack
static TOOL_ACTION selectionTool
Definition: actions.h:143

References EDA_BASE_FRAME::m_toolStack, and ACTIONS::selectionTool.

◆ Destroy()

◆ DismissModal()

void KIWAY_PLAYER::DismissModal ( bool  aRetVal,
const wxString &  aResult = wxEmptyString 
)
inherited

Definition at line 160 of file kiway_player.cpp.

161 {
162  m_modal_ret_val = aRetVal;
163  m_modal_string = aResult;
164 
165  if( m_modal_loop )
166  {
167  m_modal_loop->Exit();
168  m_modal_loop = 0; // this marks it as dismissed.
169  }
170 
171  Show( false );
172 }
bool m_modal_ret_val
Definition: kiway_player.h:192
wxString m_modal_string
Definition: kiway_player.h:191
WX_EVENT_LOOP * m_modal_loop
Definition: kiway_player.h:189

References KIWAY_PLAYER::m_modal_loop, KIWAY_PLAYER::m_modal_ret_val, and KIWAY_PLAYER::m_modal_string.

Referenced by FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), FOOTPRINT_WIZARD_FRAME::ExportSelectedFootprint(), LIB_VIEW_FRAME::FinishModal(), LIB_VIEW_FRAME::OnCloseWindow(), FOOTPRINT_VIEWER_FRAME::OnCloseWindow(), and FOOTPRINT_WIZARD_FRAME::OnCloseWindow().

◆ DisplayToolMsg()

virtual void EDA_BASE_FRAME::DisplayToolMsg ( const wxString &  msg)
inlinevirtualinherited

Reimplemented in EDA_DRAW_FRAME.

Definition at line 245 of file eda_base_frame.h.

245 {};

Referenced by EDA_BASE_FRAME::PopTool(), and EDA_BASE_FRAME::PushTool().

◆ doAutoSave()

bool EDA_BASE_FRAME::doAutoSave ( )
protectedvirtualinherited

This 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 350 of file eda_base_frame.cpp.

351 {
352  wxCHECK_MSG( false, true, wxT( "Auto save timer function not overridden. Bad programmer!" ) );
353 }

Referenced by EDA_BASE_FRAME::onAutoSaveTimer().

◆ GetAboutTitle()

const wxString& EDA_BASE_FRAME::GetAboutTitle ( ) const
inlineinherited

Definition at line 475 of file eda_base_frame.h.

475 { return m_AboutTitle; }
wxString m_AboutTitle

References EDA_BASE_FRAME::m_AboutTitle.

Referenced by DIALOG_ABOUT::DIALOG_ABOUT().

◆ GetAutoSaveFilePrefix()

static wxString EDA_BASE_FRAME::GetAutoSaveFilePrefix ( )
inlinestaticprotectedinherited
Returns
the string to prepend to a file name for automatic save.

Definition at line 167 of file eda_base_frame.h.

168  {
169  return wxT( "_autosave-" );
170  }

Referenced by EDA_BASE_FRAME::CheckForAutoSaveFile(), SCH_EDIT_FRAME::doAutoSave(), PCB_EDIT_FRAME::doAutoSave(), PCB_EDIT_FRAME::Files_io_from_id(), SCH_EDIT_FRAME::OnCloseWindow(), PCB_EDIT_FRAME::OnExportSTEP(), SCH_EDIT_FRAME::SaveEEFile(), and PCB_EDIT_FRAME::SavePcbFile().

◆ GetAutoSaveInterval()

int EDA_BASE_FRAME::GetAutoSaveInterval ( ) const
inlineinherited

Definition at line 290 of file eda_base_frame.h.

290 { return m_autoSaveInterval; }

References EDA_BASE_FRAME::m_autoSaveInterval.

◆ GetBackupSuffix()

static wxString EDA_BASE_FRAME::GetBackupSuffix ( )
inlinestaticprotectedinherited
Returns
the suffix to be appended to the file extension on backup

Definition at line 159 of file eda_base_frame.h.

160  {
161  return wxT( "-bak" );
162  }

Referenced by EDA_BASE_FRAME::CheckForAutoSaveFile(), PCB_EDIT_FRAME::createBackupFile(), PCB_EDIT_FRAME::Files_io_from_id(), and SCH_EDIT_FRAME::SaveEEFile().

◆ GetDoImmediateActions()

bool EDA_BASE_FRAME::GetDoImmediateActions ( ) const
inlineinherited

Indicates that hotkeys should perform an immediate action even if another tool is currently active.

If false, the first hotkey should select the relevant tool.

Definition at line 251 of file eda_base_frame.h.

251 { return m_immediateActions; }

References EDA_BASE_FRAME::m_immediateActions.

◆ GetDragSelects()

bool EDA_BASE_FRAME::GetDragSelects ( ) const
inlineinherited

Indicates that a drag should draw a selection rectangle, even when started over an item.

Definition at line 257 of file eda_base_frame.h.

257 { return m_dragSelects; }

References EDA_BASE_FRAME::m_dragSelects.

Referenced by EE_SELECTION_TOOL::Main().

◆ GetFileFromHistory()

wxString EDA_BASE_FRAME::GetFileFromHistory ( int  cmdId,
const wxString &  type,
FILE_HISTORY aFileHistory = NULL 
)
inherited

Fetches the file name from the file history list.

This removes the selected file, if this file does not exist. The menu is also updated, if FILE_HISTORY::UseMenu was called at init time

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

Definition at line 622 of file eda_base_frame.cpp.

624 {
625  FILE_HISTORY* fileHistory = aFileHistory;
626 
627  if( !fileHistory )
628  fileHistory = &Kiface().GetFileHistory();
629 
630  int baseId = fileHistory->GetBaseId();
631 
632  wxASSERT( cmdId >= baseId && cmdId < baseId + (int) fileHistory->GetCount() );
633 
634  unsigned i = cmdId - baseId;
635 
636  if( i < fileHistory->GetCount() )
637  {
638  wxString fn = fileHistory->GetHistoryFile( i );
639 
640  if( wxFileName::FileExists( fn ) )
641  return fn;
642  else
643  {
644  wxString msg = wxString::Format( _( "File \"%s\" was not found." ), fn );
645  wxMessageBox( msg );
646 
647  fileHistory->RemoveFileFromHistory( i );
648  }
649  }
650 
651  return wxEmptyString;
652 }
This class implements a file history object to store a list of files, that can then be added to a men...
Definition: filehistory.h:40
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
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
#define _(s)
Definition: 3d_actions.cpp:31
FILE_HISTORY & GetFileHistory()
Definition: kiface_i.h:123

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

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

◆ GetMoveWarpsCursor()

bool EDA_BASE_FRAME::GetMoveWarpsCursor ( ) const
inlineinherited

Indicates that a move operation should warp the mouse pointer to the origin of the move object.

This improves snapping, but some users are alergic to mouse warping.

Definition at line 263 of file eda_base_frame.h.

263 { return m_moveWarpsCursor; }

References EDA_BASE_FRAME::m_moveWarpsCursor.

Referenced by SCH_MOVE_TOOL::Main(), and LIB_MOVE_TOOL::Main().

◆ GetMruPath()

◆ GetToolManager()

TOOL_MANAGER* EDA_BASE_FRAME::GetToolManager ( ) const
inlineinherited

Return the MVC controller.

Definition at line 230 of file eda_base_frame.h.

230 { return m_toolManager; }
TOOL_MANAGER * m_toolManager

References EDA_BASE_FRAME::m_toolManager.

Referenced by DIALOG_GLOBAL_DELETION::AcceptPcbDelete(), TREEPROJECT_ITEM::Activate(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), LIB_CONTROL::AddSymbolToSchematic(), BOARD_COMMIT::BOARD_COMMIT(), FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList(), EDA_BASE_FRAME::CommonSettingsChanged(), DIALOG_DRC_CONTROL::DelDRCMarkers(), DIALOG_MIGRATE_BUSES::DIALOG_MIGRATE_BUSES(), DIALOG_CLEANUP_TRACKS_AND_VIAS::doCleanup(), DIALOG_DRC_CONTROL::doSelectionMenu(), TRACK_WIDTH_MENU::eventHandler(), DIFF_PAIR_MENU::eventHandler(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), SCH_EDIT_FRAME::ExecuteRemoteCommand(), DIALOG_DRC_CONTROL::focusOnItem(), GERBVIEW_FRAME::GERBVIEW_FRAME(), FP_TREE_SYNCHRONIZING_ADAPTER::GetContextMenuTool(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetContextMenuTool(), KICAD_MANAGER_FRAME::InstallPreferences(), FOOTPRINT_EDIT_FRAME::InstallPreferences(), LIB_EDIT_FRAME::InstallPreferences(), GERBVIEW_FRAME::InstallPreferences(), PCB_EDIT_FRAME::InstallPreferences(), SCH_EDIT_FRAME::InstallPreferences(), LIB_VIEW_FRAME::LIB_VIEW_FRAME(), SIM_PLOT_FRAME::onClose(), SYMBOL_TREE_PANE::onComponentSelected(), DIALOG_DRC_CONTROL::OnDeleteOneClick(), DIALOG_ERC::OnLeftClickMarkersList(), FOOTPRINTS_LISTBOX::OnLeftDClick(), SIM_PLOT_FRAME::onProbe(), DIALOG_CLEANUP_TRACKS_AND_VIAS::OnRightUpItem(), DIALOG_PLOT::onRunDRC(), HIERARCHY_NAVIG_DLG::onSelectSheetPath(), DIALOG_FIELDS_EDITOR_GLOBAL::OnTableCellClick(), SIM_PLOT_FRAME::onTune(), DIALOG_PLOT::Plot(), EDA_BASE_FRAME::PopTool(), SCH_EDIT_FRAME::PutDataInPreviousState(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), DIALOG_FIND::search(), PCB_BASE_FRAME::SetFastGrid1(), PCB_BASE_FRAME::SetFastGrid2(), CVPCB_MAINFRAME::setupEventHandlers(), PCB_LAYER_WIDGET::SyncLayerAlphaIndicators(), PANEL_SETUP_NETCLASSES::TransferDataFromWindow(), DIALOG_FIELDS_EDITOR_GLOBAL::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow(), EDA_DRAW_FRAME::UpdateMsgPanel(), DIALOG_NETLIST::~DIALOG_NETLIST(), and DIALOG_UPDATE_PCB::~DIALOG_UPDATE_PCB().

◆ GetType()

HOLDER_TYPE KIWAY_HOLDER::GetType ( )
inlineinherited

Definition at line 49 of file kiway_holder.h.

49 { return m_type; }
HOLDER_TYPE m_type
Definition: kiway_holder.h:82

References KIWAY_HOLDER::m_type.

Referenced by DIALOG_SHIM::DIALOG_SHIM(), and GERBVIEW_FRAME::SaveSettings().

◆ GetUserUnits()

EDA_UNITS EDA_BASE_FRAME::GetUserUnits ( ) const
inlineinherited

Return the user units currently in use.

Definition at line 211 of file eda_base_frame.h.

212  {
213  return m_userUnits;
214  }
EDA_UNITS m_userUnits

References EDA_BASE_FRAME::m_userUnits.

Referenced by PANEL_SETUP_TRACKS_AND_VIAS::AppendDiffPairs(), PANEL_SETUP_TRACKS_AND_VIAS::AppendTrackWidth(), PANEL_SETUP_TRACKS_AND_VIAS::AppendViaSize(), PCB_EDIT_FRAME::Create_MuWaveComponent(), MWAVE::CreateMicrowaveInductor(), GERBVIEW_SELECTION_TOOL::disambiguationMenu(), GERBER_FILE_IMAGE::DisplayImageInfo(), MARKER_BASE::DisplayMarkerInfo(), DIALOG_CLEANUP_TRACKS_AND_VIAS::doCleanup(), EE_SELECTION_TOOL::doSelectionMenu(), SELECTION_TOOL::doSelectionMenu(), DRAWING_TOOL::drawArc(), LIB_EDIT_TOOL::editGraphicProperties(), LIB_PIN_TOOL::EditPinProperties(), CONNECTION_GRAPH::ercCheckBusToBusConflicts(), CONNECTION_GRAPH::ercCheckBusToBusEntryConflicts(), CONNECTION_GRAPH::ercCheckBusToNetConflicts(), EVT_GRID_CMD_CELL_CHANGED(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), PCB_EDIT_FRAME::GenFootprintsReport(), PANEL_MODEDIT_DEFAULTS::getGridValue(), PANEL_SETUP_TEXT_AND_GRAPHICS::getGridValue(), PANEL_SETUP_NETCLASSES::getNetclassValue(), GetUserUnits(), GRID_MENU::GRID_MENU(), PCB_INSPECTION_TOOL::highlightNet(), GERBVIEW_FRAME::Liste_D_Codes(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::MeasureTool(), GERBVIEW_SELECTION_TOOL::MeasureTool(), EDIT_TOOL::MeasureTool(), PANEL_SETUP_BOARD_STACKUP::onThicknessChange(), PANEL_SETUP_BOARD_STACKUP::onUpdateThicknessValue(), PANEL_PREV_3D::PANEL_PREV_3D(), PANEL_SETUP_BOARD_STACKUP::PANEL_SETUP_BOARD_STACKUP(), POSITION_RELATIVE_TOOL::PositionRelative(), FOOTPRINT_EDIT_FRAME::ReCreateMenuBar(), LIB_EDIT_FRAME::ReCreateMenuBar(), GERBVIEW_FRAME::ReCreateMenuBar(), SCH_EDIT_FRAME::ReCreateMenuBar(), PCB_EDIT_FRAME::ReCreateMenuBar(), DRC::Reset(), CONNECTION_SUBGRAPH::ResolveDrivers(), DISPLAY_FOOTPRINTS_FRAME::SyncToolbars(), FOOTPRINT_EDIT_FRAME::SyncToolbars(), LIB_EDIT_FRAME::SyncToolbars(), GERBVIEW_FRAME::SyncToolbars(), PCB_EDIT_FRAME::SyncToolbars(), SCH_EDIT_FRAME::SyncToolbars(), DRC::testDrilledHoles(), DRC::testUnconnected(), COMMON_TOOLS::ToggleUnits(), PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup(), PANEL_SETUP_TRACKS_AND_VIAS::TransferDataFromWindow(), PANEL_SETUP_NETCLASSES::TransferDataFromWindow(), PANEL_EESCHEMA_SETTINGS::TransferDataToWindow(), PANEL_MODEDIT_SETTINGS::TransferDataToWindow(), PANEL_GERBVIEW_SETTINGS::TransferDataToWindow(), PANEL_PCBNEW_SETTINGS::TransferDataToWindow(), PANEL_SETUP_NETCLASSES::TransferDataToWindow(), UNIT_BINDER::UNIT_BINDER(), GRID_MENU::update(), TRACK_WIDTH_MENU::update(), DIFF_PAIR_MENU::update(), GERBVIEW_FRAME::updateDCodeSelectBox(), GERBVIEW_FRAME::updateGridSelectBox(), PCB_BASE_FRAME::UpdateGridSelectBox(), EE_INSPECTION_TOOL::UpdateMessagePanel(), GERBVIEW_CONTROL::UpdateMessagePanel(), PCBNEW_CONTROL::UpdateMessagePanel(), DRC::updatePointers(), PNS_TUNE_STATUS_POPUP::UpdateStatus(), PCB_BASE_FRAME::UpdateStatusBar(), SCH_BASE_FRAME::UpdateStatusBar(), GERBVIEW_FRAME::UpdateStatusBar(), PCB_EDIT_FRAME::UpdateTrackWidthSelectBox(), PCB_EDIT_FRAME::UpdateViaSizeSelectBox(), PANEL_SETUP_TRACKS_AND_VIAS::validateData(), and PANEL_SETUP_NETCLASSES::validateData().

◆ help_name()

wxString EDA_BASE_FRAME::help_name ( )
virtualinherited

Reimplemented in KICAD_MANAGER_FRAME.

Definition at line 599 of file eda_base_frame.cpp.

600 {
601  return Kiface().GetHelpFileName();
602 }
const wxString & GetHelpFileName() const
Function GetHelpFileName returns just the basename portion of the current help file.
Definition: kiface_i.h:121
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.

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

Referenced by COMMON_CONTROL::ShowHelp().

◆ ImportHotkeyConfigFromFile()

void EDA_BASE_FRAME::ImportHotkeyConfigFromFile ( std::map< std::string, TOOL_ACTION * >  aActionMap,
const wxString &  aDefaultShortname 
)
inherited

Prompt the user for a hotkey file to read, and read it.

Parameters
aActionMap= current hotkey map (over which the imported hotkeys will be applied)
aDefaultShortname= a default short name (extension not needed) like eechema, kicad...

◆ InstallPreferences()

virtual void EDA_BASE_FRAME::InstallPreferences ( PAGED_DIALOG ,
PANEL_HOTKEYS_EDITOR  
)
inlinevirtualinherited

Function InstallPreferences Allow a frame to load its preference panels (if any) into the preferences dialog.

Parameters
aParenta paged dialog into which the preference panels should be installed

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

Definition at line 319 of file eda_base_frame.h.

319 { }

Referenced by EDA_BASE_FRAME::OnPreferences().

◆ isAutoSaveRequired()

virtual bool EDA_BASE_FRAME::isAutoSaveRequired ( ) const
inlineprotectedvirtualinherited

Return 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 182 of file eda_base_frame.h.

182 { return false; }

Referenced by EDA_BASE_FRAME::ProcessEvent().

◆ IsContentModified()

bool EDA_BASE_FRAME::IsContentModified ( )
virtualinherited

Get if the contents of the frame have been modified since the last save.

Returns
true if the contents of the frame have not been saved

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

Definition at line 798 of file eda_base_frame.cpp.

799 {
800  // This function should be overridden in child classes
801  return false;
802 }

◆ IsCurrentTool()

bool EDA_BASE_FRAME::IsCurrentTool ( const TOOL_ACTION aAction) const
inherited

Definition at line 276 of file eda_base_frame.cpp.

277 {
278  if( m_toolStack.empty() )
279  return &aAction == &ACTIONS::selectionTool;
280  else
281  return m_toolStack.back() == aAction.GetName();
282 }
std::vector< std::string > m_toolStack
static TOOL_ACTION selectionTool
Definition: actions.h:143
const std::string & GetName() const
Function GetName() Returns name of the action.
Definition: tool_action.h:78

References TOOL_ACTION::GetName(), EDA_BASE_FRAME::m_toolStack, and ACTIONS::selectionTool.

Referenced by PCB_INSPECTION_TOOL::HighlightNetTool(), SCH_EDIT_TOOL::Init(), PCB_EDITOR_CONTROL::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), DISPLAY_FOOTPRINTS_FRAME::SyncToolbars(), and LIB_EDIT_FRAME::SyncToolbars().

◆ IsDismissed()

bool KIWAY_PLAYER::IsDismissed ( )
inherited

Function IsDismissed returns false only if both the frame is acting in modal mode and it has not been dismissed yet with DismissModal().

IOW, it will return true if the dialog is not modal or if it is modal and has been dismissed.

Definition at line 154 of file kiway_player.cpp.

155 {
156  return !m_modal_loop;
157 }
WX_EVENT_LOOP * m_modal_loop
Definition: kiway_player.h:189

References KIWAY_PLAYER::m_modal_loop.

Referenced by LIB_VIEW_FRAME::OnCloseWindow(), FOOTPRINT_VIEWER_FRAME::OnCloseWindow(), and FOOTPRINT_WIZARD_FRAME::OnCloseWindow().

◆ IsModal()

◆ IsType()

bool EDA_BASE_FRAME::IsType ( FRAME_T  aType) const
inlineinherited

Definition at line 292 of file eda_base_frame.h.

292 { return m_Ident == aType; }

References EDA_BASE_FRAME::m_Ident.

Referenced by LIB_CONTROL::AddLibrary(), PCBNEW_CONTROL::AddLibrary(), LIB_CONTROL::AddSymbol(), ALIGN_DISTRIBUTE_TOOL::AlignBottom(), ALIGN_DISTRIBUTE_TOOL::AlignCenterX(), ALIGN_DISTRIBUTE_TOOL::AlignCenterY(), ALIGN_DISTRIBUTE_TOOL::AlignTop(), BOARD_COMMIT::BOARD_COMMIT(), EDA_3D_VIEWER::CreateMenuBar(), LIB_CONTROL::CutCopyDelete(), DIALOG_KEEPOUT_AREA_PROPERTIES::DIALOG_KEEPOUT_AREA_PROPERTIES(), DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT(), DIALOG_PUSH_PAD_PROPERTIES::DIALOG_PUSH_PAD_PROPERTIES(), KIGFX::SCH_VIEW::DisplaySheet(), ALIGN_DISTRIBUTE_TOOL::doAlignLeft(), ALIGN_DISTRIBUTE_TOOL::doAlignRight(), ALIGN_DISTRIBUTE_TOOL::doDistributeCentersHorizontally(), ALIGN_DISTRIBUTE_TOOL::doDistributeCentersVertically(), ALIGN_DISTRIBUTE_TOOL::doDistributeGapsHorizontally(), ALIGN_DISTRIBUTE_TOOL::doDistributeGapsVertically(), LIB_CONTROL::DuplicateSymbol(), LIB_CONTROL::EditSymbol(), LIB_CONTROL::ExportSymbol(), LIB_CONTROL::Init(), DIALOG_EDIT_ONE_FIELD::init(), SELECTION_TOOL::Init(), DIALOG_PAD_PROPERTIES::initValues(), PICKER_TOOL::Main(), LIB_CONTROL::OnDeMorgan(), PCB_LAYER_WIDGET::OnRenderEnable(), PCBNEW_CONTROL::Paste(), POSITION_RELATIVE_TOOL::RelativeItemSelectionMove(), LIB_CONTROL::Revert(), EE_INSPECTION_TOOL::RunERC(), LIB_CONTROL::Save(), PCBNEW_CONTROL::Show3DViewer(), LIB_CONTROL::ShowComponentTree(), EE_INSPECTION_TOOL::ShowDatasheet(), and COMMON_TOOLS::ZoomFitScreen().

◆ IsWritable()

bool EDA_BASE_FRAME::IsWritable ( const wxFileName &  aFileName)
inherited

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 691 of file eda_base_frame.cpp.

692 {
693  wxString msg;
694  wxFileName fn = aFileName;
695 
696  // Check for absence of a file path with a file name. Unfortunately KiCad
697  // uses paths relative to the current project path without the ./ part which
698  // confuses wxFileName. Making the file name path absolute may be less than
699  // elegant but it solves the problem.
700  if( fn.GetPath().IsEmpty() && fn.HasName() )
701  fn.MakeAbsolute();
702 
703  wxCHECK_MSG( fn.IsOk(), false,
704  wxT( "File name object is invalid. Bad programmer!" ) );
705  wxCHECK_MSG( !fn.GetPath().IsEmpty(), false,
706  wxT( "File name object path <" ) + fn.GetFullPath() +
707  wxT( "> is not set. Bad programmer!" ) );
708 
709  if( fn.IsDir() && !fn.IsDirWritable() )
710  {
711  msg.Printf( _( "You do not have write permissions to folder \"%s\"." ),
712  GetChars( fn.GetPath() ) );
713  }
714  else if( !fn.FileExists() && !fn.IsDirWritable() )
715  {
716  msg.Printf( _( "You do not have write permissions to save file \"%s\" to folder \"%s\"." ),
717  GetChars( fn.GetFullName() ), GetChars( fn.GetPath() ) );
718  }
719  else if( fn.FileExists() && !fn.IsFileWritable() )
720  {
721  msg.Printf( _( "You do not have write permissions to save file \"%s\"." ),
722  GetChars( fn.GetFullPath() ) );
723  }
724 
725  if( !msg.IsEmpty() )
726  {
727  wxMessageBox( msg );
728  return false;
729  }
730 
731  return true;
732 }
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:101
#define _(s)
Definition: 3d_actions.cpp:31

References _, and GetChars().

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

◆ Kiway()

KIWAY& KIWAY_HOLDER::Kiway ( ) const
inlineinherited

Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in.

A KIWAY_HOLDER is not necessarily a KIWAY_PLAYER.

Definition at line 56 of file kiway_holder.h.

57  {
58  wxASSERT( m_kiway ); // smoke out bugs in Debug build, then Release runs fine.
59  return *m_kiway;
60  }
KIWAY * m_kiway
Definition: kiway_holder.h:81

References KIWAY_HOLDER::m_kiway.

Referenced by TREEPROJECT_ITEM::Activate(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), PCB_BASE_EDIT_FRAME::AddLibrary(), LIB_CONTROL::AddSymbolToSchematic(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), COMMON_CONTROL::ConfigurePaths(), DIALOG_CHOOSE_FOOTPRINT::ConstructRightPanel(), DIALOG_CHOOSE_COMPONENT::ConstructRightPanel(), PCB_BASE_FRAME::CreateAndShow3D_Frame(), SCH_EDIT_FRAME::CreateScreens(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_SHIM::DIALOG_SHIM(), CVPCB_MAINFRAME::DisplayStatus(), FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), EDIT_TOOL::EditFpInFpEditor(), SCH_EDIT_FRAME::EditSheet(), SCH_EDITOR_CONTROL::EditWithLibEdit(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), LIB_MANAGER::GetBufferedPart(), LIB_MANAGER::getLibraryBuffer(), FOOTPRINT_EDIT_FRAME::GetPlotSettings(), PCB_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::InitSheet(), KICAD_MANAGER_FRAME::language_change(), KIWAY_PLAYER::language_change(), CVPCB_MAINFRAME::LoadFootprintFiles(), KICAD_MANAGER_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadSheetFromFile(), TEXT_BUTTON_SYMBOL_CHOOSER::OnButtonClick(), TEXT_BUTTON_FP_CHOOSER::OnButtonClick(), KICAD_MANAGER_FRAME::OnCloseWindow(), SCH_EDIT_FRAME::OnCloseWindow(), SCH_EDIT_FRAME::OnExit(), FOOTPRINT_EDIT_FRAME::OnExitKiCad(), FOOTPRINT_VIEWER_FRAME::OnExitKiCad(), LIB_EDIT_FRAME::OnExitKiCad(), SAVE_AS_TRAVERSER::OnFile(), KICAD_MANAGER_FRAME::OnImportEagleFiles(), DIALOG_CHOOSE_COMPONENT::OnInitDialog(), SCH_EDIT_FRAME::OnOpenCvpcb(), SCH_EDIT_FRAME::OnOpenPcbnew(), EDA_BASE_FRAME::OnPreferences(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick(), FOOTPRINT_EDIT_FRAME::OnUpdateInsertModuleInBoard(), FOOTPRINT_EDIT_FRAME::OnUpdateLoadModuleFromBoard(), SCH_EDIT_FRAME::OnUpdatePCB(), SCH_EDIT_FRAME::OpenProjectFiles(), SCH_EDITOR_CONTROL::Paste(), KIWAY_HOLDER::Prj(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), LIB_EDIT_FRAME::refreshSchematic(), SCH_EDIT_FRAME::rescueProject(), EE_INSPECTION_TOOL::RunSimulation(), SCH_EDIT_FRAME::SaveEEFile(), CVPCB_MAINFRAME::SaveFootprintAssociation(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), SCH_BASE_FRAME::SelectComponentFromLibBrowser(), SCH_EDIT_FRAME::SendCrossProbeClearHighlight(), SCH_EDIT_FRAME::SendCrossProbeNetName(), PCB_EDIT_FRAME::SendCrossProbeNetName(), CVPCB_MAINFRAME::SendMessageToEESCHEMA(), PCB_EDIT_FRAME::SendMessageToEESCHEMA(), SCH_EDIT_FRAME::SendMessageToPCBNEW(), SCH_EDIT_FRAME::sendNetlistToCvpcb(), FOOTPRINT_EDIT_FRAME::SetPlotSettings(), CVPCB_CONTROL::ShowFootprintViewer(), COMMON_CONTROL::ShowLibraryTable(), COMMON_CONTROL::ShowPlayer(), KICAD_MANAGER_CONTROL::ShowPlayer(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), LIB_MANAGER::UpdatePart(), and DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint().

◆ kiway_express()

void KIWAY_PLAYER::kiway_express ( KIWAY_EXPRESS aEvent)
protectedinherited

event handler, routes to derivative specific virtual KiwayMailIn()

Definition at line 175 of file kiway_player.cpp.

176 {
177  // logging support
178  KiwayMailIn( aEvent ); // call the virtual, override in derived.
179 }
virtual void KiwayMailIn(KIWAY_EXPRESS &aEvent)
Function KiwayMailIn receives KIWAY_EXPRESS messages from other players.

References KIWAY_PLAYER::KiwayMailIn().

◆ KiwayMailIn()

void KIWAY_PLAYER::KiwayMailIn ( KIWAY_EXPRESS aEvent)
virtualinherited

Function KiwayMailIn receives KIWAY_EXPRESS messages from other players.

Merely override it in derived classes.

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

Definition at line 69 of file kiway_player.cpp.

70 {
71  // override this in derived classes.
72 }

Referenced by KIWAY_PLAYER::kiway_express(), and KIWAY::ProcessEvent().

◆ language_change()

void KIWAY_PLAYER::language_change ( wxCommandEvent &  event)
protectedinherited

Function language_change is an event handler called on a language menu selection.

Definition at line 182 of file kiway_player.cpp.

183 {
184  int id = event.GetId();
185 
186  // tell all the KIWAY_PLAYERs about the language change.
187  Kiway().SetLanguage( id );
188 }
KIWAY & Kiway() const
Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in...
Definition: kiway_holder.h:56
VTBL_ENTRY void SetLanguage(int aLanguage)
Function SetLanguage changes the language and then calls ShowChangedLanguage() on all KIWAY_PLAYERs.
Definition: kiway.cpp:435

References KIWAY_HOLDER::Kiway(), and KIWAY::SetLanguage().

◆ LoadSettings()

void EDA_BASE_FRAME::LoadSettings ( wxConfigBase *  aCfg)
virtualinherited

Load 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 PCB_EDIT_FRAME, GERBVIEW_FRAME, EDA_DRAW_FRAME, PCB_BASE_FRAME, SCH_EDIT_FRAME, CVPCB_MAINFRAME, LIB_EDIT_FRAME, EDA_3D_VIEWER, FOOTPRINT_WIZARD_FRAME, SIM_PLOT_FRAME, BM2CMP_FRAME, KICAD_MANAGER_FRAME, FOOTPRINT_VIEWER_FRAME, LIB_VIEW_FRAME, PCB_CALCULATOR_FRAME, FOOTPRINT_EDIT_FRAME, and DISPLAY_FOOTPRINTS_FRAME.

Definition at line 461 of file eda_base_frame.cpp.

462 {
463  int maximized = 0;
464 
465  wxString baseCfgName = ConfigBaseName();
466 
467  wxString text = baseCfgName + entryPosX;
468  aCfg->Read( text, &m_FramePos.x, m_FramePos.x );
469 
470  text = baseCfgName + entryPosY;
471  aCfg->Read( text, &m_FramePos.y, m_FramePos.y );
472 
473  text = baseCfgName + entrySizeX;
474  aCfg->Read( text, &m_FrameSize.x, m_FrameSize.x );
475 
476  text = baseCfgName + entrySizeY;
477  aCfg->Read( text, &m_FrameSize.y, m_FrameSize.y );
478 
479  text = baseCfgName + entryMaximized;
480  aCfg->Read( text, &maximized, 0 );
481 
482  if( m_hasAutoSave )
483  {
484  text = baseCfgName + entryAutoSaveInterval;
485  aCfg->Read( text, &m_autoSaveInterval, DEFAULT_AUTO_SAVE_INTERVAL );
486  }
487 
488  // Ensure the window is on a connected display, and is visible.
489  // (at least a corner of the frame must be visible on screen)
490  // Sometimes, if a window was moved on an auxiliary display, and when this
491  // display is no more available, it is not the case.
492  wxRect rect( m_FramePos, m_FrameSize );
493 
494  if( wxDisplay::GetFromPoint( rect.GetTopLeft() ) == wxNOT_FOUND &&
495  wxDisplay::GetFromPoint( rect.GetTopRight() ) == wxNOT_FOUND &&
496  wxDisplay::GetFromPoint( rect.GetBottomLeft() ) == wxNOT_FOUND &&
497  wxDisplay::GetFromPoint( rect.GetBottomRight() ) == wxNOT_FOUND )
498  {
499  m_FramePos = wxDefaultPosition;
500  }
501 
502  // Ensure Window title bar is visible
503 #if defined( __WXMAC__ )
504  // for macOSX, the window must be below system (macOSX) toolbar
505  // Ypos_min = GetMBarHeight(); seems no more exist in new API (subject to change)
506  int Ypos_min = 20;
507 #else
508  int Ypos_min = 0;
509 #endif
510  if( m_FramePos.y < Ypos_min )
511  m_FramePos.y = Ypos_min;
512 
513  if( maximized )
514  Maximize();
515 
516  aCfg->Read( baseCfgName + entryPerspective, &m_perspective );
517  aCfg->Read( baseCfgName + entryMruPath, &m_mruPath );
518 
519  wxConfigBase* settings = Pgm().CommonSettings();
520 
521  if( !settings->Read( WARP_MOUSE_ON_MOVE_KEY, &m_moveWarpsCursor ) )
522  {
523  // Legacy versions stored the property only for Eeschema, so see if we have it there
524  std::unique_ptr<wxConfigBase> pcbSettings = GetNewConfig( wxT( "eeschema" ) );
525  pcbSettings->Read( "MoveWarpsCursor", &m_moveWarpsCursor, true );
526  }
527 
528  if( !settings->Read( PREFER_SELECT_TO_DRAG_KEY, &m_dragSelects ) )
529  {
530  // Legacy versions stored the property only for PCBNew, so see if we have it there
531  std::unique_ptr<wxConfigBase> pcbSettings = GetNewConfig( wxT( "pcbnew" ) );
532  pcbSettings->Read( "DragSelects", &m_dragSelects, true );
533  }
534 
535  settings->Read( IMMEDIATE_ACTIONS_KEY, &m_immediateActions, false );
536 }
#define IMMEDIATE_ACTIONS_KEY
Definition: pgm_base.h:58
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:98
#define PREFER_SELECT_TO_DRAG_KEY
Definition: pgm_base.h:59
wxString m_mruPath
std::unique_ptr< wxConfigBase > GetNewConfig(const wxString &aProgName)
Create a new wxConfig so we can put configuration files in a more proper place for each platform.
Definition: common.cpp:231
wxString ConfigBaseName()
static const wxString entryPosX
X position of frame, in pixels (suffix)
wxString m_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)
static const wxString entryMruPath
Configuration file entry for most recently used path.
#define WARP_MOUSE_ON_MOVE_KEY
Definition: pgm_base.h:57

References EDA_BASE_FRAME::ConfigBaseName(), DEFAULT_AUTO_SAVE_INTERVAL, entryAutoSaveInterval, entryMaximized, entryMruPath, entryPerspective, entryPosX, entryPosY, entrySizeX, entrySizeY, GetNewConfig(), IMMEDIATE_ACTIONS_KEY, EDA_BASE_FRAME::m_autoSaveInterval, EDA_BASE_FRAME::m_dragSelects, EDA_BASE_FRAME::m_FramePos, EDA_BASE_FRAME::m_FrameSize, EDA_BASE_FRAME::m_hasAutoSave, EDA_BASE_FRAME::m_immediateActions, EDA_BASE_FRAME::m_moveWarpsCursor, EDA_BASE_FRAME::m_mruPath, EDA_BASE_FRAME::m_perspective, Pgm(), PREFER_SELECT_TO_DRAG_KEY, WARP_MOUSE_ON_MOVE_KEY, wxPoint::x, and wxPoint::y.

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

◆ m_splitterLeftRightOnIdle()

void SIM_PLOT_FRAME_BASE::m_splitterLeftRightOnIdle ( wxIdleEvent &  )
inline

Definition at line 123 of file sim_plot_frame_base.h.

124  {
125  m_splitterLeftRight->SetSashPosition( 700 );
126  m_splitterLeftRight->Disconnect( wxEVT_IDLE, wxIdleEventHandler( SIM_PLOT_FRAME_BASE::m_splitterLeftRightOnIdle ), NULL, this );
127  }
void m_splitterLeftRightOnIdle(wxIdleEvent &)
#define NULL
wxSplitterWindow * m_splitterLeftRight

References m_splitterLeftRight, and NULL.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_splitterPlotAndConsoleOnIdle()

void SIM_PLOT_FRAME_BASE::m_splitterPlotAndConsoleOnIdle ( wxIdleEvent &  )
inline

Definition at line 129 of file sim_plot_frame_base.h.

130  {
131  m_splitterPlotAndConsole->SetSashPosition( 500 );
132  m_splitterPlotAndConsole->Disconnect( wxEVT_IDLE, wxIdleEventHandler( SIM_PLOT_FRAME_BASE::m_splitterPlotAndConsoleOnIdle ), NULL, this );
133  }
#define NULL
void m_splitterPlotAndConsoleOnIdle(wxIdleEvent &)
wxSplitterWindow * m_splitterPlotAndConsole

References m_splitterPlotAndConsole, and NULL.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_splitterSignalsOnIdle()

void SIM_PLOT_FRAME_BASE::m_splitterSignalsOnIdle ( wxIdleEvent &  )
inline

Definition at line 135 of file sim_plot_frame_base.h.

136  {
137  m_splitterSignals->SetSashPosition( 0 );
138  m_splitterSignals->Disconnect( wxEVT_IDLE, wxIdleEventHandler( SIM_PLOT_FRAME_BASE::m_splitterSignalsOnIdle ), NULL, this );
139  }
wxSplitterWindow * m_splitterSignals
void m_splitterSignalsOnIdle(wxIdleEvent &)
#define NULL

References m_splitterSignals, and NULL.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_splitterTuneValuesOnIdle()

void SIM_PLOT_FRAME_BASE::m_splitterTuneValuesOnIdle ( wxIdleEvent &  )
inline

Definition at line 141 of file sim_plot_frame_base.h.

142  {
143  m_splitterTuneValues->SetSashPosition( 0 );
144  m_splitterTuneValues->Disconnect( wxEVT_IDLE, wxIdleEventHandler( SIM_PLOT_FRAME_BASE::m_splitterTuneValuesOnIdle ), NULL, this );
145  }
wxSplitterWindow * m_splitterTuneValues
#define NULL
void m_splitterTuneValuesOnIdle(wxIdleEvent &)

References m_splitterTuneValues, and NULL.

Referenced by SIM_PLOT_FRAME_BASE().

◆ menuExit()

virtual void SIM_PLOT_FRAME_BASE::menuExit ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 101 of file sim_plot_frame_base.h.

101 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE().

◆ menuNewPlot()

virtual void SIM_PLOT_FRAME_BASE::menuNewPlot ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 96 of file sim_plot_frame_base.h.

96 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE().

◆ menuOpenWorkbook()

virtual void SIM_PLOT_FRAME_BASE::menuOpenWorkbook ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 97 of file sim_plot_frame_base.h.

97 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE().

◆ menuSaveCsv()

virtual void SIM_PLOT_FRAME_BASE::menuSaveCsv ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 100 of file sim_plot_frame_base.h.

100 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE().

◆ menuSaveImage()

virtual void SIM_PLOT_FRAME_BASE::menuSaveImage ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 99 of file sim_plot_frame_base.h.

99 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE().

◆ menuSaveWorkbook()

virtual void SIM_PLOT_FRAME_BASE::menuSaveWorkbook ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 98 of file sim_plot_frame_base.h.

98 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE().

◆ menuShowDotted()

virtual void SIM_PLOT_FRAME_BASE::menuShowDotted ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 109 of file sim_plot_frame_base.h.

109 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE().

◆ menuShowDottedUpdate()

virtual void SIM_PLOT_FRAME_BASE::menuShowDottedUpdate ( wxUpdateUIEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 110 of file sim_plot_frame_base.h.

110 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE(), and ~SIM_PLOT_FRAME_BASE().

◆ menuShowGrid()

virtual void SIM_PLOT_FRAME_BASE::menuShowGrid ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 105 of file sim_plot_frame_base.h.

105 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE().

◆ menuShowGridUpdate()

virtual void SIM_PLOT_FRAME_BASE::menuShowGridUpdate ( wxUpdateUIEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 106 of file sim_plot_frame_base.h.

106 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE(), and ~SIM_PLOT_FRAME_BASE().

◆ menuShowLegend()

virtual void SIM_PLOT_FRAME_BASE::menuShowLegend ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 107 of file sim_plot_frame_base.h.

107 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE().

◆ menuShowLegendUpdate()

virtual void SIM_PLOT_FRAME_BASE::menuShowLegendUpdate ( wxUpdateUIEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 108 of file sim_plot_frame_base.h.

108 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE(), and ~SIM_PLOT_FRAME_BASE().

◆ menuZoomFit()

virtual void SIM_PLOT_FRAME_BASE::menuZoomFit ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 104 of file sim_plot_frame_base.h.

104 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE().

◆ menuZoomIn()

virtual void SIM_PLOT_FRAME_BASE::menuZoomIn ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 102 of file sim_plot_frame_base.h.

102 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE().

◆ menuZoomOut()

virtual void SIM_PLOT_FRAME_BASE::menuZoomOut ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 103 of file sim_plot_frame_base.h.

103 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE().

◆ onAutoSaveTimer()

void EDA_BASE_FRAME::onAutoSaveTimer ( wxTimerEvent &  aEvent)
protectedinherited

Handle the auto save timer event.

Definition at line 343 of file eda_base_frame.cpp.

344 {
345  if( !doAutoSave() )
346  m_autoSaveTimer->Start( m_autoSaveInterval * 1000, wxTIMER_ONE_SHOT );
347 }
virtual bool doAutoSave()
This should be overridden by the derived class to handle the auto save feature.
wxTimer * m_autoSaveTimer

References EDA_BASE_FRAME::doAutoSave(), EDA_BASE_FRAME::m_autoSaveInterval, and EDA_BASE_FRAME::m_autoSaveTimer.

Referenced by EDA_BASE_FRAME::EDA_BASE_FRAME().

◆ OnCharHook()

void EDA_BASE_FRAME::OnCharHook ( wxKeyEvent &  event)
virtualinherited

Capture the key event before it is sent to the GUI.

The basic frame does not capture this event. Editor frames should override this event function to capture and filter these keys when they are used as hotkeys, and skip it if the key is not used as hotkey (otherwise the key events will be not sent to menus).

Reimplemented in FOOTPRINT_VIEWER_FRAME.

Definition at line 356 of file eda_base_frame.cpp.

357 {
358  wxLogTrace( kicadTraceKeyEvent, "EDA_BASE_FRAME::OnCharHook %s", dump( event ) );
359  // Key events can be filtered here.
360  // Currently no filtering is made.
361  event.Skip();
362 }
wxString dump(const wxArrayString &aArray)
Debug helper for printing wxArrayString contents.
const wxChar *const kicadTraceKeyEvent
Flag to enable wxKeyEvent debug tracing.

References dump(), and kicadTraceKeyEvent.

◆ OnKicadAbout()

void EDA_BASE_FRAME::OnKicadAbout ( wxCommandEvent &  event)
inherited

Definition at line 655 of file eda_base_frame.cpp.

656 {
657  void ShowAboutDialog(EDA_BASE_FRAME * aParent); // See AboutDialog_main.cpp
658  ShowAboutDialog( this );
659 }
void ShowAboutDialog(EDA_BASE_FRAME *aParent)
The base frame for deriving all KiCad main window classes.

References ShowAboutDialog().

◆ OnMenuOpen()

void EDA_BASE_FRAME::OnMenuOpen ( wxMenuEvent &  event)
inherited

Workaround some issues in wxWidgets where the menu events aren't captured by the menus themselves.

Definition at line 365 of file eda_base_frame.cpp.

366 {
367  //
368  // wxWidgets has several issues that we have to work around:
369  //
370  // 1) wxWidgets 3.0.x Windows has a bug where wxEVT_MENU_OPEN and wxEVT_MENU_HIGHLIGHT
371  // events are not captured by the ACTON_MENU menus. So we forward them here.
372  // (FWIW, this one is fixed in wxWidgets 3.1.x.)
373  //
374  // 2) wxWidgets doesn't pass the menu pointer for wxEVT_MENU_HIGHLIGHT events. So we
375  // store the menu pointer from the wxEVT_MENU_OPEN call.
376  //
377  // 3) wxWidgets has no way to tell whether a command is from a menu selection or a
378  // hotkey. So we keep track of menu highlighting so we can differentiate.
379  //
380 
381  static ACTION_MENU* currentMenu;
382 
383  if( event.GetEventType() == wxEVT_MENU_OPEN )
384  {
385  currentMenu = dynamic_cast<ACTION_MENU*>( event.GetMenu() );
386 
387  if( currentMenu )
388  currentMenu->OnMenuEvent( event );
389  }
390  else if( event.GetEventType() == wxEVT_MENU_HIGHLIGHT )
391  {
392  if( currentMenu )
393  currentMenu->OnMenuEvent( event );
394  }
395  else if( event.GetEventType() == wxEVT_MENU_CLOSE )
396  {
397  if( currentMenu )
398  currentMenu->OnMenuEvent( event );
399 
400  currentMenu = nullptr;
401  }
402 
403  event.Skip();
404 }
ACTION_MENU.
Definition: action_menu.h:43
void OnMenuEvent(wxMenuEvent &aEvent)

References ACTION_MENU::OnMenuEvent().

◆ onPlotChanged()

virtual void SIM_PLOT_FRAME_BASE::onPlotChanged ( wxAuiNotebookEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 111 of file sim_plot_frame_base.h.

111 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE(), and ~SIM_PLOT_FRAME_BASE().

◆ onPlotClose()

virtual void SIM_PLOT_FRAME_BASE::onPlotClose ( wxAuiNotebookEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 112 of file sim_plot_frame_base.h.

112 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE(), and ~SIM_PLOT_FRAME_BASE().

◆ OnPreferences()

void EDA_BASE_FRAME::OnPreferences ( wxCommandEvent &  event)
inherited

Definition at line 662 of file eda_base_frame.cpp.

663 {
664  PAGED_DIALOG dlg( this, _( "Preferences" ) );
665  wxTreebook* book = dlg.GetTreebook();
666 
667  book->AddPage( new PANEL_COMMON_SETTINGS( &dlg, book ), _( "Common" ) );
668 
669  PANEL_HOTKEYS_EDITOR* hotkeysPanel = new PANEL_HOTKEYS_EDITOR( this, book, false );
670  book->AddPage( hotkeysPanel, _( "Hotkeys" ) );
671 
672  for( unsigned i = 0; i < KIWAY_PLAYER_COUNT; ++i )
673  {
674  KIWAY_PLAYER* frame = dlg.Kiway().Player( (FRAME_T) i, false );
675 
676  if( frame )
677  frame->InstallPreferences( &dlg, hotkeysPanel );
678  }
679 
680  // The Kicad manager frame is not a player so we have to add it by hand
681  wxWindow* manager = wxFindWindowByName( KICAD_MANAGER_FRAME_NAME );
682 
683  if( manager )
684  static_cast<EDA_BASE_FRAME*>( manager )->InstallPreferences( &dlg, hotkeysPanel );
685 
686  if( dlg.ShowModal() == wxID_OK )
687  dlg.Kiway().CommonSettingsChanged( false );
688 }
KIWAY_PLAYER is a wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of ...
Definition: kiway_player.h:59
KIWAY & Kiway() const
Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in...
Definition: kiway_holder.h:56
FRAME_T
Enum FRAME_T is the set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
Definition: frame_type.h:34
VTBL_ENTRY KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=NULL)
Function Player returns the KIWAY_PLAYER* given a FRAME_T.
Definition: kiway.cpp:341
#define KICAD_MANAGER_FRAME_NAME
#define _(s)
Definition: 3d_actions.cpp:31
virtual void InstallPreferences(PAGED_DIALOG *, PANEL_HOTKEYS_EDITOR *)
Function InstallPreferences Allow a frame to load its preference panels (if any) into the preferences...

References _, KIWAY::CommonSettingsChanged(), PAGED_DIALOG::GetTreebook(), EDA_BASE_FRAME::InstallPreferences(), KICAD_MANAGER_FRAME_NAME, KIWAY_HOLDER::Kiway(), KIWAY_PLAYER_COUNT, and KIWAY::Player().

◆ onSignalDblClick()

virtual void SIM_PLOT_FRAME_BASE::onSignalDblClick ( wxMouseEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 113 of file sim_plot_frame_base.h.

113 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE(), and ~SIM_PLOT_FRAME_BASE().

◆ onSignalRClick()

virtual void SIM_PLOT_FRAME_BASE::onSignalRClick ( wxListEvent &  event)
inlineprotectedvirtual

Reimplemented in SIM_PLOT_FRAME.

Definition at line 114 of file sim_plot_frame_base.h.

114 { event.Skip(); }

Referenced by SIM_PLOT_FRAME_BASE(), and ~SIM_PLOT_FRAME_BASE().

◆ OpenProjectFiles()

virtual bool KIWAY_PLAYER::OpenProjectFiles ( const std::vector< wxString > &  aFileList,
int  aCtl = 0 
)
inlinevirtualinherited

Function OpenProjectFiles is abstract, and opens a project or set of files given by aFileList.

This is generalized in the direction of worst case. In a typical case aFileList will only hold a single file, like "myboard.kicad_pcb", because any KIWAY_PLAYER is only in one KIWAY and the KIWAY owns the PROJECT. Therefore opening files from multiple projects into the same KIWAY_PLAYER is precluded.

Each derived class should handle this in a way specific to its needs. No filename prompting is done inside here for any file or project. There should be no need to call this with aFileList which is empty. However, calling it with a single filename which does not exist should indicate to the implementor that a new session is being started and that the given name is the desired name for the data file at time of save.

This function does not support "appending". Use a different function for that. Any prior project data tree should be cleared before loading the new stuff.

Therefore, one of the first things an implementation should do is test for existence of the first file in the list, and if it does not exist, treat it as a new session, possibly with a UI notification to that effect.

After loading the window should update its Title as part of this operation. If the KIWAY_PLAYER needs to, it can load the *.pro file as part of this operation.

If the KIWAY_PLAYER cannot load any of the file(s) in the list, then it should say why through some GUI interface, and return false.

Parameters
aFileListincludes files that this frame should open according to the knowledge in the derived wxFrame. In almost every case, the list will have only a single file in it.
aCtlis a set of bit flags ORed together from the set of KICTL_* #defined above.
Returns
bool - true if all requested files were opened OK, else false.

Reimplemented in PCB_EDIT_FRAME, SCH_EDIT_FRAME, FOOTPRINT_EDIT_FRAME, GERBVIEW_FRAME, CVPCB_MAINFRAME, and BM2CMP_FRAME.

Definition at line 118 of file kiway_player.h.

119  {
120  // overload me for your wxFrame type.
121 
122  // Any overload should probably do this also:
123  // Prj().MaybeLoadProjectSettings();
124 
125  // Then update the window title.
126 
127  return false;
128  }

Referenced by PCB_EDIT_FRAME::FetchNetlistFromSchematic(), PGM_SINGLE_TOP::MacOpenFile(), PGM_MOCK_EESCHEMA_FRAME::MacOpenFile(), PGM_TEST_FRAME::MacOpenFile(), SCH_EDIT_FRAME::OnOpenPcbnew(), PGM_SINGLE_TOP::OnPgmInit(), SCH_EDIT_FRAME::OnUpdatePCB(), and PCB_EDIT_FRAME::RunEeschema().

◆ PopTool()

void EDA_BASE_FRAME::PopTool ( const std::string &  actionName)
virtualinherited

Definition at line 229 of file eda_base_frame.cpp.

230 {
231  // Push/pop events can get out of order (such as when they're generated by the Simulator
232  // frame but not processed until the mouse is back in the Schematic frame), so make sure
233  // we're popping the right stack frame.
234 
235  for( int i = m_toolStack.size() - 1; i >= 0; --i )
236  {
237  if( m_toolStack[ i ] == actionName )
238  {
239  m_toolStack.erase( m_toolStack.begin() + i );
240 
241  // If there's something underneath us, and it's now the top of the stack, then
242  // re-activate it
243  if( ( --i ) >= 0 && i == (int)m_toolStack.size() - 1 )
244  {
245  std::string back = m_toolStack[ i ];
247 
248  if( action )
249  {
250  // Pop the action as running it will push it back onto the stack
251  m_toolStack.pop_back();
252 
253  TOOL_EVENT evt = action->MakeEvent();
254  evt.SetHasPosition( false );
255  GetToolManager()->PostEvent( evt );
256  }
257  }
258  else
260 
261  return;
262  }
263  }
264 }
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
TOOL_ACTION * FindAction(const std::string &aActionName) const
Function FindAction() Finds an action with a given name (if there is one available).
virtual void DisplayToolMsg(const wxString &msg)
TOOL_EVENT.
Definition: tool_event.h:171
std::vector< std::string > m_toolStack
ACTION_MANAGER * GetActionManager()
Definition: tool_manager.h:163
TOOL_ACTION.
Definition: tool_action.h:46
TOOL_EVENT MakeEvent() const
Function MakeEvent() Returns the event associated with the action (i.e.
Definition: tool_action.h:107
TOOL_MANAGER * m_toolManager
void PostEvent(const TOOL_EVENT &aEvent)
Puts an event to the event queue to be processed at the end of event processing cycle.
Definition: tool_manager.h:237
static TOOL_ACTION selectionTool
Definition: actions.h:143
void SetHasPosition(bool aHasPosition)
Definition: tool_event.h:261

References EDA_BASE_FRAME::DisplayToolMsg(), ACTION_MANAGER::FindAction(), TOOL_MANAGER::GetActionManager(), EDA_BASE_FRAME::GetToolManager(), EDA_BASE_FRAME::m_toolManager, EDA_BASE_FRAME::m_toolStack, TOOL_ACTION::MakeEvent(), TOOL_MANAGER::PostEvent(), ACTIONS::selectionTool, and TOOL_EVENT::SetHasPosition().

Referenced by SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::drawSegment(), LIB_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), ZOOM_TOOL::Main(), SCH_MOVE_TOOL::Main(), LIB_MOVE_TOOL::Main(), PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::MeasureTool(), GERBVIEW_SELECTION_TOOL::MeasureTool(), EDIT_TOOL::MeasureTool(), EDIT_TOOL::Move(), LIB_DRAWING_TOOLS::PlaceAnchor(), SCH_DRAWING_TOOLS::PlaceComponent(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PCB_EDITOR_CONTROL::PlaceModule(), PCB_EDITOR_CONTROL::PlaceTarget(), DRAWING_TOOL::PlaceText(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), LIB_DRAWING_TOOLS::TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().

◆ PrintMsg()

void EDA_BASE_FRAME::PrintMsg ( const wxString &  text)
inherited

Definition at line 605 of file eda_base_frame.cpp.

606 {
607  SetStatusText( text );
608 }

◆ Prj()

PROJECT & KIWAY_HOLDER::Prj ( ) const
inherited

Function Prj returns a reference to the PROJECT "associated with" this KIWAY.

Definition at line 35 of file kiway_holder.cpp.

36 {
37  return Kiway().Prj();
38 }
KIWAY & Kiway() const
Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in...
Definition: kiway_holder.h:56
VTBL_ENTRY PROJECT & Prj() const
Function Prj returns the PROJECT associated with this KIWAY.
Definition: kiway.cpp:171

References KIWAY_HOLDER::Kiway(), and KIWAY::Prj().

Referenced by PCB_BASE_EDIT_FRAME::AddLibrary(), LIB_MANAGER::addLibrary(), LIB_CONTROL::AddSymbolToSchematic(), SCH_EDIT_FRAME::AppendSchematic(), PCB_EDIT_FRAME::ArchiveModulesOnBoard(), DIALOG_SYMBOL_REMAP::backupProject(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), DIALOG_FOOTPRINT_FP_EDITOR::Cfg3DPath(), DIALOG_FOOTPRINT_BOARD_EDITOR::Cfg3DPath(), PCB_BASE_EDIT_FRAME::CreateNewLibrary(), KICAD_MANAGER_FRAME::CreateNewProject(), DIALOG_PLOT_SCHEMATIC::createPlotFileName(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), FOOTPRINT_EDIT_FRAME::DeleteModuleFromLibrary(), DIALOG_BOARD_STATISTICS::DIALOG_BOARD_STATISTICS(), DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_SYMBOL_REMAP::DIALOG_SYMBOL_REMAP(), LIB_VIEW_FRAME::DisplayLibInfos(), CVPCB_MAINFRAME::DisplayStatus(), PCB_EDIT_FRAME::doAutoSave(), KICAD_MANAGER_CONTROL::Execute(), PCB_EDIT_FRAME::Export_IDF3(), LIB_CONTROL::ExportSymbolAsSVG(), LIB_CONTROL::ExportView(), PCB_EDIT_FRAME::ExportVRML_File(), PCB_EDIT_FRAME::Files_io_from_id(), PCB_EDIT_FRAME::GenD356File(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), FOOTPRINT_VIEWER_FRAME::getCurFootprintName(), LIB_EDIT_FRAME::GetCurLib(), FOOTPRINT_VIEWER_FRAME::getCurNickname(), SCH_BASE_FRAME::GetLibPart(), DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable(), KICAD_MANAGER_FRAME::GetProjectFileName(), LIB_VIEW_FRAME::GetSelectedSymbol(), FP_THREAD_IFACE::GetTable(), PCB_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::importFile(), SCH_EDITOR_CONTROL::ImportFPAssignments(), FOOTPRINT_EDIT_FRAME::initLibraryTree(), LIB_EDIT_FRAME::KiwayMailIn(), EDA_DRAW_FRAME::LibraryFileBrowser(), LIB_EDIT_FRAME::LoadComponentFromCurrentLib(), CVPCB_MAINFRAME::LoadFootprintFiles(), DIALOG_SPICE_MODEL::loadLibrary(), LIB_EDIT_FRAME::LoadOneSymbol(), KICAD_MANAGER_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadProjectFile(), CVPCB_MAINFRAME::LoadProjectFile(), PCB_EDIT_FRAME::LoadProjectSettings(), SCH_EDIT_FRAME::LoadSheetFromFile(), DIALOG_DRC_CONTROL::makeValidFileNameReport(), DIALOG_FOOTPRINT_FP_EDITOR::On3DModelCellChanged(), DIALOG_FOOTPRINT_BOARD_EDITOR::On3DModelCellChanged(), FOOTPRINT_VIEWER_FRAME::OnActivate(), DIALOG_FOOTPRINT_FP_EDITOR::OnAdd3DModel(), DIALOG_FOOTPRINT_BOARD_EDITOR::OnAdd3DModel(), DIALOG_SCH_SHEET_PROPS::OnBrowseClicked(), KICAD_MANAGER_FRAME::OnBrowseInFileExplorer(), DIALOG_DRC_CONTROL::OnButtonBrowseRptFileClick(), DIALOG_EDIT_COMPONENTS_LIBID::onClickOrphansButton(), SCH_EDIT_FRAME::OnCloseWindow(), DIALOG_GENDRILL::OnGenReportFile(), SCH_EDIT_FRAME::OnImportProject(), DIALOG_CHOOSE_COMPONENT::OnInitDialog(), SCH_EDIT_FRAME::OnOpenCvpcb(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), DIALOG_NETLIST::OnOpenNetlistClick(), SCH_EDIT_FRAME::OnOpenPcbnew(), DIALOG_EXPORT_SVG::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), DIALOG_GEN_FOOTPRINT_POSITION::OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), DIALOG_BOM::OnRunGenerator(), FOOTPRINT_EDIT_FRAME::OnSaveFootprintAsPng(), DIALOG_SPICE_MODEL::onSelectLibrary(), LIB_VIEW_FRAME::OnSelectSymbol(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), SCH_EDIT_FRAME::OnUpdatePCB(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), PANEL_PREV_3D::PANEL_PREV_3D(), SCH_EDITOR_CONTROL::Paste(), MODULE_EDITOR_TOOLS::PasteFootprint(), PCB_BASE_EDIT_FRAME::PCB_BASE_EDIT_FRAME(), SCH_DRAWING_TOOLS::PlaceComponent(), DIALOG_CHOOSE_COMPONENT::PopulateFootprintSelector(), SCH_EDIT_FRAME::Print(), SCH_EDIT_FRAME::PrintPage(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), LIB_VIEW_FRAME::ReCreateListCmp(), LIB_VIEW_FRAME::ReCreateListLib(), EDA_3D_VIEWER::ReloadRequest(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), SCH_EDIT_FRAME::RescueLegacyProject(), SCH_EDIT_FRAME::RescueSymbolLibTableProject(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), SCH_EDIT_FRAME::SaveEEFile(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary(), LIB_EDIT_FRAME::saveLibrary(), LIB_EDIT_FRAME::SaveOneSymbol(), LIB_EDIT_FRAME::savePartAs(), SCH_EDIT_FRAME::SaveProject(), CVPCB_MAINFRAME::SaveProjectFile(), SCH_EDIT_FRAME::SaveProjectSettings(), PCB_EDIT_FRAME::SaveProjectSettings(), DIALOG_BOARD_STATISTICS::saveReportClicked(), SCH_BASE_FRAME::saveSymbolLibTables(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), SCH_BASE_FRAME::SelectCompFromLibTree(), PCB_BASE_FRAME::SelectLibrary(), LIB_EDIT_FRAME::SelectLibraryFromList(), LIB_EDIT_FRAME::selectSymLibTable(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), LIB_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), LIB_EDIT_FRAME::SetCurPart(), KICAD_MANAGER_FRAME::SetProjectFileName(), EE_INSPECTION_TOOL::ShowDatasheet(), DIALOG_CHOOSE_COMPONENT::ShowFootprintFor(), LIB_VIEW_FRAME::ShowModal(), FOOTPRINT_VIEWER_FRAME::ShowModal(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), LIB_MANAGER::symTable(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), FOOTPRINT_EDIT_FRAME::SyncLibraryTree(), EDA_3D_VIEWER::takeScreenshot(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::TransferDataFromWindow(), NETLIST_DIALOG::TransferDataFromWindow(), DIALOG_FOOTPRINT_FP_EDITOR::TransferDataToWindow(), DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataToWindow(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::UpdateFieldsFromLibrary(), SIM_PLOT_FRAME::updateNetlistExporter(), SCH_SCREEN::UpdateSymbolLinks(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), FOOTPRINT_EDIT_FRAME::updateTitle(), SCH_EDIT_FRAME::UpdateTitle(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::Validate(), SCH_EDIT_FRAME::WriteNetListFile(), DIALOG_FOOTPRINT_BOARD_EDITOR::~DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::~DIALOG_FOOTPRINT_FP_EDITOR(), and PCB_BASE_EDIT_FRAME::~PCB_BASE_EDIT_FRAME().

◆ ProcessEvent()

bool EDA_BASE_FRAME::ProcessEvent ( wxEvent &  aEvent)
overrideinherited

Override 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 285 of file eda_base_frame.cpp.

286 {
287 #ifdef __WXMAC__
288  // Apple in its infinite wisdom will raise a disabled window before even passing
289  // us the event, so we have no way to stop it. Instead, we have to catch an
290  // improperly ordered disabled window and quasi-modal dialog here and reorder
291  // them.
292  if( !IsEnabled() && IsActive() )
293  {
294  wxWindow* dlg = findQuasiModalDialog();
295  if( dlg )
296  dlg->Raise();
297  }
298 #endif
299 
300  if( !wxFrame::ProcessEvent( aEvent ) )
301  return false;
302 
303  if( IsShown() && m_hasAutoSave && IsActive() &&
305  {
306  if( !m_autoSaveState )
307  {
308  wxLogTrace( traceAutoSave, wxT( "Starting auto save timer." ) );
309  m_autoSaveTimer->Start( m_autoSaveInterval * 1000, wxTIMER_ONE_SHOT );
310  m_autoSaveState = true;
311  }
312  else if( m_autoSaveTimer->IsRunning() )
313  {
314  wxLogTrace( traceAutoSave, wxT( "Stopping auto save timer." ) );
315  m_autoSaveTimer->Stop();
316  m_autoSaveState = false;
317  }
318  }
319 
320  return true;
321 }
const wxChar *const traceAutoSave
Flag to enable auto save feature debug tracing.
virtual bool isAutoSaveRequired() const
Return the auto save status of the application.
wxTimer * m_autoSaveTimer
wxWindow * findQuasiModalDialog()

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

Referenced by COMMON_TOOLS::GridProperties(), LIB_VIEW_FRAME::onSelectNextSymbol(), LIB_VIEW_FRAME::onSelectPreviousSymbol(), KIWAY::ProcessEvent(), and LIB_VIEW_FRAME::ReCreateListCmp().

◆ PushTool()

void EDA_BASE_FRAME::PushTool ( const std::string &  actionName)
virtualinherited

NB: the definition of "tool" is different at the user level.

The implementation uses a single TOOL_BASE derived class to implement several user "tools", such as rectangle and circle, or wire and bus. So each user-level tool is actually a TOOL_ACTION.

Definition at line 212 of file eda_base_frame.cpp.

213 {
214  m_toolStack.push_back( actionName );
215 
216  // Human cognitive stacking is very shallow; deeper tool stacks just get annoying
217  if( m_toolStack.size() > 3 )
218  m_toolStack.erase( m_toolStack.begin() );
219 
220  TOOL_ACTION* action = m_toolManager->GetActionManager()->FindAction( actionName );
221 
222  if( action )
223  DisplayToolMsg( action->GetLabel() );
224  else
225  DisplayToolMsg( actionName );
226 }
TOOL_ACTION * FindAction(const std::string &aActionName) const
Function FindAction() Finds an action with a given name (if there is one available).
virtual void DisplayToolMsg(const wxString &msg)
wxString GetLabel() const
Definition: tool_action.cpp:69
std::vector< std::string > m_toolStack
ACTION_MANAGER * GetActionManager()
Definition: tool_manager.h:163
TOOL_ACTION.
Definition: tool_action.h:46
TOOL_MANAGER * m_toolManager

References EDA_BASE_FRAME::DisplayToolMsg(), ACTION_MANAGER::FindAction(), TOOL_MANAGER::GetActionManager(), TOOL_ACTION::GetLabel(), EDA_BASE_FRAME::m_toolManager, and EDA_BASE_FRAME::m_toolStack.

Referenced by PCB_TOOL_BASE::doInteractiveItemPlacement(), DRAWING_TOOL::DrawArc(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::DrawLine(), MICROWAVE_TOOL::drawMicrowaveInductor(), SCH_LINE_WIRE_BUS_TOOL::DrawSegments(), LIB_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), ZOOM_TOOL::Main(), SCH_MOVE_TOOL::Main(), LIB_MOVE_TOOL::Main(), PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::MeasureTool(), GERBVIEW_SELECTION_TOOL::MeasureTool(), EDIT_TOOL::MeasureTool(), EDIT_TOOL::Move(), LIB_DRAWING_TOOLS::PlaceAnchor(), SCH_DRAWING_TOOLS::PlaceComponent(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PCB_EDITOR_CONTROL::PlaceModule(), PCB_EDITOR_CONTROL::PlaceTarget(), DRAWING_TOOL::PlaceText(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), LIB_DRAWING_TOOLS::TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().

◆ ReCreateMenuBar()

void EDA_BASE_FRAME::ReCreateMenuBar ( )
virtualinherited

◆ RefreshCanvas()

virtual void EDA_BASE_FRAME::RefreshCanvas ( )
inlinevirtualinherited

Notification to refresh the drawing canvas (if any).

Reimplemented in EDA_DRAW_FRAME.

Definition at line 473 of file eda_base_frame.h.

473 { };

Referenced by TOOL_MANAGER::ProcessEvent().

◆ RemoveShutdownBlockReason()

void EDA_BASE_FRAME::RemoveShutdownBlockReason ( )
inherited

Removes any shutdown block reason set.

Definition at line 184 of file eda_base_frame.cpp.

185 {
186 #if defined( _WIN32 )
187  // Windows: Destroys any block reason that may have existed
188  ShutdownBlockReasonDestroy( GetHandle() );
189 #endif
190 }

Referenced by EDA_BASE_FRAME::~EDA_BASE_FRAME().

◆ SaveProjectSettings()

virtual void EDA_BASE_FRAME::SaveProjectSettings ( bool  aAskForSave)
inlinevirtualinherited

Save 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 358 of file eda_base_frame.h.

358 {};

Referenced by DIALOG_PAGES_SETTINGS::OnOkClick().

◆ SaveSettings()

void EDA_BASE_FRAME::SaveSettings ( wxConfigBase *  aCfg)
virtualinherited

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 PCB_EDIT_FRAME, GERBVIEW_FRAME, EDA_DRAW_FRAME, PCB_BASE_FRAME, SCH_EDIT_FRAME, CVPCB_MAINFRAME, LIB_EDIT_FRAME, EDA_3D_VIEWER, FOOTPRINT_WIZARD_FRAME, SIM_PLOT_FRAME, BM2CMP_FRAME, KICAD_MANAGER_FRAME, FOOTPRINT_VIEWER_FRAME, LIB_VIEW_FRAME, PCB_CALCULATOR_FRAME, FOOTPRINT_EDIT_FRAME, and DISPLAY_FOOTPRINTS_FRAME.

Definition at line 539 of file eda_base_frame.cpp.

540 {
541  wxString text;
542 
543  if( IsIconized() )
544  return;
545 
546  wxString baseCfgName = ConfigBaseName();
547 
548  m_FrameSize = GetSize();
549  m_FramePos = GetPosition();
550 
551  text = baseCfgName + wxT( "Pos_x" );
552  aCfg->Write( text, (long) m_FramePos.x );
553 
554  text = baseCfgName + wxT( "Pos_y" );
555  aCfg->Write( text, (long) m_FramePos.y );
556 
557  text = baseCfgName + wxT( "Size_x" );
558  aCfg->Write( text, (long) m_FrameSize.x );
559 
560  text = baseCfgName + wxT( "Size_y" );
561  aCfg->Write( text, (long) m_FrameSize.y );
562 
563  text = baseCfgName + wxT( "Maximized" );
564  aCfg->Write( text, IsMaximized() );
565 
566  if( m_hasAutoSave )
567  {
568  text = baseCfgName + entryAutoSaveInterval;
569  aCfg->Write( text, m_autoSaveInterval );
570  }
571 
572  // Once this is fully implemented, wxAuiManager will be used to maintain
573  // the persistance of the main frame and all it's managed windows and
574  // all of the legacy frame persistence position code can be removed.
575  wxString perspective = m_auimgr.SavePerspective();
576 
577  // printf( "perspective(%s): %s\n",
578  // TO_UTF8( m_FrameName + entryPerspective ), TO_UTF8( perspective ) );
579  aCfg->Write( baseCfgName + entryPerspective, perspective );
580  aCfg->Write( baseCfgName + entryMruPath, m_mruPath );
581 }
wxString m_mruPath
wxString 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.
static const wxString entryMruPath
Configuration file entry for most recently used path.

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

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

◆ SetAutoSaveInterval()

void EDA_BASE_FRAME::SetAutoSaveInterval ( int  aInterval)
inherited

Definition at line 324 of file eda_base_frame.cpp.

325 {
326  m_autoSaveInterval = aInterval;
327 
328  if( m_autoSaveTimer->IsRunning() )
329  {
330  if( m_autoSaveInterval > 0 )
331  {
332  m_autoSaveTimer->Start( m_autoSaveInterval * 1000, wxTIMER_ONE_SHOT );
333  }
334  else
335  {
336  m_autoSaveTimer->Stop();
337  m_autoSaveState = false;
338  }
339  }
340 }
wxTimer * m_autoSaveTimer

References EDA_BASE_FRAME::m_autoSaveInterval, EDA_BASE_FRAME::m_autoSaveState, and EDA_BASE_FRAME::m_autoSaveTimer.

Referenced by EDA_DRAW_FRAME::CommonSettingsChanged().

◆ SetKiway()

void KIWAY_HOLDER::SetKiway ( wxWindow *  aDest,
KIWAY aKiway 
)
inherited

Function SetKiway.

Parameters
aDestis the recipient of aKiway pointer. It is only used for debugging, since "this" is not a wxWindow*. "this" is a KIWAY_HOLDER mix-in.
aKiwayis often from a parent window, or from KIFACE::CreateWindow().

Definition at line 42 of file kiway_holder.cpp.

43 {
44 #if defined(DEBUG)
45  // offer a trap point for debugging most any window
46  wxASSERT( aDest );
47  if( !strcmp( typeid(aDest).name(), "DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB" ) )
48  {
49  int breakhere=1;
50  (void) breakhere;
51  }
52 #endif
53 
54  (void) aDest;
55 
56  m_kiway = aKiway;
57 }
KIWAY * m_kiway
Definition: kiway_holder.h:81
const char * name
Definition: DXF_plotter.cpp:60

References KIWAY_HOLDER::m_kiway, and name.

Referenced by BM2CMP_FRAME::BM2CMP_FRAME(), InvokePcbLibTableEditor(), PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME(), and SIM_PLOT_FRAME::SIM_PLOT_FRAME().

◆ SetModal()

void KIWAY_PLAYER::SetModal ( bool  aIsModal)
inlineinherited

Definition at line 164 of file kiway_player.h.

164 { m_modal = aIsModal; }

References KIWAY_PLAYER::m_modal.

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

◆ SetMruPath()

void EDA_BASE_FRAME::SetMruPath ( const wxString &  aPath)
inlineinherited

Definition at line 398 of file eda_base_frame.h.

398 { m_mruPath = aPath; }
wxString m_mruPath

References EDA_BASE_FRAME::m_mruPath.

Referenced by PANEL_HOTKEYS_EDITOR::ImportHotKeys(), and KICAD_MANAGER_FRAME::LoadProject().

◆ SetShutdownBlockReason()

void EDA_BASE_FRAME::SetShutdownBlockReason ( const wxString &  reason)
inherited

Sets the block reason why the window/application is preventing OS shutdown.

This should be set far ahead of any close event.

This is mainly intended for Windows platforms where this is a native feature.

Definition at line 193 of file eda_base_frame.cpp.

194 {
195 #if defined( _WIN32 )
196  // Windows: sets up the pretty message on the shutdown page on why it's being "blocked"
197  // This is used in conjunction with handling WM_QUERYENDSESSION (wxCloseEvent)
198  // ShutdownBlockReasonCreate does not block by itself
199 
200  ShutdownBlockReasonDestroy( GetHandle() ); // Destroys any existing or nonexisting reason
201 
202  if( !ShutdownBlockReasonCreate( GetHandle(), aReason.wc_str() ) )
203  {
204  // Nothing bad happens if this fails, at worst it uses a generic application is preventing shutdown message
205  wxLogDebug( wxT( "ShutdownBlockReasonCreate failed to set reason: %s" ), aReason );
206  }
207 #endif
208 }

Referenced by CVPCB_MAINFRAME::CVPCB_MAINFRAME(), and SCH_EDIT_FRAME::OpenProjectFiles().

◆ SetUserUnits()

◆ ShowChangedLanguage()

void EDA_BASE_FRAME::ShowChangedLanguage ( )
virtualinherited

◆ ShowModal()

bool KIWAY_PLAYER::ShowModal ( wxString *  aResult = NULL,
wxWindow *  aResultantFocusWindow = NULL 
)
virtualinherited

Function ShowModal puts up this wxFrame as if it were a modal dialog, with all other instantiated wxFrames disabled until this KIWAY_PLAYER derivative calls DismissModal().

That is, behavior is similar to a modal dialog window. Not all KIWAY_PLAYERs use this interface, so don't call this unless the implementation knows how to call DismissModal() on a button click or double click or some special event which ends the modal behavior.

Parameters
aResultif not NULL, indicates a place to put a resultant string.
aResultantFocusWindowif not NULL, indicates what window to pass focus to on return.
Returns
bool - true if frame implementation called KIWAY_PLAYER::DismissModal() with aRetVal of true.

Reimplemented in FOOTPRINT_VIEWER_FRAME, and LIB_VIEW_FRAME.

Definition at line 75 of file kiway_player.cpp.

76 {
77  wxASSERT_MSG( IsModal(), wxT( "ShowModal() shouldn't be called on non-modal frame" ) );
78 
79  /*
80  This function has a nice interface but a necessarily unsightly implementation.
81  Now the implementation is encapsulated, localizing future changes.
82 
83  It works in tandem with DismissModal(). But only ShowModal() is in the
84  vtable and therefore cross-module capable.
85  */
86 
87  // This is an exception safe way to zero a pointer before returning.
88  // Yes, even though DismissModal() clears this first normally, this is
89  // here in case there's an exception before the dialog is dismissed.
90  struct NULLER
91  {
92  void*& m_what;
93  NULLER( void*& aPtr ) : m_what( aPtr ) {}
94  ~NULLER() { m_what = 0; } // indeed, set it to NULL on destruction
95  } clear_this( (void*&) m_modal_loop );
96 
97 
98  m_modal_resultant_parent = aResultantFocusWindow;
99 
100  Show( true );
101  Raise(); // Needed on some Window managers to always display the frame
102 
103  SetFocus();
104 
105  {
106  // We have to disable all frames but the the modal one.
107  // wxWindowDisabler does that, but it also disables all top level windows
108  // We do not want to disable top level windows which are child of the modal one,
109  // if they are enabled.
110  // An example is an aui toolbar which was moved
111  // or a dialog or another frame or miniframe opened by the modal one.
112  wxWindowList wlist = GetChildren();
113  std::vector<wxWindow*> enabledTopLevelWindows;
114 
115  for( unsigned ii = 0; ii < wlist.size(); ii++ )
116  if( wlist[ii]->IsTopLevel() && wlist[ii]->IsEnabled() )
117  enabledTopLevelWindows.push_back( wlist[ii] );
118 
119  // exception safe way to disable all top level windows except the modal one,
120  // re-enables only those that were disabled on exit
121  wxWindowDisabler toggle( this );
122 
123  for( unsigned ii = 0; ii < enabledTopLevelWindows.size(); ii++ )
124  enabledTopLevelWindows[ii]->Enable( true );
125 
126  WX_EVENT_LOOP event_loop;
127  m_modal_loop = &event_loop;
128  event_loop.Run();
129 
130  } // End of scope for some variables.
131  // End nesting before setting focus below.
132 
133  if( aResult )
134  *aResult = m_modal_string;
135 
136  if( aResultantFocusWindow )
137  {
138  aResultantFocusWindow->Raise();
139 
140  // have the final say, after wxWindowDisabler reenables my parent and
141  // the events settle down, set the focus
142  wxSafeYield();
143  aResultantFocusWindow->SetFocus();
144  }
145 
146  return m_modal_ret_val;
147 }
bool m_modal_ret_val
Definition: kiway_player.h:192
#define WX_EVENT_LOOP
Definition: kiway_player.h:41
wxWindow * m_modal_resultant_parent
Definition: kiway_player.h:190
wxString m_modal_string
Definition: kiway_player.h:191
bool IsModal()
Definition: kiway_player.h:163
WX_EVENT_LOOP * m_modal_loop
Definition: kiway_player.h:189

References KIWAY_PLAYER::IsModal(), KIWAY_PLAYER::m_modal_loop, KIWAY_PLAYER::m_modal_resultant_parent, KIWAY_PLAYER::m_modal_ret_val, KIWAY_PLAYER::m_modal_string, and WX_EVENT_LOOP.

Referenced by FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), TEXT_BUTTON_SYMBOL_CHOOSER::OnButtonClick(), TEXT_BUTTON_FP_CHOOSER::OnButtonClick(), DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick(), LIB_VIEW_FRAME::ShowModal(), FOOTPRINT_VIEWER_FRAME::ShowModal(), and DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint().

◆ SupportsShutdownBlockReason()

bool EDA_BASE_FRAME::SupportsShutdownBlockReason ( )
inherited

Whether or not the window supports setting a shutdown block reason.

Definition at line 174 of file eda_base_frame.cpp.

175 {
176 #if defined( _WIN32 )
177  return true;
178 #else
179  return false;
180 #endif
181 }

Referenced by FOOTPRINT_EDIT_FRAME::OnCloseWindow(), CVPCB_MAINFRAME::OnCloseWindow(), SCH_EDIT_FRAME::OnCloseWindow(), LIB_EDIT_FRAME::OnCloseWindow(), and EDA_BASE_FRAME::~EDA_BASE_FRAME().

◆ SyncToolbars()

virtual void EDA_BASE_FRAME::SyncToolbars ( )
inlinevirtualinherited

Update the toolbars (mostly settings/check buttons/checkboxes) with the current controller state.

Reimplemented in SCH_EDIT_FRAME, PCB_EDIT_FRAME, GERBVIEW_FRAME, LIB_EDIT_FRAME, CVPCB_MAINFRAME, FOOTPRINT_EDIT_FRAME, KICAD_MANAGER_FRAME, LIB_VIEW_FRAME, and DISPLAY_FOOTPRINTS_FRAME.

Definition at line 457 of file eda_base_frame.h.

457 { };

Referenced by EDA_DRAW_FRAME::RecreateToolbars(), PCB_BASE_EDIT_FRAME::SetGridVisibility(), and TOOL_MANAGER::UpdateUI().

◆ sys_search()

const SEARCH_STACK & EDA_BASE_FRAME::sys_search ( )
virtualinherited

Return a SEARCH_STACK pertaining to entire program.

This is overloaded in KICAD_MANAGER_FRAME

Reimplemented in KICAD_MANAGER_FRAME.

Definition at line 593 of file eda_base_frame.cpp.

594 {
595  return Kiface().KifaceSearch();
596 }
SEARCH_STACK & KifaceSearch()
Only for DSO specific 'non-library' files.
Definition: kiface_i.h:127
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.

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

Referenced by COMMON_CONTROL::ShowHelp().

◆ ToolStackIsEmpty()

◆ unitsChangeRefresh()

virtual void EDA_BASE_FRAME::unitsChangeRefresh ( )
inlineprotectedvirtualinherited

Called when when the units setting has changed to allow for any derived classes to handle refreshing and controls that have units based measurements in them.

The default version only updates the status bar. Don't forget to call the default in your derived class or the status bar will not get updated properly.

Reimplemented in PCB_BASE_EDIT_FRAME, GERBVIEW_FRAME, EDA_DRAW_FRAME, and PCB_BASE_FRAME.

Definition at line 197 of file eda_base_frame.h.

197 { }

Referenced by EDA_BASE_FRAME::ChangeUserUnits().

◆ UpdateFileHistory()

void EDA_BASE_FRAME::UpdateFileHistory ( const wxString &  FullFileName,
FILE_HISTORY aFileHistory = NULL 
)
inherited

Update the list of recently opened files.

The menu is also updated, if FILE_HISTORY::UseMenu was called at init time.

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

Definition at line 611 of file eda_base_frame.cpp.

612 {
613  FILE_HISTORY* fileHistory = aFileHistory;
614 
615  if( !fileHistory )
616  fileHistory = &Kiface().GetFileHistory();
617 
618  fileHistory->AddFileToHistory( FullFileName );
619 }
This class implements a file history object to store a list of files, that can then be added to a men...
Definition: filehistory.h:40
void AddFileToHistory(const wxString &aFile) override
Adds a file to the history.
Definition: filehistory.cpp:53
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
FILE_HISTORY & GetFileHistory()
Definition: kiface_i.h:123

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

Referenced by SCH_EDIT_FRAME::importFile(), GERBVIEW_FRAME::LoadExcellonFiles(), GERBVIEW_FRAME::LoadGerberJobFile(), GERBVIEW_FRAME::loadListOfGerberAndDrillFiles(), KICAD_MANAGER_FRAME::LoadProject(), KICAD_MANAGER_FRAME::OnCloseWindow(), SCH_EDIT_FRAME::OnCloseWindow(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::SavePcbFile(), and GERBVIEW_FRAME::unarchiveFiles().

◆ UpdateStatusBar()

virtual void EDA_BASE_FRAME::UpdateStatusBar ( )
inlinevirtualinherited

Update the status bar information.

The status bar can draw itself. This is not a drawing function per se, but rather updates lines of text held by the components within the status bar which is owned by the wxFrame.

Reimplemented in EDA_DRAW_FRAME, GERBVIEW_FRAME, SCH_BASE_FRAME, and PCB_BASE_FRAME.

Definition at line 451 of file eda_base_frame.h.

451 { }

Referenced by TOOL_MANAGER::UpdateUI().

Member Data Documentation

◆ KICAD_AUI_TB_STYLE

◆ m_AboutTitle

wxString EDA_BASE_FRAME::m_AboutTitle
protectedinherited

◆ m_actions

◆ m_addSignals

wxMenuItem* SIM_PLOT_FRAME_BASE::m_addSignals
protected

Definition at line 59 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME::SIM_PLOT_FRAME(), and SIM_PLOT_FRAME_BASE().

◆ m_auimgr

wxAuiManager EDA_BASE_FRAME::m_auimgr
protectedinherited

◆ m_autoSaveInterval

◆ m_autoSaveState

bool EDA_BASE_FRAME::m_autoSaveState
protectedinherited

◆ m_autoSaveTimer

wxTimer* EDA_BASE_FRAME::m_autoSaveTimer
protectedinherited

◆ m_configName

wxString EDA_BASE_FRAME::m_configName
protectedinherited

◆ m_cursors

wxListCtrl* SIM_PLOT_FRAME_BASE::m_cursors
protected

Definition at line 90 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME::onCursorUpdate(), and SIM_PLOT_FRAME_BASE().

◆ m_dragSelects

bool EDA_BASE_FRAME::m_dragSelects
protectedinherited

◆ m_fileMenu

wxMenu* SIM_PLOT_FRAME_BASE::m_fileMenu
protected

Definition at line 56 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_FramePos

◆ m_FrameSize

◆ m_hasAutoSave

bool EDA_BASE_FRAME::m_hasAutoSave
protectedinherited

◆ m_Ident

FRAME_T EDA_BASE_FRAME::m_Ident
protectedinherited

◆ m_immediateActions

bool EDA_BASE_FRAME::m_immediateActions
protectedinherited

◆ m_mainMenu

wxMenuBar* SIM_PLOT_FRAME_BASE::m_mainMenu
protected

◆ m_modal

bool KIWAY_PLAYER::m_modal
protectedinherited

Definition at line 188 of file kiway_player.h.

Referenced by KIWAY_PLAYER::IsModal(), and KIWAY_PLAYER::SetModal().

◆ m_modal_loop

WX_EVENT_LOOP* KIWAY_PLAYER::m_modal_loop
protectedinherited

◆ m_modal_resultant_parent

wxWindow* KIWAY_PLAYER::m_modal_resultant_parent
protectedinherited

Definition at line 190 of file kiway_player.h.

Referenced by KIWAY_PLAYER::ShowModal().

◆ m_modal_ret_val

bool KIWAY_PLAYER::m_modal_ret_val
protectedinherited

◆ m_modal_string

wxString KIWAY_PLAYER::m_modal_string
protectedinherited

Definition at line 191 of file kiway_player.h.

Referenced by KIWAY_PLAYER::DismissModal(), and KIWAY_PLAYER::ShowModal().

◆ m_moveWarpsCursor

bool EDA_BASE_FRAME::m_moveWarpsCursor
protectedinherited

◆ m_mruPath

◆ m_panelConsole

wxPanel* SIM_PLOT_FRAME_BASE::m_panelConsole
protected

Definition at line 77 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_panelCursors

wxPanel* SIM_PLOT_FRAME_BASE::m_panelCursors
protected

Definition at line 88 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_panelCursorsAndTune

wxPanel* SIM_PLOT_FRAME_BASE::m_panelCursorsAndTune
protected

Definition at line 86 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_panelLeft

wxPanel* SIM_PLOT_FRAME_BASE::m_panelLeft
protected

Definition at line 68 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_panelSignals

wxPanel* SIM_PLOT_FRAME_BASE::m_panelSignals
protected

Definition at line 83 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_perspective

wxString EDA_BASE_FRAME::m_perspective
protectedinherited

Definition at line 147 of file eda_base_frame.h.

Referenced by EDA_BASE_FRAME::LoadSettings().

◆ m_plotNotebook

◆ m_plotPanel

wxPanel* SIM_PLOT_FRAME_BASE::m_plotPanel
protected

Definition at line 71 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_probeSignals

wxMenuItem* SIM_PLOT_FRAME_BASE::m_probeSignals
protected

Definition at line 60 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME::SIM_PLOT_FRAME(), and SIM_PLOT_FRAME_BASE().

◆ m_runSimulation

wxMenuItem* SIM_PLOT_FRAME_BASE::m_runSimulation
protected

Definition at line 58 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME::SIM_PLOT_FRAME(), and SIM_PLOT_FRAME_BASE().

◆ m_settings

wxMenuItem* SIM_PLOT_FRAME_BASE::m_settings
protected

Definition at line 63 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME::SIM_PLOT_FRAME(), and SIM_PLOT_FRAME_BASE().

◆ m_showNetlist

wxMenuItem* SIM_PLOT_FRAME_BASE::m_showNetlist
protected

Definition at line 62 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME::SIM_PLOT_FRAME(), and SIM_PLOT_FRAME_BASE().

◆ m_sidePanel

wxPanel* SIM_PLOT_FRAME_BASE::m_sidePanel
protected

Definition at line 80 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_sideSizer

wxBoxSizer* SIM_PLOT_FRAME_BASE::m_sideSizer
protected

Definition at line 81 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_signals

◆ m_simConsole

wxTextCtrl* SIM_PLOT_FRAME_BASE::m_simConsole
protected

◆ m_simulationMenu

wxMenu* SIM_PLOT_FRAME_BASE::m_simulationMenu
protected

Definition at line 57 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_sizer11

wxBoxSizer* SIM_PLOT_FRAME_BASE::m_sizer11
protected

Definition at line 69 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_sizer8

wxBoxSizer* SIM_PLOT_FRAME_BASE::m_sizer8
protected

Definition at line 75 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_sizerConsole

wxBoxSizer* SIM_PLOT_FRAME_BASE::m_sizerConsole
protected

Definition at line 78 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_sizerMain

wxBoxSizer* SIM_PLOT_FRAME_BASE::m_sizerMain
protected

Definition at line 65 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_sizerPlot

wxBoxSizer* SIM_PLOT_FRAME_BASE::m_sizerPlot
protected

Definition at line 72 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_splitterLeftRight

wxSplitterWindow* SIM_PLOT_FRAME_BASE::m_splitterLeftRight
protected

◆ m_splitterPlotAndConsole

wxSplitterWindow* SIM_PLOT_FRAME_BASE::m_splitterPlotAndConsole
protected

◆ m_splitterSignals

wxSplitterWindow* SIM_PLOT_FRAME_BASE::m_splitterSignals
protected

◆ m_splitterTuneValues

wxSplitterWindow* SIM_PLOT_FRAME_BASE::m_splitterTuneValues
protected

◆ m_staticText2

wxStaticText* SIM_PLOT_FRAME_BASE::m_staticText2
protected

Definition at line 84 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_staticText3

wxStaticText* SIM_PLOT_FRAME_BASE::m_staticText3
protected

Definition at line 89 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_staticText4

wxStaticText* SIM_PLOT_FRAME_BASE::m_staticText4
protected

Definition at line 92 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_staticTextInfo

wxStaticText* SIM_PLOT_FRAME_BASE::m_staticTextInfo
protected

Definition at line 76 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_toolBar

wxToolBar* SIM_PLOT_FRAME_BASE::m_toolBar
protected

◆ m_toolManager

TOOL_MANAGER* EDA_BASE_FRAME::m_toolManager
protectedinherited

Definition at line 129 of file eda_base_frame.h.

Referenced by PCB_BASE_FRAME::ActivateGalCanvas(), GERBVIEW_FRAME::ActivateGalCanvas(), SCH_EDIT_FRAME::AddJunction(), EDA_BASE_FRAME::AddStandardHelpMenu(), EDA_DRAW_FRAME::AddStandardSubMenus(), SCH_EDIT_FRAME::AppendSchematic(), GERBVIEW_FRAME::Clear_DrawLayers(), SCH_EDIT_FRAME::ConvertPart(), SCH_EDIT_FRAME::ConvertTextType(), EDA_3D_VIEWER::CreateMenuBar(), LIB_EDIT_FRAME::CreateNewPart(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), LIB_VIEW_FRAME::DClickOnCmpList(), SCH_EDIT_FRAME::DeleteJunction(), SCH_EDIT_FRAME::DisplayCurrentSheet(), LIB_EDIT_FRAME::emptyScreen(), GERBVIEW_FRAME::Erase_Current_DrawLayer(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), SCH_EDIT_FRAME::ExecuteRemoteCommand(), FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME(), LIB_EDIT_FRAME::GetComponentFromRedoList(), LIB_EDIT_FRAME::GetComponentFromUndoList(), EDA_BASE_FRAME::GetToolManager(), SCH_EDIT_FRAME::importFile(), PCB_EDIT_FRAME::KiwayMailIn(), SCH_EDIT_FRAME::KiwayMailIn(), LIB_EDIT_FRAME::LoadComponentFromCurrentLib(), LIB_EDIT_FRAME::LoadOneLibraryPartAux(), LIB_EDIT_FRAME::LoadOneSymbol(), GERBVIEW_FRAME::OnCloseWindow(), LIB_EDIT_FRAME::OnExportBody(), LIB_EDIT_FRAME::OnImportBody(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), EDA_DRAW_FRAME::OnSelectGrid(), LIB_EDIT_FRAME::OnSelectUnit(), EDA_DRAW_FRAME::OnSelectZoom(), SCH_EDIT_FRAME::OpenProjectFiles(), EDA_BASE_FRAME::PopTool(), EDA_BASE_FRAME::PushTool(), SCH_EDIT_FRAME::PutDataInPreviousState(), KICAD_MANAGER_FRAME::ReCreateMenuBar(), LIB_VIEW_FRAME::ReCreateMenuBar(), FOOTPRINT_VIEWER_FRAME::ReCreateMenuBar(), FOOTPRINT_EDIT_FRAME::ReCreateMenuBar(), LIB_EDIT_FRAME::ReCreateMenuBar(), CVPCB_MAINFRAME::ReCreateMenuBar(), GERBVIEW_FRAME::ReCreateMenuBar(), SCH_EDIT_FRAME::ReCreateMenuBar(), PCB_EDIT_FRAME::ReCreateMenuBar(), CVPCB_MAINFRAME::refreshAfterComponentSearch(), SCH_BASE_FRAME::RefreshSelection(), FOOTPRINT_WIZARD_FRAME::ReloadFootprint(), LIB_EDIT_FRAME::RollbackPartFromUndo(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), LIB_EDIT_FRAME::saveLibrary(), SCH_EDIT_FRAME::SchematicCleanUp(), GERBVIEW_FRAME::SetActiveLayer(), PCB_BASE_EDIT_FRAME::SetBoard(), LIB_EDIT_FRAME::SetCurPart(), SCH_BASE_FRAME::SetScreen(), LIB_VIEW_FRAME::SetSelectedComponent(), FOOTPRINT_EDIT_FRAME::setupTools(), LIB_VIEW_FRAME::setupTools(), GERBVIEW_FRAME::setupTools(), LIB_EDIT_FRAME::setupTools(), CVPCB_MAINFRAME::setupTools(), SCH_EDIT_FRAME::setupTools(), PCB_BASE_EDIT_FRAME::unitsChangeRefresh(), DISPLAY_FOOTPRINTS_FRAME::updateView(), FOOTPRINT_WIZARD_FRAME::updateView(), FOOTPRINT_VIEWER_FRAME::updateView(), FOOTPRINT_EDIT_FRAME::updateView(), EDA_DRAW_FRAME::Zoom_Automatique(), CVPCB_MAINFRAME::~CVPCB_MAINFRAME(), DISPLAY_FOOTPRINTS_FRAME::~DISPLAY_FOOTPRINTS_FRAME(), EDA_DRAW_FRAME::~EDA_DRAW_FRAME(), FOOTPRINT_WIZARD_FRAME::~FOOTPRINT_WIZARD_FRAME(), and KICAD_MANAGER_FRAME::~KICAD_MANAGER_FRAME().

◆ m_toolStack

std::vector<std::string> EDA_BASE_FRAME::m_toolStack
protectedinherited

◆ m_tunePanel

wxPanel* SIM_PLOT_FRAME_BASE::m_tunePanel
protected

◆ m_tuneSizer

wxBoxSizer* SIM_PLOT_FRAME_BASE::m_tuneSizer
protected

Definition at line 93 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME::AddTuner(), and SIM_PLOT_FRAME_BASE().

◆ m_tuneValue

wxMenuItem* SIM_PLOT_FRAME_BASE::m_tuneValue
protected

Definition at line 61 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME::SIM_PLOT_FRAME(), and SIM_PLOT_FRAME_BASE().

◆ m_userUnits

◆ m_viewMenu

wxMenu* SIM_PLOT_FRAME_BASE::m_viewMenu
protected

Definition at line 64 of file sim_plot_frame_base.h.

Referenced by SIM_PLOT_FRAME_BASE().

◆ m_welcomePanel

wxPanel* SIM_PLOT_FRAME_BASE::m_welcomePanel
protected

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