Fixed menu entries
This commit is contained in:
parent
ca13dc93b1
commit
2c576afdf3
|
@ -129,6 +129,12 @@ SIM_PLOT_FRAME::SIM_PLOT_FRAME( KIWAY* aKiway, wxWindow* aParent )
|
|||
Connect( m_toolTune->GetId(), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( SIM_PLOT_FRAME::onTune ), NULL, this );
|
||||
Connect( m_toolSettings->GetId(), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( SIM_PLOT_FRAME::onSettings ), NULL, this );
|
||||
|
||||
Bind( wxEVT_COMMAND_MENU_SELECTED, &SIM_PLOT_FRAME::onSimulate, this, m_runSimulation->GetId() );
|
||||
Bind( wxEVT_COMMAND_MENU_SELECTED, &SIM_PLOT_FRAME::onAddSignal, this, m_addSignals->GetId() );
|
||||
Bind( wxEVT_COMMAND_MENU_SELECTED, &SIM_PLOT_FRAME::onProbe, this, m_probeSignals->GetId() );
|
||||
Bind( wxEVT_COMMAND_MENU_SELECTED, &SIM_PLOT_FRAME::onTune, this, m_tuneValue->GetId() );
|
||||
Bind( wxEVT_COMMAND_MENU_SELECTED, &SIM_PLOT_FRAME::onSettings, this, m_settings->GetId() );
|
||||
|
||||
m_toolBar->Realize();
|
||||
m_plotNotebook->SetPageText(0, _("Welcome!") );
|
||||
}
|
||||
|
|
|
@ -48,29 +48,24 @@ SIM_PLOT_FRAME_BASE::SIM_PLOT_FRAME_BASE( wxWindow* parent, wxWindowID id, const
|
|||
m_mainMenu->Append( m_fileMenu, _("File") );
|
||||
|
||||
m_simulationMenu = new wxMenu();
|
||||
wxMenuItem* m_runSimulation;
|
||||
m_runSimulation = new wxMenuItem( m_simulationMenu, wxID_NEW, wxString( _("Run Simulation") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_runSimulation = new wxMenuItem( m_simulationMenu, wxID_ANY, wxString( _("Run Simulation") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_simulationMenu->Append( m_runSimulation );
|
||||
|
||||
m_simulationMenu->AppendSeparator();
|
||||
|
||||
wxMenuItem* m_addSignals;
|
||||
m_addSignals = new wxMenuItem( m_simulationMenu, wxID_OPEN, wxString( _("Add signals...") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_addSignals = new wxMenuItem( m_simulationMenu, wxID_ANY, wxString( _("Add signals...") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_simulationMenu->Append( m_addSignals );
|
||||
|
||||
wxMenuItem* m_probeSignals;
|
||||
m_probeSignals = new wxMenuItem( m_simulationMenu, wxID_SAVE, wxString( _("Probe from schematics") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_probeSignals = new wxMenuItem( m_simulationMenu, wxID_ANY, wxString( _("Probe from schematics") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_simulationMenu->Append( m_probeSignals );
|
||||
|
||||
wxMenuItem* m_tuneValue;
|
||||
m_tuneValue = new wxMenuItem( m_simulationMenu, wxID_ANY, wxString( _("Tune component value") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_simulationMenu->Append( m_tuneValue );
|
||||
|
||||
m_simulationMenu->AppendSeparator();
|
||||
|
||||
wxMenuItem* m_exitSim1;
|
||||
m_exitSim1 = new wxMenuItem( m_simulationMenu, wxID_CLOSE, wxString( _("Settings...") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_simulationMenu->Append( m_exitSim1 );
|
||||
m_settings = new wxMenuItem( m_simulationMenu, wxID_ANY, wxString( _("Settings...") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_simulationMenu->Append( m_settings );
|
||||
|
||||
m_mainMenu->Append( m_simulationMenu, _("Simulation") );
|
||||
|
||||
|
@ -233,11 +228,6 @@ SIM_PLOT_FRAME_BASE::SIM_PLOT_FRAME_BASE( wxWindow* parent, wxWindowID id, const
|
|||
this->Connect( m_saveImage->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveImage ) );
|
||||
this->Connect( m_saveCsv->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveCsv ) );
|
||||
this->Connect( m_exitSim->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuExit ) );
|
||||
this->Connect( m_runSimulation->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuNewPlot ) );
|
||||
this->Connect( m_addSignals->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuOpenWorkbook ) );
|
||||
this->Connect( m_probeSignals->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveWorkbook ) );
|
||||
this->Connect( m_tuneValue->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveImage ) );
|
||||
this->Connect( m_exitSim1->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuExit ) );
|
||||
this->Connect( m_zoomIn->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomIn ) );
|
||||
this->Connect( m_zoomOut->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomOut ) );
|
||||
this->Connect( m_zoomFit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomFit ) );
|
||||
|
@ -260,11 +250,6 @@ SIM_PLOT_FRAME_BASE::~SIM_PLOT_FRAME_BASE()
|
|||
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveImage ) );
|
||||
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveCsv ) );
|
||||
this->Disconnect( wxID_CLOSE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuExit ) );
|
||||
this->Disconnect( wxID_NEW, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuNewPlot ) );
|
||||
this->Disconnect( wxID_OPEN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuOpenWorkbook ) );
|
||||
this->Disconnect( wxID_SAVE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveWorkbook ) );
|
||||
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveImage ) );
|
||||
this->Disconnect( wxID_CLOSE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuExit ) );
|
||||
this->Disconnect( wxID_ZOOM_IN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomIn ) );
|
||||
this->Disconnect( wxID_ZOOM_OUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomOut ) );
|
||||
this->Disconnect( wxID_ZOOM_FIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomFit ) );
|
||||
|
|
|
@ -133,7 +133,7 @@
|
|||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="wxMenu" expanded="0">
|
||||
<object class="wxMenu" expanded="1">
|
||||
<property name="label">File</property>
|
||||
<property name="name">m_fileMenu</property>
|
||||
<property name="permission">protected</property>
|
||||
|
@ -240,7 +240,7 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="wxMenu" expanded="0">
|
||||
<object class="wxMenu" expanded="1">
|
||||
<property name="label">Simulation</property>
|
||||
<property name="name">m_simulationMenu</property>
|
||||
<property name="permission">protected</property>
|
||||
|
@ -249,14 +249,14 @@
|
|||
<property name="checked">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="help"></property>
|
||||
<property name="id">wxID_NEW</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">Run Simulation</property>
|
||||
<property name="name">m_runSimulation</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="shortcut"></property>
|
||||
<property name="unchecked_bitmap"></property>
|
||||
<event name="OnMenuSelection">menuNewPlot</event>
|
||||
<event name="OnMenuSelection"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
<object class="separator" expanded="0">
|
||||
|
@ -268,14 +268,14 @@
|
|||
<property name="checked">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="help"></property>
|
||||
<property name="id">wxID_OPEN</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">Add signals...</property>
|
||||
<property name="name">m_addSignals</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="shortcut"></property>
|
||||
<property name="unchecked_bitmap"></property>
|
||||
<event name="OnMenuSelection">menuOpenWorkbook</event>
|
||||
<event name="OnMenuSelection"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
<object class="wxMenuItem" expanded="0">
|
||||
|
@ -283,14 +283,14 @@
|
|||
<property name="checked">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="help"></property>
|
||||
<property name="id">wxID_SAVE</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">Probe from schematics</property>
|
||||
<property name="name">m_probeSignals</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="shortcut"></property>
|
||||
<property name="unchecked_bitmap"></property>
|
||||
<event name="OnMenuSelection">menuSaveWorkbook</event>
|
||||
<event name="OnMenuSelection"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
<object class="wxMenuItem" expanded="0">
|
||||
|
@ -302,10 +302,10 @@
|
|||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">Tune component value</property>
|
||||
<property name="name">m_tuneValue</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="shortcut"></property>
|
||||
<property name="unchecked_bitmap"></property>
|
||||
<event name="OnMenuSelection">menuSaveImage</event>
|
||||
<event name="OnMenuSelection"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
<object class="separator" expanded="0">
|
||||
|
@ -317,14 +317,14 @@
|
|||
<property name="checked">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="help"></property>
|
||||
<property name="id">wxID_CLOSE</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">Settings...</property>
|
||||
<property name="name">m_exitSim1</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="name">m_settings</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="shortcut"></property>
|
||||
<property name="unchecked_bitmap"></property>
|
||||
<event name="OnMenuSelection">menuExit</event>
|
||||
<event name="OnMenuSelection"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
|
|
|
@ -49,6 +49,11 @@ class SIM_PLOT_FRAME_BASE : public KIWAY_PLAYER
|
|||
wxMenuBar* m_mainMenu;
|
||||
wxMenu* m_fileMenu;
|
||||
wxMenu* m_simulationMenu;
|
||||
wxMenuItem* m_runSimulation;
|
||||
wxMenuItem* m_addSignals;
|
||||
wxMenuItem* m_probeSignals;
|
||||
wxMenuItem* m_tuneValue;
|
||||
wxMenuItem* m_settings;
|
||||
wxMenu* m_viewMenu;
|
||||
wxBoxSizer* m_sizer1;
|
||||
wxToolBar* m_toolBar;
|
||||
|
|
Loading…
Reference in New Issue