2016-08-11 12:41:01 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2022-12-07 21:34:33 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
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
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2019-11-20 14:48:08 +00:00
|
|
|
#pragma once
|
2016-08-11 12:41:01 +00:00
|
|
|
|
2020-04-15 01:51:58 +00:00
|
|
|
#include <wx/artprov.h>
|
2021-03-08 15:31:02 +00:00
|
|
|
#include <wx/xrc/xmlres.h>
|
|
|
|
#include <wx/intl.h>
|
2022-10-25 02:35:45 +00:00
|
|
|
class wxListView;
|
|
|
|
|
2021-06-30 00:13:10 +00:00
|
|
|
#include "sim_workbook.h"
|
2021-03-08 15:31:02 +00:00
|
|
|
#include "kiway_player.h"
|
|
|
|
#include <wx/string.h>
|
2016-08-11 12:41:01 +00:00
|
|
|
#include <wx/bitmap.h>
|
2020-04-15 01:51:58 +00:00
|
|
|
#include <wx/image.h>
|
2021-03-08 15:31:02 +00:00
|
|
|
#include <wx/icon.h>
|
2016-08-11 12:41:01 +00:00
|
|
|
#include <wx/menu.h>
|
2022-10-25 02:35:45 +00:00
|
|
|
#include <wx/gdicmn.h>
|
2021-03-08 15:31:02 +00:00
|
|
|
#include <wx/font.h>
|
|
|
|
#include <wx/colour.h>
|
2016-08-11 12:41:01 +00:00
|
|
|
#include <wx/settings.h>
|
2021-03-08 15:31:02 +00:00
|
|
|
#include <wx/toolbar.h>
|
|
|
|
#include <wx/aui/auibook.h>
|
2016-08-11 12:41:35 +00:00
|
|
|
#include <wx/sizer.h>
|
2021-03-08 15:31:02 +00:00
|
|
|
#include <wx/panel.h>
|
|
|
|
#include <wx/textctrl.h>
|
2016-08-11 12:42:00 +00:00
|
|
|
#include <wx/splitter.h>
|
2020-04-15 01:51:58 +00:00
|
|
|
#include <wx/stattext.h>
|
2021-03-08 15:31:02 +00:00
|
|
|
#include <wx/listctrl.h>
|
|
|
|
#include <wx/frame.h>
|
2016-08-11 12:41:01 +00:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2022-12-07 22:32:50 +00:00
|
|
|
#define ID_SAVE_AS_IMAGE 1000
|
|
|
|
#define ID_SAVE_AS_CSV 1001
|
|
|
|
#define ID_MENU_RUN_SIM 1002
|
|
|
|
#define ID_MENU_ADD_SIGNAL 1003
|
|
|
|
#define ID_MENU_PROBE_SIGNALS 1004
|
|
|
|
#define ID_MENU_TUNE_SIGNALS 1005
|
|
|
|
#define ID_MENU_SHOW_NETLIST 1006
|
|
|
|
#define ID_MENU_SET_SIMUL 1007
|
|
|
|
#define ID_MENU_SHOW_GRID 1008
|
|
|
|
#define ID_MENU_SHOW_LEGEND 1009
|
|
|
|
#define ID_MENU_DOTTED 1010
|
|
|
|
#define ID_MENU_WHITE_BG 1011
|
2016-08-11 12:41:01 +00:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
/// Class SIM_PLOT_FRAME_BASE
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
class SIM_PLOT_FRAME_BASE : public KIWAY_PLAYER
|
|
|
|
{
|
|
|
|
private:
|
2019-11-20 14:48:08 +00:00
|
|
|
|
2016-08-11 12:41:01 +00:00
|
|
|
protected:
|
2016-08-11 12:41:22 +00:00
|
|
|
wxMenuBar* m_mainMenu;
|
|
|
|
wxMenu* m_fileMenu;
|
2016-08-11 12:42:00 +00:00
|
|
|
wxMenu* m_simulationMenu;
|
2016-08-11 12:42:13 +00:00
|
|
|
wxMenuItem* m_runSimulation;
|
|
|
|
wxMenuItem* m_addSignals;
|
|
|
|
wxMenuItem* m_probeSignals;
|
|
|
|
wxMenuItem* m_tuneValue;
|
2018-03-03 16:36:26 +00:00
|
|
|
wxMenuItem* m_showNetlist;
|
2021-07-11 00:06:11 +00:00
|
|
|
wxMenuItem* m_boardAdapter;
|
2016-08-11 12:41:22 +00:00
|
|
|
wxMenu* m_viewMenu;
|
2016-12-02 14:34:23 +00:00
|
|
|
wxBoxSizer* m_sizerMain;
|
2016-08-11 12:42:00 +00:00
|
|
|
wxToolBar* m_toolBar;
|
2016-12-02 14:34:23 +00:00
|
|
|
wxSplitterWindow* m_splitterLeftRight;
|
|
|
|
wxPanel* m_panelLeft;
|
2016-08-11 12:42:02 +00:00
|
|
|
wxBoxSizer* m_sizer11;
|
2016-12-02 14:34:23 +00:00
|
|
|
wxSplitterWindow* m_splitterPlotAndConsole;
|
2016-08-11 12:42:01 +00:00
|
|
|
wxPanel* m_plotPanel;
|
2016-12-02 14:34:23 +00:00
|
|
|
wxBoxSizer* m_sizerPlot;
|
2021-06-30 00:13:10 +00:00
|
|
|
SIM_WORKBOOK* m_workbook;
|
2016-12-02 14:34:23 +00:00
|
|
|
wxPanel* m_panelConsole;
|
|
|
|
wxBoxSizer* m_sizerConsole;
|
2016-08-11 12:41:35 +00:00
|
|
|
wxTextCtrl* m_simConsole;
|
2016-08-11 12:42:01 +00:00
|
|
|
wxPanel* m_sidePanel;
|
|
|
|
wxBoxSizer* m_sideSizer;
|
2016-12-02 14:34:23 +00:00
|
|
|
wxSplitterWindow* m_splitterSignals;
|
|
|
|
wxPanel* m_panelSignals;
|
2020-03-17 07:20:32 +00:00
|
|
|
wxStaticText* m_staticTextSignals;
|
2016-08-29 09:39:54 +00:00
|
|
|
wxListView* m_signals;
|
2016-12-02 14:34:23 +00:00
|
|
|
wxPanel* m_panelCursorsAndTune;
|
|
|
|
wxSplitterWindow* m_splitterTuneValues;
|
|
|
|
wxPanel* m_panelCursors;
|
2020-03-17 07:20:32 +00:00
|
|
|
wxStaticText* m_staticTextCursors;
|
2016-08-11 12:41:26 +00:00
|
|
|
wxListCtrl* m_cursors;
|
2016-12-02 07:58:01 +00:00
|
|
|
wxPanel* m_tunePanel;
|
2020-03-17 07:20:32 +00:00
|
|
|
wxStaticText* m_staticTextTune;
|
2016-08-11 12:41:45 +00:00
|
|
|
wxBoxSizer* m_tuneSizer;
|
2019-11-20 14:48:08 +00:00
|
|
|
|
2022-10-25 02:35:45 +00:00
|
|
|
// Virtual event handlers, override them in your derived class
|
2016-08-11 12:41:22 +00:00
|
|
|
virtual void menuNewPlot( wxCommandEvent& event ) { event.Skip(); }
|
|
|
|
virtual void menuOpenWorkbook( wxCommandEvent& event ) { event.Skip(); }
|
|
|
|
virtual void menuSaveWorkbook( wxCommandEvent& event ) { event.Skip(); }
|
2021-05-04 22:35:04 +00:00
|
|
|
virtual void menuSaveWorkbookAs( wxCommandEvent& event ) { event.Skip(); }
|
2022-12-07 22:32:50 +00:00
|
|
|
virtual void menuSaveImage( wxCommandEvent& event ) { event.Skip(); }
|
|
|
|
virtual void menuSaveCsv( wxCommandEvent& event ) { event.Skip(); }
|
2016-08-11 12:41:22 +00:00
|
|
|
virtual void menuExit( wxCommandEvent& event ) { event.Skip(); }
|
2021-07-11 00:06:11 +00:00
|
|
|
virtual void menuSimulateUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
|
|
|
virtual void menuAddSignalsUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
|
|
|
virtual void menuProbeUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
|
|
|
virtual void menuTuneUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
2016-08-11 12:41:22 +00:00
|
|
|
virtual void menuZoomIn( wxCommandEvent& event ) { event.Skip(); }
|
|
|
|
virtual void menuZoomOut( wxCommandEvent& event ) { event.Skip(); }
|
|
|
|
virtual void menuZoomFit( wxCommandEvent& event ) { event.Skip(); }
|
|
|
|
virtual void menuShowGrid( wxCommandEvent& event ) { event.Skip(); }
|
2016-08-11 12:41:27 +00:00
|
|
|
virtual void menuShowGridUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
|
|
|
virtual void menuShowLegend( wxCommandEvent& event ) { event.Skip(); }
|
|
|
|
virtual void menuShowLegendUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
2019-11-19 16:17:37 +00:00
|
|
|
virtual void menuShowDotted( wxCommandEvent& event ) { event.Skip(); }
|
|
|
|
virtual void menuShowDottedUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
2020-02-01 12:05:44 +00:00
|
|
|
virtual void menuWhiteBackground( wxCommandEvent& event ) { event.Skip(); }
|
|
|
|
virtual void menuShowWhiteBackgroundUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
2021-05-11 23:27:34 +00:00
|
|
|
virtual void onPlotDragged( wxAuiNotebookEvent& event ) { event.Skip(); }
|
2016-08-11 12:42:07 +00:00
|
|
|
virtual void onPlotChanged( wxAuiNotebookEvent& event ) { event.Skip(); }
|
|
|
|
virtual void onPlotClose( wxAuiNotebookEvent& event ) { event.Skip(); }
|
2021-05-11 23:27:34 +00:00
|
|
|
virtual void onPlotClosed( wxAuiNotebookEvent& event ) { event.Skip(); }
|
2016-08-29 09:39:54 +00:00
|
|
|
virtual void onSignalDblClick( wxMouseEvent& event ) { event.Skip(); }
|
|
|
|
virtual void onSignalRClick( wxListEvent& event ) { event.Skip(); }
|
2023-01-19 12:44:47 +00:00
|
|
|
virtual void onCursorRClick( wxListEvent& event ) { event.Skip(); }
|
2019-11-20 14:48:08 +00:00
|
|
|
|
|
|
|
|
2016-08-11 12:41:01 +00:00
|
|
|
public:
|
2019-11-20 14:48:08 +00:00
|
|
|
|
2020-03-17 07:20:32 +00:00
|
|
|
SIM_PLOT_FRAME_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Spice Simulator"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 564,531 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL, const wxString& name = wxT("SIM_PLOT_FRAME") );
|
2019-11-20 14:48:08 +00:00
|
|
|
|
2016-08-11 12:41:16 +00:00
|
|
|
~SIM_PLOT_FRAME_BASE();
|
2019-11-20 14:48:08 +00:00
|
|
|
|
2016-12-02 14:34:23 +00:00
|
|
|
void m_splitterLeftRightOnIdle( wxIdleEvent& )
|
2016-08-11 12:42:00 +00:00
|
|
|
{
|
2016-12-02 14:34:23 +00:00
|
|
|
m_splitterLeftRight->SetSashPosition( 700 );
|
|
|
|
m_splitterLeftRight->Disconnect( wxEVT_IDLE, wxIdleEventHandler( SIM_PLOT_FRAME_BASE::m_splitterLeftRightOnIdle ), NULL, this );
|
2016-08-11 12:42:00 +00:00
|
|
|
}
|
2019-11-20 14:48:08 +00:00
|
|
|
|
2016-12-02 14:34:23 +00:00
|
|
|
void m_splitterPlotAndConsoleOnIdle( wxIdleEvent& )
|
2016-08-11 12:42:00 +00:00
|
|
|
{
|
2016-12-02 14:34:23 +00:00
|
|
|
m_splitterPlotAndConsole->SetSashPosition( 500 );
|
|
|
|
m_splitterPlotAndConsole->Disconnect( wxEVT_IDLE, wxIdleEventHandler( SIM_PLOT_FRAME_BASE::m_splitterPlotAndConsoleOnIdle ), NULL, this );
|
2016-08-11 12:42:00 +00:00
|
|
|
}
|
2019-11-20 14:48:08 +00:00
|
|
|
|
2016-12-02 14:34:23 +00:00
|
|
|
void m_splitterSignalsOnIdle( wxIdleEvent& )
|
2016-12-02 07:58:01 +00:00
|
|
|
{
|
2016-12-02 14:34:23 +00:00
|
|
|
m_splitterSignals->SetSashPosition( 0 );
|
|
|
|
m_splitterSignals->Disconnect( wxEVT_IDLE, wxIdleEventHandler( SIM_PLOT_FRAME_BASE::m_splitterSignalsOnIdle ), NULL, this );
|
2016-12-02 07:58:01 +00:00
|
|
|
}
|
2019-11-20 14:48:08 +00:00
|
|
|
|
2016-12-02 14:34:23 +00:00
|
|
|
void m_splitterTuneValuesOnIdle( wxIdleEvent& )
|
2016-12-02 07:58:01 +00:00
|
|
|
{
|
2016-12-02 14:34:23 +00:00
|
|
|
m_splitterTuneValues->SetSashPosition( 0 );
|
|
|
|
m_splitterTuneValues->Disconnect( wxEVT_IDLE, wxIdleEventHandler( SIM_PLOT_FRAME_BASE::m_splitterTuneValuesOnIdle ), NULL, this );
|
2016-12-02 07:58:01 +00:00
|
|
|
}
|
2019-11-20 14:48:08 +00:00
|
|
|
|
2016-08-11 12:41:01 +00:00
|
|
|
};
|
|
|
|
|