2016-08-11 12:41:01 +00:00
///////////////////////////////////////////////////////////////////////////
2022-10-25 02:35:45 +00:00
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5)
2016-08-11 12:41:01 +00:00
// http://www.wxformbuilder.org/
//
2018-07-29 15:27:11 +00:00
// PLEASE DO *NOT* EDIT THIS FILE!
2016-08-11 12:41:01 +00:00
///////////////////////////////////////////////////////////////////////////
# include "sim_plot_frame_base.h"
///////////////////////////////////////////////////////////////////////////
2016-08-11 12:41:16 +00:00
SIM_PLOT_FRAME_BASE : : SIM_PLOT_FRAME_BASE ( wxWindow * parent , wxWindowID id , const wxString & title , const wxPoint & pos , const wxSize & size , long style , const wxString & name ) : KIWAY_PLAYER ( parent , id , title , pos , size , style , name )
2016-08-11 12:41:01 +00:00
{
2019-08-05 06:47:38 +00:00
this - > SetSizeHints ( wxSize ( - 1 , - 1 ) , wxDefaultSize ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:41:22 +00:00
m_mainMenu = new wxMenuBar ( 0 ) ;
m_fileMenu = new wxMenu ( ) ;
2016-08-11 12:41:28 +00:00
wxMenuItem * m_newPlot ;
m_newPlot = new wxMenuItem ( m_fileMenu , wxID_NEW , wxString ( _ ( " New Plot " ) ) , wxEmptyString , wxITEM_NORMAL ) ;
m_fileMenu - > Append ( m_newPlot ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:41:22 +00:00
m_fileMenu - > AppendSeparator ( ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:41:28 +00:00
wxMenuItem * m_openWorkbook ;
2021-05-09 23:32:49 +00:00
m_openWorkbook = new wxMenuItem ( m_fileMenu , wxID_OPEN , wxString ( _ ( " Open... " ) ) , wxEmptyString , wxITEM_NORMAL ) ;
2016-08-11 12:41:28 +00:00
m_fileMenu - > Append ( m_openWorkbook ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:41:28 +00:00
wxMenuItem * m_saveWorkbook ;
2021-05-09 23:32:49 +00:00
m_saveWorkbook = new wxMenuItem ( m_fileMenu , wxID_SAVE , wxString ( _ ( " Save " ) ) , wxEmptyString , wxITEM_NORMAL ) ;
2016-08-11 12:41:28 +00:00
m_fileMenu - > Append ( m_saveWorkbook ) ;
2019-11-20 14:48:08 +00:00
2021-05-04 22:35:04 +00:00
wxMenuItem * m_saveWorkbookAs ;
2021-07-03 14:24:44 +00:00
m_saveWorkbookAs = new wxMenuItem ( m_fileMenu , wxID_SAVEAS , wxString ( _ ( " Save As... " ) ) + wxT ( ' \t ' ) + wxT ( " SHIFT+CTRL+S " ) , wxEmptyString , wxITEM_NORMAL ) ;
2021-05-04 22:35:04 +00:00
m_fileMenu - > Append ( m_saveWorkbookAs ) ;
2016-08-11 12:41:22 +00:00
m_fileMenu - > AppendSeparator ( ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:41:28 +00:00
wxMenuItem * m_saveImage ;
2019-04-14 17:52:49 +00:00
m_saveImage = new wxMenuItem ( m_fileMenu , ID_SAVE_AS_IMAGE , wxString ( _ ( " Save as Image " ) ) , wxEmptyString , wxITEM_NORMAL ) ;
2016-08-11 12:41:28 +00:00
m_fileMenu - > Append ( m_saveImage ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:41:28 +00:00
wxMenuItem * m_saveCsv ;
2019-04-14 13:31:32 +00:00
m_saveCsv = new wxMenuItem ( m_fileMenu , ID_SAVE_AS_CSV , wxString ( _ ( " Save as .csv File " ) ) , wxEmptyString , wxITEM_NORMAL ) ;
2016-08-11 12:41:28 +00:00
m_fileMenu - > Append ( m_saveCsv ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:41:28 +00:00
m_fileMenu - > AppendSeparator ( ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:41:28 +00:00
wxMenuItem * m_exitSim ;
2021-05-11 23:27:34 +00:00
m_exitSim = new wxMenuItem ( m_fileMenu , wxID_CLOSE , wxString ( _ ( " Close " ) ) + wxT ( ' \t ' ) + wxT ( " CTRL+W " ) , wxEmptyString , wxITEM_NORMAL ) ;
2016-08-11 12:41:28 +00:00
m_fileMenu - > Append ( m_exitSim ) ;
2019-11-20 14:48:08 +00:00
m_mainMenu - > Append ( m_fileMenu , _ ( " File " ) ) ;
2016-08-11 12:42:00 +00:00
m_simulationMenu = new wxMenu ( ) ;
2021-06-02 17:44:57 +00:00
m_runSimulation = new wxMenuItem ( m_simulationMenu , ID_MENU_RUN_SIM , wxString ( _ ( " Run Simulation " ) ) + wxT ( ' \t ' ) + wxT ( " Ctrl+R " ) , wxEmptyString , wxITEM_NORMAL ) ;
2016-08-11 12:42:00 +00:00
m_simulationMenu - > Append ( m_runSimulation ) ;
2021-07-11 18:31:50 +00:00
m_runSimulation - > Enable ( false ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:42:00 +00:00
m_simulationMenu - > AppendSeparator ( ) ;
2019-11-20 14:48:08 +00:00
2021-06-02 17:44:57 +00:00
m_addSignals = new wxMenuItem ( m_simulationMenu , ID_MENU_ADD_SIGNAL , wxString ( _ ( " Add Signals... " ) ) + wxT ( ' \t ' ) + wxT ( " Ctrl+A " ) , wxEmptyString , wxITEM_NORMAL ) ;
2016-08-11 12:42:00 +00:00
m_simulationMenu - > Append ( m_addSignals ) ;
2021-07-11 18:31:50 +00:00
m_addSignals - > Enable ( false ) ;
2019-11-20 14:48:08 +00:00
2021-06-02 17:44:57 +00:00
m_probeSignals = new wxMenuItem ( m_simulationMenu , ID_MENU_PROBE_SIGNALS , wxString ( _ ( " Probe from schematics " ) ) + wxT ( ' \t ' ) + wxT ( " Ctrl+P " ) , wxEmptyString , wxITEM_NORMAL ) ;
2016-08-11 12:42:00 +00:00
m_simulationMenu - > Append ( m_probeSignals ) ;
2021-07-11 18:31:50 +00:00
m_probeSignals - > Enable ( false ) ;
2019-11-20 14:48:08 +00:00
2021-06-02 17:44:57 +00:00
m_tuneValue = new wxMenuItem ( m_simulationMenu , ID_MENU_TUNE_SIGNALS , wxString ( _ ( " Tune Component Value " ) ) + wxT ( ' \t ' ) + wxT ( " Ctrl+T " ) , wxEmptyString , wxITEM_NORMAL ) ;
2016-08-11 12:42:00 +00:00
m_simulationMenu - > Append ( m_tuneValue ) ;
2021-07-11 18:31:50 +00:00
m_tuneValue - > Enable ( false ) ;
2019-11-20 14:48:08 +00:00
2019-04-14 13:31:32 +00:00
m_simulationMenu - > AppendSeparator ( ) ;
2019-11-20 14:48:08 +00:00
2019-04-14 13:31:32 +00:00
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 ) ;
2018-03-03 16:36:26 +00:00
m_simulationMenu - > Append ( m_showNetlist ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:42:00 +00:00
m_simulationMenu - > AppendSeparator ( ) ;
2019-11-20 14:48:08 +00:00
2021-07-11 00:06:11 +00:00
m_boardAdapter = new wxMenuItem ( m_simulationMenu , ID_MENU_SET_SIMUL , wxString ( _ ( " Settings... " ) ) , wxEmptyString , wxITEM_NORMAL ) ;
m_simulationMenu - > Append ( m_boardAdapter ) ;
2019-11-20 14:48:08 +00:00
m_mainMenu - > Append ( m_simulationMenu , _ ( " Simulation " ) ) ;
2016-08-11 12:41:22 +00:00
m_viewMenu = new wxMenu ( ) ;
2016-08-11 12:41:27 +00:00
wxMenuItem * m_zoomIn ;
m_zoomIn = new wxMenuItem ( m_viewMenu , wxID_ZOOM_IN , wxString ( _ ( " Zoom In " ) ) , wxEmptyString , wxITEM_NORMAL ) ;
m_viewMenu - > Append ( m_zoomIn ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:41:27 +00:00
wxMenuItem * m_zoomOut ;
m_zoomOut = new wxMenuItem ( m_viewMenu , wxID_ZOOM_OUT , wxString ( _ ( " Zoom Out " ) ) , wxEmptyString , wxITEM_NORMAL ) ;
m_viewMenu - > Append ( m_zoomOut ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:41:27 +00:00
wxMenuItem * m_zoomFit ;
m_zoomFit = new wxMenuItem ( m_viewMenu , wxID_ZOOM_FIT , wxString ( _ ( " Fit on Screen " ) ) , wxEmptyString , wxITEM_NORMAL ) ;
m_viewMenu - > Append ( m_zoomFit ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:41:22 +00:00
m_viewMenu - > AppendSeparator ( ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:41:27 +00:00
wxMenuItem * m_showGrid ;
2019-04-14 17:52:49 +00:00
m_showGrid = new wxMenuItem ( m_viewMenu , ID_MENU_SHOW_GRID , wxString ( _ ( " Show &Grid " ) ) , wxEmptyString , wxITEM_CHECK ) ;
2016-08-11 12:41:27 +00:00
m_viewMenu - > Append ( m_showGrid ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:41:27 +00:00
wxMenuItem * m_showLegend ;
2019-04-14 13:31:32 +00:00
m_showLegend = new wxMenuItem ( m_viewMenu , ID_MENU_SHOW_LEGEND , wxString ( _ ( " Show &Legend " ) ) , wxEmptyString , wxITEM_CHECK ) ;
2016-08-11 12:41:27 +00:00
m_viewMenu - > Append ( m_showLegend ) ;
2019-11-20 14:48:08 +00:00
2019-11-19 16:17:37 +00:00
m_viewMenu - > AppendSeparator ( ) ;
wxMenuItem * m_showDotted ;
2020-01-06 23:35:45 +00:00
m_showDotted = new wxMenuItem ( m_viewMenu , ID_MENU_DOTTED , wxString ( _ ( " Dotted Current/Phase " ) ) , wxEmptyString , wxITEM_CHECK ) ;
2019-11-19 16:17:37 +00:00
m_viewMenu - > Append ( m_showDotted ) ;
2020-02-01 12:05:44 +00:00
wxMenuItem * m_showWhiteBackground ;
m_showWhiteBackground = new wxMenuItem ( m_viewMenu , ID_MENU_WHITE_BG , wxString ( _ ( " White Background " ) ) , wxEmptyString , wxITEM_CHECK ) ;
m_viewMenu - > Append ( m_showWhiteBackground ) ;
2019-11-20 14:48:08 +00:00
m_mainMenu - > Append ( m_viewMenu , _ ( " View " ) ) ;
2016-08-11 12:41:22 +00:00
this - > SetMenuBar ( m_mainMenu ) ;
2019-11-20 14:48:08 +00:00
2016-12-02 14:34:23 +00:00
m_sizerMain = new wxBoxSizer ( wxVERTICAL ) ;
2019-11-20 14:48:08 +00:00
m_toolBar = new wxToolBar ( this , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxTB_FLAT | wxTB_HORIZONTAL | wxTB_TEXT ) ;
m_toolBar - > Realize ( ) ;
2016-12-02 14:34:23 +00:00
m_sizerMain - > Add ( m_toolBar , 0 , wxEXPAND , 5 ) ;
2019-11-20 14:48:08 +00:00
m_splitterLeftRight = new wxSplitterWindow ( this , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxSP_3DSASH | wxSP_LIVE_UPDATE | wxBORDER_NONE ) ;
2016-12-02 14:34:23 +00:00
m_splitterLeftRight - > SetSashGravity ( 0.7 ) ;
m_splitterLeftRight - > Connect ( wxEVT_IDLE , wxIdleEventHandler ( SIM_PLOT_FRAME_BASE : : m_splitterLeftRightOnIdle ) , NULL , this ) ;
m_splitterLeftRight - > SetMinimumPaneSize ( 50 ) ;
2019-11-20 14:48:08 +00:00
2016-12-02 14:34:23 +00:00
m_panelLeft = new wxPanel ( m_splitterLeftRight , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxTAB_TRAVERSAL ) ;
m_panelLeft - > SetMinSize ( wxSize ( 300 , - 1 ) ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:42:02 +00:00
m_sizer11 = new wxBoxSizer ( wxVERTICAL ) ;
2019-11-20 14:48:08 +00:00
2019-08-05 06:47:38 +00:00
m_splitterPlotAndConsole = new wxSplitterWindow ( m_panelLeft , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxSP_3DSASH | wxSP_LIVE_UPDATE ) ;
2016-12-02 14:34:23 +00:00
m_splitterPlotAndConsole - > SetSashGravity ( 0.8 ) ;
m_splitterPlotAndConsole - > Connect ( wxEVT_IDLE , wxIdleEventHandler ( SIM_PLOT_FRAME_BASE : : m_splitterPlotAndConsoleOnIdle ) , NULL , this ) ;
m_splitterPlotAndConsole - > SetMinimumPaneSize ( 50 ) ;
2019-11-20 14:48:08 +00:00
2016-12-02 14:34:23 +00:00
m_plotPanel = new wxPanel ( m_splitterPlotAndConsole , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxTAB_TRAVERSAL ) ;
2022-10-25 02:35:45 +00:00
m_plotPanel - > SetMinSize ( wxSize ( - 1 , 200 ) ) ;
2019-11-20 14:48:08 +00:00
2016-12-02 14:34:23 +00:00
m_sizerPlot = new wxBoxSizer ( wxHORIZONTAL ) ;
2019-11-20 14:48:08 +00:00
2021-09-08 21:32:37 +00:00
m_workbook = new SIM_WORKBOOK ( m_plotPanel , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxAUI_NB_CLOSE_ON_ALL_TABS | wxAUI_NB_MIDDLE_CLICK_CLOSE | wxAUI_NB_TAB_MOVE | wxAUI_NB_TOP ) ;
2021-06-30 00:13:10 +00:00
m_workbook - > SetMinSize ( wxSize ( 200 , - 1 ) ) ;
2019-11-20 14:48:08 +00:00
2021-06-30 00:13:10 +00:00
m_sizerPlot - > Add ( m_workbook , 1 , wxEXPAND , 5 ) ;
2019-11-20 14:48:08 +00:00
2016-12-02 14:34:23 +00:00
m_plotPanel - > SetSizer ( m_sizerPlot ) ;
2016-08-11 12:42:01 +00:00
m_plotPanel - > Layout ( ) ;
2016-12-02 14:34:23 +00:00
m_sizerPlot - > Fit ( m_plotPanel ) ;
m_panelConsole = new wxPanel ( m_splitterPlotAndConsole , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxTAB_TRAVERSAL ) ;
m_panelConsole - > SetMinSize ( wxSize ( - 1 , 100 ) ) ;
2019-11-20 14:48:08 +00:00
2016-12-02 14:34:23 +00:00
m_sizerConsole = new wxBoxSizer ( wxVERTICAL ) ;
2019-11-20 14:48:08 +00:00
2016-12-02 14:34:23 +00:00
m_simConsole = new wxTextCtrl ( m_panelConsole , wxID_ANY , wxEmptyString , wxDefaultPosition , wxDefaultSize , wxTE_DONTWRAP | wxTE_MULTILINE | wxTE_READONLY ) ;
m_simConsole - > SetFont ( wxFont ( wxNORMAL_FONT - > GetPointSize ( ) , wxFONTFAMILY_TELETYPE , wxFONTSTYLE_NORMAL , wxFONTWEIGHT_NORMAL , false , wxEmptyString ) ) ;
2021-03-08 15:31:02 +00:00
m_simConsole - > SetMinSize ( wxSize ( - 1 , 100 ) ) ;
2019-11-20 14:48:08 +00:00
2019-08-05 06:47:38 +00:00
m_sizerConsole - > Add ( m_simConsole , 1 , wxEXPAND , 5 ) ;
2019-11-20 14:48:08 +00:00
2016-12-02 14:34:23 +00:00
m_panelConsole - > SetSizer ( m_sizerConsole ) ;
m_panelConsole - > Layout ( ) ;
m_sizerConsole - > Fit ( m_panelConsole ) ;
m_splitterPlotAndConsole - > SplitHorizontally ( m_plotPanel , m_panelConsole , 500 ) ;
m_sizer11 - > Add ( m_splitterPlotAndConsole , 1 , wxEXPAND , 5 ) ;
2019-11-20 14:48:08 +00:00
2016-12-02 14:34:23 +00:00
m_panelLeft - > SetSizer ( m_sizer11 ) ;
m_panelLeft - > Layout ( ) ;
m_sizer11 - > Fit ( m_panelLeft ) ;
m_sidePanel = new wxPanel ( m_splitterLeftRight , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxTAB_TRAVERSAL ) ;
m_sidePanel - > SetMinSize ( wxSize ( 200 , - 1 ) ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:42:01 +00:00
m_sideSizer = new wxBoxSizer ( wxVERTICAL ) ;
2019-11-20 14:48:08 +00:00
2019-08-05 06:47:38 +00:00
m_splitterSignals = new wxSplitterWindow ( m_sidePanel , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxSP_3DSASH | wxSP_LIVE_UPDATE ) ;
m_splitterSignals - > SetSashGravity ( 0.33 ) ;
2016-12-02 14:34:23 +00:00
m_splitterSignals - > Connect ( wxEVT_IDLE , wxIdleEventHandler ( SIM_PLOT_FRAME_BASE : : m_splitterSignalsOnIdle ) , NULL , this ) ;
m_splitterSignals - > SetMinimumPaneSize ( 20 ) ;
2019-11-20 14:48:08 +00:00
2016-12-02 14:34:23 +00:00
m_panelSignals = new wxPanel ( m_splitterSignals , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxTAB_TRAVERSAL ) ;
2020-03-17 07:20:32 +00:00
m_panelSignals - > SetMinSize ( wxSize ( - 1 , 100 ) ) ;
2019-08-05 06:47:38 +00:00
wxBoxSizer * bSizer10 ;
bSizer10 = new wxBoxSizer ( wxVERTICAL ) ;
2019-11-20 14:48:08 +00:00
2020-03-17 07:20:32 +00:00
m_staticTextSignals = new wxStaticText ( m_panelSignals , wxID_ANY , _ ( " Signals " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_staticTextSignals - > Wrap ( - 1 ) ;
2021-03-08 15:31:02 +00:00
bSizer10 - > Add ( m_staticTextSignals , 0 , wxTOP | wxRIGHT , 5 ) ;
2019-11-20 14:48:08 +00:00
2019-08-05 06:47:38 +00:00
m_signals = new wxListView ( m_panelSignals , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxLC_REPORT | wxLC_SINGLE_SEL ) ;
bSizer10 - > Add ( m_signals , 1 , wxEXPAND , 5 ) ;
2019-11-20 14:48:08 +00:00
2019-08-05 06:47:38 +00:00
m_panelSignals - > SetSizer ( bSizer10 ) ;
2016-12-02 14:34:23 +00:00
m_panelSignals - > Layout ( ) ;
2019-08-05 06:47:38 +00:00
bSizer10 - > Fit ( m_panelSignals ) ;
2016-12-02 14:34:23 +00:00
m_panelCursorsAndTune = new wxPanel ( m_splitterSignals , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxTAB_TRAVERSAL ) ;
m_panelCursorsAndTune - > SetMinSize ( wxSize ( - 1 , 300 ) ) ;
2019-11-20 14:48:08 +00:00
2016-12-02 07:58:01 +00:00
wxBoxSizer * bSizer9 ;
bSizer9 = new wxBoxSizer ( wxVERTICAL ) ;
2019-11-20 14:48:08 +00:00
m_splitterTuneValues = new wxSplitterWindow ( m_panelCursorsAndTune , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxSP_3DSASH | wxSP_LIVE_UPDATE | wxBORDER_NONE ) ;
2016-12-02 14:34:23 +00:00
m_splitterTuneValues - > SetSashGravity ( 0.5 ) ;
m_splitterTuneValues - > Connect ( wxEVT_IDLE , wxIdleEventHandler ( SIM_PLOT_FRAME_BASE : : m_splitterTuneValuesOnIdle ) , NULL , this ) ;
m_splitterTuneValues - > SetMinimumPaneSize ( 20 ) ;
2019-11-20 14:48:08 +00:00
2016-12-02 14:34:23 +00:00
m_panelCursors = new wxPanel ( m_splitterTuneValues , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxTAB_TRAVERSAL ) ;
2020-03-17 07:20:32 +00:00
m_panelCursors - > SetMinSize ( wxSize ( - 1 , 100 ) ) ;
2019-08-05 06:47:38 +00:00
wxBoxSizer * bSizer12 ;
bSizer12 = new wxBoxSizer ( wxVERTICAL ) ;
2019-11-20 14:48:08 +00:00
2020-03-17 07:20:32 +00:00
m_staticTextCursors = new wxStaticText ( m_panelCursors , wxID_ANY , _ ( " Cursors " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_staticTextCursors - > Wrap ( - 1 ) ;
2021-03-08 15:31:02 +00:00
bSizer12 - > Add ( m_staticTextCursors , 0 , wxTOP | wxRIGHT , 5 ) ;
2019-11-20 14:48:08 +00:00
2019-08-05 06:47:38 +00:00
m_cursors = new wxListCtrl ( m_panelCursors , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxLC_HRULES | wxLC_REPORT | wxLC_SINGLE_SEL ) ;
bSizer12 - > Add ( m_cursors , 1 , wxEXPAND , 5 ) ;
2019-11-20 14:48:08 +00:00
2019-08-05 06:47:38 +00:00
m_panelCursors - > SetSizer ( bSizer12 ) ;
2016-12-02 14:34:23 +00:00
m_panelCursors - > Layout ( ) ;
2019-08-05 06:47:38 +00:00
bSizer12 - > Fit ( m_panelCursors ) ;
2016-12-02 14:34:23 +00:00
m_tunePanel = new wxPanel ( m_splitterTuneValues , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxTAB_TRAVERSAL ) ;
2020-03-17 07:20:32 +00:00
m_tunePanel - > SetMinSize ( wxSize ( - 1 , 100 ) ) ;
2019-08-05 06:47:38 +00:00
wxBoxSizer * bSizer13 ;
bSizer13 = new wxBoxSizer ( wxVERTICAL ) ;
2019-11-20 14:48:08 +00:00
2020-03-17 07:20:32 +00:00
m_staticTextTune = new wxStaticText ( m_tunePanel , wxID_ANY , _ ( " Tune " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_staticTextTune - > Wrap ( - 1 ) ;
2021-03-08 15:31:02 +00:00
bSizer13 - > Add ( m_staticTextTune , 0 , wxTOP | wxRIGHT , 5 ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:41:45 +00:00
m_tuneSizer = new wxBoxSizer ( wxHORIZONTAL ) ;
2019-11-20 14:48:08 +00:00
2019-08-05 06:47:38 +00:00
bSizer13 - > Add ( m_tuneSizer , 1 , wxEXPAND , 5 ) ;
2019-11-20 14:48:08 +00:00
2019-08-05 06:47:38 +00:00
m_tunePanel - > SetSizer ( bSizer13 ) ;
2016-12-02 07:58:01 +00:00
m_tunePanel - > Layout ( ) ;
2019-08-05 06:47:38 +00:00
bSizer13 - > Fit ( m_tunePanel ) ;
2016-12-02 14:34:23 +00:00
m_splitterTuneValues - > SplitHorizontally ( m_panelCursors , m_tunePanel , 0 ) ;
bSizer9 - > Add ( m_splitterTuneValues , 1 , wxEXPAND , 5 ) ;
2019-11-20 14:48:08 +00:00
2016-12-02 14:34:23 +00:00
m_panelCursorsAndTune - > SetSizer ( bSizer9 ) ;
m_panelCursorsAndTune - > Layout ( ) ;
bSizer9 - > Fit ( m_panelCursorsAndTune ) ;
m_splitterSignals - > SplitHorizontally ( m_panelSignals , m_panelCursorsAndTune , 0 ) ;
m_sideSizer - > Add ( m_splitterSignals , 1 , wxEXPAND , 5 ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:42:01 +00:00
m_sidePanel - > SetSizer ( m_sideSizer ) ;
m_sidePanel - > Layout ( ) ;
m_sideSizer - > Fit ( m_sidePanel ) ;
2016-12-02 14:34:23 +00:00
m_splitterLeftRight - > SplitVertically ( m_panelLeft , m_sidePanel , 700 ) ;
m_sizerMain - > Add ( m_splitterLeftRight , 1 , wxEXPAND , 5 ) ;
2019-11-20 14:48:08 +00:00
2016-12-02 14:34:23 +00:00
this - > SetSizer ( m_sizerMain ) ;
2016-08-11 12:41:01 +00:00
this - > Layout ( ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:41:01 +00:00
this - > Centre ( wxBOTH ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:41:01 +00:00
// Connect Events
2019-11-20 14:48:08 +00:00
m_fileMenu - > Bind ( wxEVT_COMMAND_MENU_SELECTED , wxCommandEventHandler ( SIM_PLOT_FRAME_BASE : : menuNewPlot ) , this , m_newPlot - > GetId ( ) ) ;
m_fileMenu - > Bind ( wxEVT_COMMAND_MENU_SELECTED , wxCommandEventHandler ( SIM_PLOT_FRAME_BASE : : menuOpenWorkbook ) , this , m_openWorkbook - > GetId ( ) ) ;
m_fileMenu - > Bind ( wxEVT_COMMAND_MENU_SELECTED , wxCommandEventHandler ( SIM_PLOT_FRAME_BASE : : menuSaveWorkbook ) , this , m_saveWorkbook - > GetId ( ) ) ;
2021-05-04 22:35:04 +00:00
m_fileMenu - > Bind ( wxEVT_COMMAND_MENU_SELECTED , wxCommandEventHandler ( SIM_PLOT_FRAME_BASE : : menuSaveWorkbookAs ) , this , m_saveWorkbookAs - > GetId ( ) ) ;
2019-11-20 14:48:08 +00:00
m_fileMenu - > Bind ( wxEVT_COMMAND_MENU_SELECTED , wxCommandEventHandler ( SIM_PLOT_FRAME_BASE : : menuSaveImage ) , this , m_saveImage - > GetId ( ) ) ;
m_fileMenu - > Bind ( wxEVT_COMMAND_MENU_SELECTED , wxCommandEventHandler ( SIM_PLOT_FRAME_BASE : : menuSaveCsv ) , this , m_saveCsv - > GetId ( ) ) ;
m_fileMenu - > Bind ( wxEVT_COMMAND_MENU_SELECTED , wxCommandEventHandler ( SIM_PLOT_FRAME_BASE : : menuExit ) , this , m_exitSim - > GetId ( ) ) ;
2021-07-11 00:06:11 +00:00
this - > Connect ( m_runSimulation - > GetId ( ) , wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( SIM_PLOT_FRAME_BASE : : menuSimulateUpdate ) ) ;
this - > Connect ( m_addSignals - > GetId ( ) , wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( SIM_PLOT_FRAME_BASE : : menuAddSignalsUpdate ) ) ;
this - > Connect ( m_probeSignals - > GetId ( ) , wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( SIM_PLOT_FRAME_BASE : : menuProbeUpdate ) ) ;
this - > Connect ( m_tuneValue - > GetId ( ) , wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( SIM_PLOT_FRAME_BASE : : menuTuneUpdate ) ) ;
2019-11-20 14:48:08 +00:00
m_viewMenu - > Bind ( wxEVT_COMMAND_MENU_SELECTED , wxCommandEventHandler ( SIM_PLOT_FRAME_BASE : : menuZoomIn ) , this , m_zoomIn - > GetId ( ) ) ;
m_viewMenu - > Bind ( wxEVT_COMMAND_MENU_SELECTED , wxCommandEventHandler ( SIM_PLOT_FRAME_BASE : : menuZoomOut ) , this , m_zoomOut - > GetId ( ) ) ;
m_viewMenu - > Bind ( wxEVT_COMMAND_MENU_SELECTED , wxCommandEventHandler ( SIM_PLOT_FRAME_BASE : : menuZoomFit ) , this , m_zoomFit - > GetId ( ) ) ;
m_viewMenu - > Bind ( wxEVT_COMMAND_MENU_SELECTED , wxCommandEventHandler ( SIM_PLOT_FRAME_BASE : : menuShowGrid ) , this , m_showGrid - > GetId ( ) ) ;
2016-08-11 12:41:27 +00:00
this - > Connect ( m_showGrid - > GetId ( ) , wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( SIM_PLOT_FRAME_BASE : : menuShowGridUpdate ) ) ;
2019-11-20 14:48:08 +00:00
m_viewMenu - > Bind ( wxEVT_COMMAND_MENU_SELECTED , wxCommandEventHandler ( SIM_PLOT_FRAME_BASE : : menuShowLegend ) , this , m_showLegend - > GetId ( ) ) ;
2016-08-11 12:41:27 +00:00
this - > Connect ( m_showLegend - > GetId ( ) , wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( SIM_PLOT_FRAME_BASE : : menuShowLegendUpdate ) ) ;
2019-11-19 16:17:37 +00:00
m_viewMenu - > Bind ( wxEVT_COMMAND_MENU_SELECTED , wxCommandEventHandler ( SIM_PLOT_FRAME_BASE : : menuShowDotted ) , this , m_showDotted - > GetId ( ) ) ;
this - > Connect ( m_showDotted - > GetId ( ) , wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( SIM_PLOT_FRAME_BASE : : menuShowDottedUpdate ) ) ;
2020-02-01 12:05:44 +00:00
m_viewMenu - > Bind ( wxEVT_COMMAND_MENU_SELECTED , wxCommandEventHandler ( SIM_PLOT_FRAME_BASE : : menuWhiteBackground ) , this , m_showWhiteBackground - > GetId ( ) ) ;
this - > Connect ( m_showWhiteBackground - > GetId ( ) , wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( SIM_PLOT_FRAME_BASE : : menuShowWhiteBackgroundUpdate ) ) ;
2021-06-30 00:13:10 +00:00
m_workbook - > Connect ( wxEVT_COMMAND_AUINOTEBOOK_END_DRAG , wxAuiNotebookEventHandler ( SIM_PLOT_FRAME_BASE : : onPlotDragged ) , NULL , this ) ;
m_workbook - > Connect ( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED , wxAuiNotebookEventHandler ( SIM_PLOT_FRAME_BASE : : onPlotChanged ) , NULL , this ) ;
m_workbook - > Connect ( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE , wxAuiNotebookEventHandler ( SIM_PLOT_FRAME_BASE : : onPlotClose ) , NULL , this ) ;
m_workbook - > Connect ( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED , wxAuiNotebookEventHandler ( SIM_PLOT_FRAME_BASE : : onPlotClosed ) , NULL , this ) ;
2016-08-29 09:39:54 +00:00
m_signals - > Connect ( wxEVT_LEFT_DCLICK , wxMouseEventHandler ( SIM_PLOT_FRAME_BASE : : onSignalDblClick ) , NULL , this ) ;
m_signals - > Connect ( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK , wxListEventHandler ( SIM_PLOT_FRAME_BASE : : onSignalRClick ) , NULL , this ) ;
2016-08-11 12:41:01 +00:00
}
SIM_PLOT_FRAME_BASE : : ~ SIM_PLOT_FRAME_BASE ( )
{
2016-08-11 12:41:01 +00:00
// Disconnect Events
2021-07-11 00:06:11 +00:00
this - > Disconnect ( ID_MENU_RUN_SIM , wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( SIM_PLOT_FRAME_BASE : : menuSimulateUpdate ) ) ;
this - > Disconnect ( ID_MENU_ADD_SIGNAL , wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( SIM_PLOT_FRAME_BASE : : menuAddSignalsUpdate ) ) ;
this - > Disconnect ( ID_MENU_PROBE_SIGNALS , wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( SIM_PLOT_FRAME_BASE : : menuProbeUpdate ) ) ;
this - > Disconnect ( ID_MENU_TUNE_SIGNALS , wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( SIM_PLOT_FRAME_BASE : : menuTuneUpdate ) ) ;
2019-04-14 13:31:32 +00:00
this - > Disconnect ( ID_MENU_SHOW_GRID , wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( SIM_PLOT_FRAME_BASE : : menuShowGridUpdate ) ) ;
this - > Disconnect ( ID_MENU_SHOW_LEGEND , wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( SIM_PLOT_FRAME_BASE : : menuShowLegendUpdate ) ) ;
2019-11-19 16:17:37 +00:00
this - > Disconnect ( ID_MENU_DOTTED , wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( SIM_PLOT_FRAME_BASE : : menuShowDottedUpdate ) ) ;
2020-02-01 12:05:44 +00:00
this - > Disconnect ( ID_MENU_WHITE_BG , wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( SIM_PLOT_FRAME_BASE : : menuShowWhiteBackgroundUpdate ) ) ;
2021-06-30 00:13:10 +00:00
m_workbook - > Disconnect ( wxEVT_COMMAND_AUINOTEBOOK_END_DRAG , wxAuiNotebookEventHandler ( SIM_PLOT_FRAME_BASE : : onPlotDragged ) , NULL , this ) ;
m_workbook - > Disconnect ( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED , wxAuiNotebookEventHandler ( SIM_PLOT_FRAME_BASE : : onPlotChanged ) , NULL , this ) ;
m_workbook - > Disconnect ( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE , wxAuiNotebookEventHandler ( SIM_PLOT_FRAME_BASE : : onPlotClose ) , NULL , this ) ;
m_workbook - > Disconnect ( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED , wxAuiNotebookEventHandler ( SIM_PLOT_FRAME_BASE : : onPlotClosed ) , NULL , this ) ;
2016-08-29 09:39:54 +00:00
m_signals - > Disconnect ( wxEVT_LEFT_DCLICK , wxMouseEventHandler ( SIM_PLOT_FRAME_BASE : : onSignalDblClick ) , NULL , this ) ;
m_signals - > Disconnect ( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK , wxListEventHandler ( SIM_PLOT_FRAME_BASE : : onSignalRClick ) , NULL , this ) ;
2019-11-20 14:48:08 +00:00
2016-08-11 12:41:01 +00:00
}