Merge branch 'Simulation_AbstractPlotWindowFromPlotTab' into 'master'

Simulation: Added simple multiplot support

See merge request kicad/code/kicad!2267
This commit is contained in:
aris-kimi 2025-09-05 16:00:15 +03:00 committed by GitLab
commit 94cb4e6a80
No known key found for this signature in database
14 changed files with 1784 additions and 718 deletions

View File

@ -1381,6 +1381,14 @@ EVT_MENU( mpID_ZOOM_IN, mpWindow::onZoomIn )
EVT_MENU( mpID_ZOOM_OUT, mpWindow::onZoomOut ) EVT_MENU( mpID_ZOOM_OUT, mpWindow::onZoomOut )
EVT_MENU( mpID_ZOOM_UNDO, mpWindow::onZoomUndo ) EVT_MENU( mpID_ZOOM_UNDO, mpWindow::onZoomUndo )
EVT_MENU( mpID_ZOOM_REDO, mpWindow::onZoomRedo ) EVT_MENU( mpID_ZOOM_REDO, mpWindow::onZoomRedo )
// Queue events for these back at sim_plot_tab
EVT_MENU( mpID_PLOT_PROP, mpWindow::onPlotProperties )
EVT_MENU( mpID_NEW_PLOTDIAGRAM, mpWindow::onNewPlotdiagram )
EVT_MENU( mpID_DELETE_THIS_PLOTDIAGRAM, mpWindow::onDeleteThisPlotdiagram )
EVT_MENU( mpID_DELETE_ALL_PLOTDIAGRAMS, mpWindow::onDeleteAllPlotdiagrams )
END_EVENT_TABLE() END_EVENT_TABLE()
@ -1430,6 +1438,36 @@ mpWindow::~mpWindow()
} }
void mpWindow::onPlotProperties( wxCommandEvent& WXUNUSED( event ) )
{
wxCommandEvent* dummy = new wxCommandEvent( EVT_SIM_PLOT_PROPERTIES, GetId() );
dummy->SetEventObject( this );
wxQueueEvent( GetEventHandler(), dummy );
}
void mpWindow::onNewPlotdiagram( wxCommandEvent& WXUNUSED( event ) )
{
wxQueueEvent( GetEventHandler(), new wxCommandEvent( EVT_SIM_NEW_PLOTDIAGRAM ) );
}
void mpWindow::onDeleteThisPlotdiagram( wxCommandEvent& WXUNUSED( event ) )
{
wxCommandEvent* dummy = new wxCommandEvent( EVT_SIM_DELETE_THIS_PLOTDIAGRAM, GetId() );
dummy->SetEventObject( this );
wxQueueEvent( GetEventHandler(), dummy );
}
void mpWindow::onDeleteAllPlotdiagrams( wxCommandEvent& WXUNUSED( event ) )
{
wxQueueEvent( GetEventHandler(), new wxCommandEvent( EVT_SIM_DELETE_ALL_PLOTDIAGRAMS ) );
}
// Mouse handler, for detecting when the user drag with the right button or just "clicks" for // Mouse handler, for detecting when the user drag with the right button or just "clicks" for
// the menu. // the menu.
// JLB // JLB

View File

@ -59,6 +59,7 @@ static wxString getStringSelection( const wxChoice* aCtrl )
} }
// clang-format off
DIALOG_SIM_COMMAND::DIALOG_SIM_COMMAND( SIMULATOR_FRAME* aParent, DIALOG_SIM_COMMAND::DIALOG_SIM_COMMAND( SIMULATOR_FRAME* aParent,
std::shared_ptr<SPICE_CIRCUIT_MODEL> aCircuitModel, std::shared_ptr<SPICE_CIRCUIT_MODEL> aCircuitModel,
std::shared_ptr<SPICE_SETTINGS>& aSettings ) : std::shared_ptr<SPICE_SETTINGS>& aSettings ) :
@ -66,10 +67,22 @@ DIALOG_SIM_COMMAND::DIALOG_SIM_COMMAND( SIMULATOR_FRAME* aParent,
m_simulatorFrame( aParent ), m_simulatorFrame( aParent ),
m_circuitModel( aCircuitModel ), m_circuitModel( aCircuitModel ),
m_settings( aSettings ), m_settings( aSettings ),
m_spiceEmptyValidator( true ) m_spiceEmptyValidator( true ),
m_infoBar( new WX_INFOBAR( this ) )
{ {
// clang-format on
m_simPages->Hide(); m_simPages->Hide();
// Hide by default, Show when needed.
m_sizerPlotDiagram->Show( false );
bSizer1->Prepend( m_infoBar );
m_infoBar->RemoveAllButtons();
m_infoBar->Hide();
GetNotebook()->GetPage( 1 )->Disable(); // Hide from here, show when there will be a plotable sim type
m_posIntValidator.SetMin( 1 ); m_posIntValidator.SetMin( 1 );
m_acPointsNumber->SetValidator( m_posIntValidator ); m_acPointsNumber->SetValidator( m_posIntValidator );
@ -170,6 +183,39 @@ bool DIALOG_SIM_COMMAND::TransferDataToWindow()
return true; return true;
} }
void DIALOG_SIM_COMMAND::onChoicePlotDiagramChange( wxCommandEvent& event )
{
wxString msg = _( "Changing plot selection, clears previous' properties edits." );
m_infoBar->ShowMessageFor( msg, 3000, wxICON_INFORMATION );
SIMULATOR_FRAME* simFrame = dynamic_cast<SIMULATOR_FRAME*>( m_parent );
if( !simFrame )
return;
SIM_TAB* simTab = dynamic_cast<SIM_TAB*>( simFrame->GetCurrentSimTab() );
if( !simTab )
return;
if( SIM_PLOT_TAB* plotTab = dynamic_cast<SIM_PLOT_TAB*>( simTab ) )
{
for( const auto& plotDiagram : plotTab->GetPlotDiagramVect() )
{
if( plotDiagram->GetNickName() == m_choicePlotDiagram->GetString( m_choicePlotDiagram->GetSelection() ) )
{
SetPlotSettingsFor( simTab, plotDiagram );
Layout();
Refresh();
break;
}
}
}
}
void DIALOG_SIM_COMMAND::OnUpdateUILockY1( wxUpdateUIEvent& event ) void DIALOG_SIM_COMMAND::OnUpdateUILockY1( wxUpdateUIEvent& event )
{ {
@ -189,18 +235,20 @@ void DIALOG_SIM_COMMAND::OnUpdateUILockY3( wxUpdateUIEvent& event )
} }
void DIALOG_SIM_COMMAND::SetPlotSettings( const SIM_TAB* aSimTab ) void DIALOG_SIM_COMMAND::SetPlotSettingsFor( const SIM_TAB* aSimTab, SIM_PLOT_DIAGRAM* plotDiagram )
{ {
if( const SIM_PLOT_TAB* plotTab = dynamic_cast<const SIM_PLOT_TAB*>( aSimTab ) ) if( const SIM_PLOT_TAB* plotTab = dynamic_cast<const SIM_PLOT_TAB*>( aSimTab ) )
{ {
if( !plotTab->GetLabelY1().IsEmpty() ) //SIM_PLOT_DIAGRAM* plotDiagram = plotTab->GetPlotDiagram( 0 );
if( !plotDiagram->GetLabelY1().IsEmpty() )
{ {
m_bSizerY1->Show( true ); m_bSizerY1->Show( true );
m_lockY1->SetLabel( wxString::Format( m_lockY1->GetLabel(), plotTab->GetLabelY1() ) ); m_lockY1->SetLabel( wxString::Format( m_lockY1->GetLabel(), plotDiagram->GetLabelY1() ) );
m_y1Units->SetLabel( plotTab->GetUnitsY1() ); m_y1Units->SetLabel( plotDiagram->GetUnitsY1() );
double min = 0.0, max = 0.0; double min = 0.0, max = 0.0;
bool locked = plotTab->GetY1Scale( &min, &max ); bool locked = plotDiagram->GetY1Scale( &min, &max );
m_lockY1->SetValue( locked ); m_lockY1->SetValue( locked );
if( !std::isnan( min ) ) if( !std::isnan( min ) )
@ -210,14 +258,14 @@ void DIALOG_SIM_COMMAND::SetPlotSettings( const SIM_TAB* aSimTab )
m_y1Max->SetValue( SIM_VALUE::Normalize( max ) ); m_y1Max->SetValue( SIM_VALUE::Normalize( max ) );
} }
if( !plotTab->GetLabelY2().IsEmpty() ) if( !plotDiagram->GetLabelY2().IsEmpty() )
{ {
m_bSizerY2->Show( true ); m_bSizerY2->Show( true );
m_lockY2->SetLabel( wxString::Format( m_lockY2->GetLabel(), plotTab->GetLabelY2() ) ); m_lockY2->SetLabel( wxString::Format( m_lockY2->GetLabel(), plotDiagram->GetLabelY2() ) );
m_y2Units->SetLabel( plotTab->GetUnitsY2() ); m_y2Units->SetLabel( plotDiagram->GetUnitsY2() );
double min = 0.0, max = 0.0; double min = 0.0, max = 0.0;
bool locked = plotTab->GetY2Scale( &min, &max ); bool locked = plotDiagram->GetY2Scale( &min, &max );
m_lockY2->SetValue( locked ); m_lockY2->SetValue( locked );
if( !std::isnan( min ) ) if( !std::isnan( min ) )
@ -227,14 +275,14 @@ void DIALOG_SIM_COMMAND::SetPlotSettings( const SIM_TAB* aSimTab )
m_y2Max->SetValue( SIM_VALUE::Normalize( max ) ); m_y2Max->SetValue( SIM_VALUE::Normalize( max ) );
} }
if( !plotTab->GetLabelY3().IsEmpty() ) if( !plotDiagram->GetLabelY3().IsEmpty() )
{ {
m_bSizerY3->Show( true ); m_bSizerY3->Show( true );
m_lockY3->SetLabel( wxString::Format( m_lockY3->GetLabel(), plotTab->GetLabelY3() ) ); m_lockY3->SetLabel( wxString::Format( m_lockY3->GetLabel(), plotDiagram->GetLabelY3() ) );
m_y3Units->SetLabel( plotTab->GetUnitsY3() ); m_y3Units->SetLabel( plotDiagram->GetUnitsY3() );
double min = 0.0, max = 0.0; double min = 0.0, max = 0.0;
bool locked = plotTab->GetY3Scale( &min, &max ); bool locked = plotDiagram->GetY3Scale( &min, &max );
m_lockY3->SetValue( locked ); m_lockY3->SetValue( locked );
if( !std::isnan( min ) ) if( !std::isnan( min ) )
@ -244,9 +292,9 @@ void DIALOG_SIM_COMMAND::SetPlotSettings( const SIM_TAB* aSimTab )
m_y3Max->SetValue( SIM_VALUE::Normalize( max ) ); m_y3Max->SetValue( SIM_VALUE::Normalize( max ) );
} }
m_grid->SetValue( plotTab->IsGridShown() ); m_grid->SetValue( plotDiagram->IsGridShown() );
m_legend->SetValue( plotTab->IsLegendShown() ); m_legend->SetValue( plotDiagram->IsLegendShown() );
m_dottedSecondary->SetValue( plotTab->GetDottedSecondary() ); m_dottedSecondary->SetValue( plotDiagram->GetDottedSecondary() );
#define GET_STR( val ) EDA_UNIT_UTILS::UI::MessageTextFromValue( unityScale, EDA_UNITS::UNSCALED, \ #define GET_STR( val ) EDA_UNIT_UTILS::UI::MessageTextFromValue( unityScale, EDA_UNITS::UNSCALED, \
val, false /* no units */ ) val, false /* no units */ )
@ -262,7 +310,7 @@ void DIALOG_SIM_COMMAND::SetPlotSettings( const SIM_TAB* aSimTab )
wxString DIALOG_SIM_COMMAND::evaluateDCControls( wxChoice* aDcSource, wxTextCtrl* aDcStart, wxString DIALOG_SIM_COMMAND::evaluateDCControls( wxChoice* aDcSource, wxTextCtrl* aDcStart,
wxTextCtrl* aDcStop, wxTextCtrl* aDcIncr ) wxTextCtrl* aDcStop, wxTextCtrl* aDcIncr )
{ {
wxString dcSource; wxString dcSource = wxEmptyString;
wxWindow* ctrlWithError = nullptr; wxWindow* ctrlWithError = nullptr;
if( aDcSource->GetSelection() >= 0 ) if( aDcSource->GetSelection() >= 0 )
@ -526,42 +574,71 @@ void DIALOG_SIM_COMMAND::ApplySettings( SIM_TAB* aTab )
if( SIM_PLOT_TAB* plotTab = dynamic_cast<SIM_PLOT_TAB*>( aTab ) ) if( SIM_PLOT_TAB* plotTab = dynamic_cast<SIM_PLOT_TAB*>( aTab ) )
{ {
if( !plotTab->GetLabelY1().IsEmpty() ) SIM_PLOT_DIAGRAM* tmpDiagram = nullptr;
if( static_cast<int>( m_choicePlotDiagram->GetStrings().GetCount() ) <= m_choicePlotDiagram->GetSelection()
|| ( static_cast<int>( m_choicePlotDiagram->GetStrings().GetCount() ) > m_choicePlotDiagram->GetSelection()
&& m_choicePlotDiagram->GetSelection() == -1 ) )
{ {
plotTab->SetY1Scale( m_lockY1->GetValue(), // to avoid a (non crashing) wxWidgets assert since, choice selection is not set at this point,
SIM_VALUE::ToDouble( m_y1Min->GetValue().ToStdString() ), // we cannot get a valid string index in the following "for" loop.
SIM_VALUE::ToDouble( m_y1Max->GetValue().ToStdString() ) );
// So we can return here only when creating a new sim tab ( based on the "-1" )
return;
} }
if( !plotTab->GetLabelY2().IsEmpty() ) for( const auto& plotDiagram : plotTab->GetPlotDiagramVect() )
{ {
plotTab->SetY2Scale( m_lockY2->GetValue(), if( plotDiagram->GetNickName() == m_choicePlotDiagram->GetString( m_choicePlotDiagram->GetSelection() ) )
SIM_VALUE::ToDouble( m_y2Min->GetValue().ToStdString() ), {
SIM_VALUE::ToDouble( m_y2Max->GetValue().ToStdString() ) ); tmpDiagram = plotDiagram;
break;
}
} }
if( !plotTab->GetLabelY3().IsEmpty() ) SIM_PLOT_DIAGRAM* plotDiagram = tmpDiagram;
//for( const auto& plotDiagram : plotTab->GetPlotDiagramVect() )
if( plotDiagram )
{ {
plotTab->SetY3Scale( m_lockY3->GetValue(), // clang-format off
SIM_VALUE::ToDouble( m_y3Min->GetValue().ToStdString() ), if( !plotDiagram->GetLabelY1().IsEmpty() )
SIM_VALUE::ToDouble( m_y3Max->GetValue().ToStdString() ) ); {
plotDiagram->SetY1Scale( m_lockY1->GetValue(),
SIM_VALUE::ToDouble( m_y1Min->GetValue().ToStdString() ),
SIM_VALUE::ToDouble( m_y1Max->GetValue().ToStdString() ) );
}
if( !plotDiagram->GetLabelY2().IsEmpty() )
{
plotDiagram->SetY2Scale( m_lockY2->GetValue(),
SIM_VALUE::ToDouble( m_y2Min->GetValue().ToStdString() ),
SIM_VALUE::ToDouble( m_y2Max->GetValue().ToStdString() ) );
}
if( !plotDiagram->GetLabelY3().IsEmpty() )
{
plotDiagram->SetY3Scale( m_lockY3->GetValue(),
SIM_VALUE::ToDouble( m_y3Min->GetValue().ToStdString() ),
SIM_VALUE::ToDouble( m_y3Max->GetValue().ToStdString() ) );
}
plotTab->GetPlotWin()->LockY( m_lockY1->GetValue()
|| m_lockY2->GetValue()
|| m_lockY3->GetValue() );
// clang-format on
plotDiagram->ShowGrid( m_grid->GetValue() );
plotDiagram->ShowLegend( m_legend->GetValue() );
plotDiagram->SetDottedSecondary( m_dottedSecondary->GetValue() );
plotDiagram->GetPrivatePlotWin()->SetMarginLeft( TO_INT( m_marginLeft ) );
plotDiagram->GetPrivatePlotWin()->SetMarginRight( TO_INT( m_marginRight ) );
plotDiagram->GetPrivatePlotWin()->SetMarginTop( TO_INT( m_marginTop ) );
plotDiagram->GetPrivatePlotWin()->SetMarginBottom( TO_INT( m_marginBottom ) );
plotDiagram->GetPrivatePlotWin()->AdjustLimitedView();
plotDiagram->GetPrivatePlotWin()->UpdateAll();
} }
plotTab->GetPlotWin()->LockY( m_lockY1->GetValue()
|| m_lockY2->GetValue()
|| m_lockY3->GetValue() );
plotTab->ShowGrid( m_grid->GetValue() );
plotTab->ShowLegend( m_legend->GetValue() );
plotTab->SetDottedSecondary( m_dottedSecondary->GetValue() );
plotTab->GetPlotWin()->SetMarginLeft( TO_INT( m_marginLeft ) );
plotTab->GetPlotWin()->SetMarginRight( TO_INT( m_marginRight ) );
plotTab->GetPlotWin()->SetMarginTop( TO_INT( m_marginTop ) );
plotTab->GetPlotWin()->SetMarginBottom( TO_INT( m_marginBottom ) );
plotTab->GetPlotWin()->AdjustLimitedView();
plotTab->GetPlotWin()->UpdateAll();
} }
} }
@ -1017,5 +1094,3 @@ void DIALOG_SIM_COMMAND::OnFilterMouseMoved( wxMouseEvent& aEvent )
SetCursor( wxCURSOR_IBEAM ); SetCursor( wxCURSOR_IBEAM );
#endif #endif
} }

View File

@ -37,7 +37,9 @@ class SPICE_CIRCUIT_MODEL;
class SPICE_SETTINGS; class SPICE_SETTINGS;
class SIMULATOR_FRAME; class SIMULATOR_FRAME;
class SIM_TAB; class SIM_TAB;
class SIM_PLOT_DIAGRAM;
// clang-format off
class DIALOG_SIM_COMMAND : public DIALOG_SIM_COMMAND_BASE class DIALOG_SIM_COMMAND : public DIALOG_SIM_COMMAND_BASE
{ {
@ -46,6 +48,8 @@ public:
std::shared_ptr<SPICE_CIRCUIT_MODEL> aCircuitModel, std::shared_ptr<SPICE_CIRCUIT_MODEL> aCircuitModel,
std::shared_ptr<SPICE_SETTINGS>& aSettings ); std::shared_ptr<SPICE_SETTINGS>& aSettings );
// clang-format on
const wxString& GetSimCommand() const const wxString& GetSimCommand() const
{ {
return m_simCommand; return m_simCommand;
@ -69,7 +73,7 @@ public:
m_saveAllEvents->SetValue( aOptions & NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_EVENTS ); m_saveAllEvents->SetValue( aOptions & NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_EVENTS );
} }
void SetPlotSettings( const SIM_TAB* aSimTab ); void SetPlotSettingsFor( const SIM_TAB* aSimTab, SIM_PLOT_DIAGRAM* aPlotDiagram );
bool TransferDataFromWindow() override; bool TransferDataFromWindow() override;
bool TransferDataToWindow() override; bool TransferDataToWindow() override;
@ -85,6 +89,30 @@ public:
void ApplySettings( SIM_TAB* aTab ); void ApplySettings( SIM_TAB* aTab );
const wxNotebook* GetNotebook() { return m_notebook1; }
void SetPlotConfigTab( int anIndex ) { m_notebook1->SetSelection( anIndex ); }
void ShowPage( int anIndex )
{
m_notebook1->GetPage( anIndex )->Enable();
m_notebook1->GetPage( anIndex )->Show();
}
void HidePage( int anIndex )
{
m_notebook1->GetPage( anIndex )->Enable( false );
//m_notebook1->GetPage( anIndex )->Show();
}
const wxChoice* GetPlotDiagramChoice() { return m_choicePlotDiagram; }
void ClearPlotDiagramChoice() { m_choicePlotDiagram->Clear(); }
void AppendStrToPlotDiagramChoice( wxString aString ) { m_choicePlotDiagram->AppendString( aString ); }
void SetSelToPlotDiagramChoice( int aSelection ) { m_choicePlotDiagram->SetSelection( aSelection ); }
private: private:
enum SCALE_TYPE enum SCALE_TYPE
{ {
@ -142,6 +170,7 @@ private:
loadDirectives(); loadDirectives();
} }
void onChoicePlotDiagramChange( wxCommandEvent& event ) override;
void onDCEnableSecondSource( wxCommandEvent& event ) override; void onDCEnableSecondSource( wxCommandEvent& event ) override;
void onSwapDCSources( wxCommandEvent& event ) override; void onSwapDCSources( wxCommandEvent& event ) override;
void onDCSource1Selected( wxCommandEvent& event ) override; void onDCSource1Selected( wxCommandEvent& event ) override;
@ -177,6 +206,7 @@ private:
SPICE_VALIDATOR m_spiceEmptyValidator; SPICE_VALIDATOR m_spiceEmptyValidator;
wxIntegerValidator<int> m_posIntValidator; wxIntegerValidator<int> m_posIntValidator;
std::set<wxString> m_fftInputSignals; std::set<wxString> m_fftInputSignals;
WX_INFOBAR* m_infoBar; // Infobar to notify when settings have been discarded
}; };
#endif /* DIALOG_SIM_COMMAND_H */ #endif /* DIALOG_SIM_COMMAND_H */

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // C++ code generated with wxFormBuilder (version 4.2.1-43-gf15ce330)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@ -13,7 +13,6 @@ DIALOG_SIM_COMMAND_BASE::DIALOG_SIM_COMMAND_BASE( wxWindow* parent, wxWindowID i
{ {
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* bSizer1;
bSizer1 = new wxBoxSizer( wxVERTICAL ); bSizer1 = new wxBoxSizer( wxVERTICAL );
m_commandTypeSizer = new wxBoxSizer( wxHORIZONTAL ); m_commandTypeSizer = new wxBoxSizer( wxHORIZONTAL );
@ -684,6 +683,23 @@ DIALOG_SIM_COMMAND_BASE::DIALOG_SIM_COMMAND_BASE( wxWindow* parent, wxWindowID i
wxBoxSizer* bPlotSetupSizer; wxBoxSizer* bPlotSetupSizer;
bPlotSetupSizer = new wxBoxSizer( wxVERTICAL ); bPlotSetupSizer = new wxBoxSizer( wxVERTICAL );
m_sizerPlotDiagram = new wxBoxSizer( wxHORIZONTAL );
m_staticTextPlotDIagram = new wxStaticText( m_panelPlotSetup, wxID_ANY, _("Plot diagram:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextPlotDIagram->Wrap( -1 );
m_sizerPlotDiagram->Add( m_staticTextPlotDIagram, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxArrayString m_choicePlotDiagramChoices;
m_choicePlotDiagram = new wxChoice( m_panelPlotSetup, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePlotDiagramChoices, 0 );
m_choicePlotDiagram->SetSelection( 0 );
m_sizerPlotDiagram->Add( m_choicePlotDiagram, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
bPlotSetupSizer->Add( m_sizerPlotDiagram, 0, wxEXPAND, 5 );
m_staticline1 = new wxStaticLine( m_panelPlotSetup, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bPlotSetupSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
m_bSizerY1 = new wxBoxSizer( wxVERTICAL ); m_bSizerY1 = new wxBoxSizer( wxVERTICAL );
m_lockY1 = new wxCheckBox( m_panelPlotSetup, wxID_ANY, _("Fixed %s scale"), wxDefaultPosition, wxDefaultSize, 0 ); m_lockY1 = new wxCheckBox( m_panelPlotSetup, wxID_ANY, _("Fixed %s scale"), wxDefaultPosition, wxDefaultSize, 0 );
@ -920,6 +936,7 @@ DIALOG_SIM_COMMAND_BASE::DIALOG_SIM_COMMAND_BASE( wxWindow* parent, wxWindowID i
m_inputSignalsFilter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SIM_COMMAND_BASE::OnFilterText ), NULL, this ); m_inputSignalsFilter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SIM_COMMAND_BASE::OnFilterText ), NULL, this );
m_loadDirectives->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SIM_COMMAND_BASE::onLoadDirectives ), NULL, this ); m_loadDirectives->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SIM_COMMAND_BASE::onLoadDirectives ), NULL, this );
m_pzFunctionType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SIM_COMMAND_BASE::onDCSource1Selected ), NULL, this ); m_pzFunctionType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SIM_COMMAND_BASE::onDCSource1Selected ), NULL, this );
m_choicePlotDiagram->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SIM_COMMAND_BASE::onChoicePlotDiagramChange ), NULL, this );
m_y1MinLabel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_COMMAND_BASE::OnUpdateUILockY1 ), NULL, this ); m_y1MinLabel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_COMMAND_BASE::OnUpdateUILockY1 ), NULL, this );
m_y1Min->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_COMMAND_BASE::OnUpdateUILockY1 ), NULL, this ); m_y1Min->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_COMMAND_BASE::OnUpdateUILockY1 ), NULL, this );
m_y1MaxLabel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_COMMAND_BASE::OnUpdateUILockY1 ), NULL, this ); m_y1MaxLabel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_COMMAND_BASE::OnUpdateUILockY1 ), NULL, this );
@ -950,6 +967,7 @@ DIALOG_SIM_COMMAND_BASE::~DIALOG_SIM_COMMAND_BASE()
m_inputSignalsFilter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SIM_COMMAND_BASE::OnFilterText ), NULL, this ); m_inputSignalsFilter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SIM_COMMAND_BASE::OnFilterText ), NULL, this );
m_loadDirectives->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SIM_COMMAND_BASE::onLoadDirectives ), NULL, this ); m_loadDirectives->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SIM_COMMAND_BASE::onLoadDirectives ), NULL, this );
m_pzFunctionType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SIM_COMMAND_BASE::onDCSource1Selected ), NULL, this ); m_pzFunctionType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SIM_COMMAND_BASE::onDCSource1Selected ), NULL, this );
m_choicePlotDiagram->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SIM_COMMAND_BASE::onChoicePlotDiagramChange ), NULL, this );
m_y1MinLabel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_COMMAND_BASE::OnUpdateUILockY1 ), NULL, this ); m_y1MinLabel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_COMMAND_BASE::OnUpdateUILockY1 ), NULL, this );
m_y1Min->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_COMMAND_BASE::OnUpdateUILockY1 ), NULL, this ); m_y1Min->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_COMMAND_BASE::OnUpdateUILockY1 ), NULL, this );
m_y1MaxLabel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_COMMAND_BASE::OnUpdateUILockY1 ), NULL, this ); m_y1MaxLabel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_COMMAND_BASE::OnUpdateUILockY1 ), NULL, this );

View File

@ -64,7 +64,7 @@
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizer1</property> <property name="name">bSizer1</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">protected</property>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="true">
<property name="border">10</property> <property name="border">10</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
@ -272,11 +272,11 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<object class="notebookpage" expanded="true"> <object class="notebookpage" expanded="false">
<property name="bitmap"></property> <property name="bitmap"></property>
<property name="label">SPICE Command</property> <property name="label">SPICE Command</property>
<property name="select">1</property> <property name="select">1</property>
<object class="wxPanel" expanded="true"> <object class="wxPanel" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -328,16 +328,16 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style">wxTAB_TRAVERSAL</property> <property name="window_style">wxTAB_TRAVERSAL</property>
<object class="wxBoxSizer" expanded="true"> <object class="wxBoxSizer" expanded="false">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bCommandSizer</property> <property name="name">bCommandSizer</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND | wxALL</property> <property name="flag">wxEXPAND | wxALL</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxSimplebook" expanded="true"> <object class="wxSimplebook" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -389,7 +389,7 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<object class="simplebookpage" expanded="true"> <object class="simplebookpage" expanded="false">
<property name="label">a page</property> <property name="label">a page</property>
<property name="select">0</property> <property name="select">0</property>
<object class="wxPanel" expanded="false"> <object class="wxPanel" expanded="false">
@ -5434,7 +5434,7 @@
</object> </object>
</object> </object>
</object> </object>
<object class="simplebookpage" expanded="true"> <object class="simplebookpage" expanded="false">
<property name="label">a page</property> <property name="label">a page</property>
<property name="select">0</property> <property name="select">0</property>
<object class="wxPanel" expanded="false"> <object class="wxPanel" expanded="false">
@ -6162,7 +6162,7 @@
</object> </object>
</object> </object>
</object> </object>
<object class="simplebookpage" expanded="true"> <object class="simplebookpage" expanded="false">
<property name="label">a page</property> <property name="label">a page</property>
<property name="select">0</property> <property name="select">0</property>
<object class="wxPanel" expanded="false"> <object class="wxPanel" expanded="false">
@ -6427,7 +6427,7 @@
</object> </object>
</object> </object>
</object> </object>
<object class="simplebookpage" expanded="true"> <object class="simplebookpage" expanded="false">
<property name="label">a page</property> <property name="label">a page</property>
<property name="select">0</property> <property name="select">0</property>
<object class="wxPanel" expanded="false"> <object class="wxPanel" expanded="false">
@ -7323,11 +7323,11 @@
</object> </object>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">10</property> <property name="border">10</property>
<property name="flag">wxEXPAND|wxTOP|wxLEFT</property> <property name="flag">wxEXPAND|wxTOP|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="true"> <object class="wxBoxSizer" expanded="false">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizer88</property> <property name="name">bSizer88</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
@ -7397,11 +7397,11 @@
<property name="window_style"></property> <property name="window_style"></property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="true"> <object class="wxCheckBox" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -7462,11 +7462,11 @@
<property name="window_style"></property> <property name="window_style"></property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="true"> <object class="wxCheckBox" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -7527,11 +7527,11 @@
<property name="window_style"></property> <property name="window_style"></property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="true"> <object class="wxCheckBox" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -7592,11 +7592,11 @@
<property name="window_style"></property> <property name="window_style"></property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="true"> <object class="wxCheckBox" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -7657,20 +7657,20 @@
<property name="window_style"></property> <property name="window_style"></property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property> <property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxBoxSizer" expanded="true"> <object class="wxBoxSizer" expanded="false">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_compatibilityModeSizer</property> <property name="name">m_compatibilityModeSizer</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">8</property> <property name="border">8</property>
<property name="flag">wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property> <property name="flag">wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="true"> <object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -7728,11 +7728,11 @@
<property name="wrap">-1</property> <property name="wrap">-1</property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property> <property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxChoice" expanded="true"> <object class="wxChoice" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -7862,19 +7862,217 @@
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="false">
<property name="minimum_size"></property>
<property name="name">m_sizerPlotDiagram</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">public</property>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Plot diagram:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticTextPlotDIagram</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="proportion">0</property>
<object class="wxChoice" expanded="false">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices"></property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_choicePlotDiagram</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChoice">onChoicePlotDiagramChange</event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxEXPAND | wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticline1</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxLI_HORIZONTAL</property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="true"> <object class="wxBoxSizer" expanded="false">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_bSizerY1</property> <property name="name">m_bSizerY1</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxRIGHT|wxLEFT|wxEXPAND</property> <property name="flag">wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="true"> <object class="wxCheckBox" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -7935,21 +8133,21 @@
<property name="window_style"></property> <property name="window_style"></property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="spacer" expanded="true"> <object class="spacer" expanded="false">
<property name="height">2</property> <property name="height">2</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="width">0</property> <property name="width">0</property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">8</property> <property name="border">8</property>
<property name="flag">wxBOTTOM</property> <property name="flag">wxBOTTOM</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="true"> <object class="wxFlexGridSizer" expanded="false">
<property name="cols">5</property> <property name="cols">5</property>
<property name="flexible_direction">wxBOTH</property> <property name="flexible_direction">wxBOTH</property>
<property name="growablecols"></property> <property name="growablecols"></property>
@ -7961,11 +8159,11 @@
<property name="permission">none</property> <property name="permission">none</property>
<property name="rows">0</property> <property name="rows">0</property>
<property name="vgap">0</property> <property name="vgap">0</property>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">30</property> <property name="border">30</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="true"> <object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -8024,11 +8222,11 @@
<event name="OnUpdateUI">OnUpdateUILockY1</event> <event name="OnUpdateUI">OnUpdateUILockY1</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="true"> <object class="wxTextCtrl" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -8090,11 +8288,11 @@
<event name="OnUpdateUI">OnUpdateUILockY1</event> <event name="OnUpdateUI">OnUpdateUILockY1</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">18</property> <property name="border">18</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="true"> <object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -8153,11 +8351,11 @@
<event name="OnUpdateUI">OnUpdateUILockY1</event> <event name="OnUpdateUI">OnUpdateUILockY1</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="true"> <object class="wxTextCtrl" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -8219,11 +8417,11 @@
<event name="OnUpdateUI">OnUpdateUILockY1</event> <event name="OnUpdateUI">OnUpdateUILockY1</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">3</property> <property name="border">3</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="true"> <object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -8286,20 +8484,20 @@
</object> </object>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="true"> <object class="wxBoxSizer" expanded="false">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_bSizerY2</property> <property name="name">m_bSizerY2</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT|wxEXPAND</property> <property name="flag">wxTOP|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="true"> <object class="wxCheckBox" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -8360,21 +8558,21 @@
<property name="window_style"></property> <property name="window_style"></property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="spacer" expanded="true"> <object class="spacer" expanded="false">
<property name="height">2</property> <property name="height">2</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="width">0</property> <property name="width">0</property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">8</property> <property name="border">8</property>
<property name="flag">wxBOTTOM</property> <property name="flag">wxBOTTOM</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="true"> <object class="wxFlexGridSizer" expanded="false">
<property name="cols">5</property> <property name="cols">5</property>
<property name="flexible_direction">wxBOTH</property> <property name="flexible_direction">wxBOTH</property>
<property name="growablecols"></property> <property name="growablecols"></property>
@ -8386,11 +8584,11 @@
<property name="permission">none</property> <property name="permission">none</property>
<property name="rows">0</property> <property name="rows">0</property>
<property name="vgap">0</property> <property name="vgap">0</property>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">30</property> <property name="border">30</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="true"> <object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -8449,11 +8647,11 @@
<event name="OnUpdateUI">OnUpdateUILockY2</event> <event name="OnUpdateUI">OnUpdateUILockY2</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="true"> <object class="wxTextCtrl" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -8515,11 +8713,11 @@
<event name="OnUpdateUI">OnUpdateUILockY2</event> <event name="OnUpdateUI">OnUpdateUILockY2</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">18</property> <property name="border">18</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="true"> <object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -8578,11 +8776,11 @@
<event name="OnUpdateUI">OnUpdateUILockY2</event> <event name="OnUpdateUI">OnUpdateUILockY2</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="true"> <object class="wxTextCtrl" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -8644,11 +8842,11 @@
<event name="OnUpdateUI">OnUpdateUILockY2</event> <event name="OnUpdateUI">OnUpdateUILockY2</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">3</property> <property name="border">3</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="true"> <object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -8711,20 +8909,20 @@
</object> </object>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="true"> <object class="wxBoxSizer" expanded="false">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_bSizerY3</property> <property name="name">m_bSizerY3</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT|wxEXPAND</property> <property name="flag">wxTOP|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="true"> <object class="wxCheckBox" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -8785,21 +8983,21 @@
<property name="window_style"></property> <property name="window_style"></property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="spacer" expanded="true"> <object class="spacer" expanded="false">
<property name="height">2</property> <property name="height">2</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="width">0</property> <property name="width">0</property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">8</property> <property name="border">8</property>
<property name="flag">wxBOTTOM</property> <property name="flag">wxBOTTOM</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="true"> <object class="wxFlexGridSizer" expanded="false">
<property name="cols">5</property> <property name="cols">5</property>
<property name="flexible_direction">wxBOTH</property> <property name="flexible_direction">wxBOTH</property>
<property name="growablecols"></property> <property name="growablecols"></property>
@ -8811,11 +9009,11 @@
<property name="permission">none</property> <property name="permission">none</property>
<property name="rows">0</property> <property name="rows">0</property>
<property name="vgap">0</property> <property name="vgap">0</property>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">30</property> <property name="border">30</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="true"> <object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -8874,11 +9072,11 @@
<event name="OnUpdateUI">OnUpdateUILockY3</event> <event name="OnUpdateUI">OnUpdateUILockY3</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="true"> <object class="wxTextCtrl" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -8940,11 +9138,11 @@
<event name="OnUpdateUI">OnUpdateUILockY3</event> <event name="OnUpdateUI">OnUpdateUILockY3</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">18</property> <property name="border">18</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="true"> <object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -9003,11 +9201,11 @@
<event name="OnUpdateUI">OnUpdateUILockY3</event> <event name="OnUpdateUI">OnUpdateUILockY3</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="true"> <object class="wxTextCtrl" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -9069,11 +9267,11 @@
<event name="OnUpdateUI">OnUpdateUILockY3</event> <event name="OnUpdateUI">OnUpdateUILockY3</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">3</property> <property name="border">3</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="true"> <object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -9136,20 +9334,20 @@
</object> </object>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxLEFT</property> <property name="flag">wxEXPAND|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="true"> <object class="wxBoxSizer" expanded="false">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizerCheckboxes</property> <property name="name">bSizerCheckboxes</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="true"> <object class="wxCheckBox" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -9210,11 +9408,11 @@
<property name="window_style"></property> <property name="window_style"></property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="true"> <object class="wxCheckBox" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -9275,11 +9473,11 @@
<property name="window_style"></property> <property name="window_style"></property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxRIGHT|wxLEFT|wxEXPAND</property> <property name="flag">wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="true"> <object class="wxCheckBox" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -9342,21 +9540,21 @@
</object> </object>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="spacer" expanded="true"> <object class="spacer" expanded="false">
<property name="height">0</property> <property name="height">0</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="width">0</property> <property name="width">0</property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">10</property> <property name="border">10</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property> <property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="true"> <object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -9414,29 +9612,29 @@
<property name="wrap">-1</property> <property name="wrap">-1</property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="true"> <object class="wxBoxSizer" expanded="false">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizerMargins</property> <property name="name">bSizerMargins</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxLEFT</property> <property name="flag">wxEXPAND|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="true"> <object class="wxBoxSizer" expanded="false">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizerLeft</property> <property name="name">bSizerLeft</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">20</property> <property name="border">20</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="true"> <object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -9494,11 +9692,11 @@
<property name="wrap">-1</property> <property name="wrap">-1</property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="true"> <object class="wxTextCtrl" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -9561,11 +9759,11 @@
</object> </object>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="true"> <object class="wxFlexGridSizer" expanded="false">
<property name="cols">2</property> <property name="cols">2</property>
<property name="flexible_direction">wxBOTH</property> <property name="flexible_direction">wxBOTH</property>
<property name="growablecols"></property> <property name="growablecols"></property>
@ -9577,11 +9775,11 @@
<property name="permission">none</property> <property name="permission">none</property>
<property name="rows">0</property> <property name="rows">0</property>
<property name="vgap">4</property> <property name="vgap">4</property>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">15</property> <property name="border">15</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="true"> <object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -9639,11 +9837,11 @@
<property name="wrap">-1</property> <property name="wrap">-1</property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="true"> <object class="wxTextCtrl" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -9704,11 +9902,11 @@
<property name="window_style"></property> <property name="window_style"></property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">15</property> <property name="border">15</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="true"> <object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -9766,11 +9964,11 @@
<property name="wrap">-1</property> <property name="wrap">-1</property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="true"> <object class="wxTextCtrl" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -9833,20 +10031,20 @@
</object> </object>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="true"> <object class="wxBoxSizer" expanded="false">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizerRight</property> <property name="name">bSizerRight</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">15</property> <property name="border">15</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="true"> <object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -9904,11 +10102,11 @@
<property name="wrap">-1</property> <property name="wrap">-1</property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="false">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="true"> <object class="wxTextCtrl" expanded="false">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // C++ code generated with wxFormBuilder (version 4.2.1-43-gf15ce330)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@ -32,6 +32,7 @@
#include <wx/srchctrl.h> #include <wx/srchctrl.h>
#include <wx/checklst.h> #include <wx/checklst.h>
#include <wx/simplebook.h> #include <wx/simplebook.h>
#include <wx/statline.h>
#include <wx/notebook.h> #include <wx/notebook.h>
#include <wx/dialog.h> #include <wx/dialog.h>
@ -45,6 +46,7 @@ class DIALOG_SIM_COMMAND_BASE : public DIALOG_SHIM
private: private:
protected: protected:
wxBoxSizer* bSizer1;
wxBoxSizer* m_commandTypeSizer; wxBoxSizer* m_commandTypeSizer;
wxStaticText* m_commandTypeLabel; wxStaticText* m_commandTypeLabel;
wxChoice* m_commandType; wxChoice* m_commandType;
@ -162,6 +164,9 @@ class DIALOG_SIM_COMMAND_BASE : public DIALOG_SHIM
wxBoxSizer* m_compatibilityModeSizer; wxBoxSizer* m_compatibilityModeSizer;
wxChoice* m_compatibilityMode; wxChoice* m_compatibilityMode;
wxPanel* m_panelPlotSetup; wxPanel* m_panelPlotSetup;
wxStaticText* m_staticTextPlotDIagram;
wxChoice* m_choicePlotDiagram;
wxStaticLine* m_staticline1;
wxBoxSizer* m_bSizerY1; wxBoxSizer* m_bSizerY1;
wxCheckBox* m_lockY1; wxCheckBox* m_lockY1;
wxStaticText* m_y1MinLabel; wxStaticText* m_y1MinLabel;
@ -209,12 +214,14 @@ class DIALOG_SIM_COMMAND_BASE : public DIALOG_SHIM
virtual void OnFilterMouseMoved( wxMouseEvent& event ) { event.Skip(); } virtual void OnFilterMouseMoved( wxMouseEvent& event ) { event.Skip(); }
virtual void OnFilterText( wxCommandEvent& event ) { event.Skip(); } virtual void OnFilterText( wxCommandEvent& event ) { event.Skip(); }
virtual void onLoadDirectives( wxCommandEvent& event ) { event.Skip(); } virtual void onLoadDirectives( wxCommandEvent& event ) { event.Skip(); }
virtual void onChoicePlotDiagramChange( wxCommandEvent& event ) { event.Skip(); }
virtual void OnUpdateUILockY1( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnUpdateUILockY1( wxUpdateUIEvent& event ) { event.Skip(); }
virtual void OnUpdateUILockY2( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnUpdateUILockY2( wxUpdateUIEvent& event ) { event.Skip(); }
virtual void OnUpdateUILockY3( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnUpdateUILockY3( wxUpdateUIEvent& event ) { event.Skip(); }
public: public:
wxBoxSizer* m_sizerPlotDiagram;
DIALOG_SIM_COMMAND_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Simulation Analysis"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_SIM_COMMAND_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Simulation Analysis"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );

View File

@ -59,7 +59,7 @@ void SIMULATOR_FRAME_UI::parseTraceParams( SIM_PLOT_TAB* aPlotTab, TRACE* aTrace
wxColour color; wxColour color;
color.Set( item ); color.Set( item );
aTrace->SetTraceColour( color ); aTrace->SetTraceColour( color );
aPlotTab->UpdateTraceStyle( aTrace ); aPlotTab->GetPlotDiagram( 0 )->UpdateTraceStyle( aTrace );
} }
else if( item.StartsWith( wxS( "cursor1" ) ) ) else if( item.StartsWith( wxS( "cursor1" ) ) )
{ {
@ -99,11 +99,11 @@ void SIMULATOR_FRAME_UI::parseTraceParams( SIM_PLOT_TAB* aPlotTab, TRACE* aTrace
} }
else if( item == wxS( "dottedSecondary" ) ) else if( item == wxS( "dottedSecondary" ) )
{ {
aPlotTab->SetDottedSecondary( true ); aPlotTab->GetPlotDiagram( 0 )->SetDottedSecondary( true );
} }
else if( item == wxS( "hideGrid" ) ) else if( item == wxS( "hideGrid" ) )
{ {
aPlotTab->ShowGrid( false ); aPlotTab->GetPlotDiagram( 0 )->ShowGrid( false );
} }
} }
} }
@ -315,22 +315,22 @@ bool SIMULATOR_FRAME_UI::loadLegacyWorkbook( const wxString& aPath )
coords[0].ToLong( &x ); coords[0].ToLong( &x );
coords[1].ToLong( &y ); coords[1].ToLong( &y );
plotTab->SetLegendPosition( wxPoint( (int) x, (int) y ) ); plotTab->GetPlotDiagram( 0 )->SetLegendPosition( wxPoint( (int) x, (int) y ) );
} }
plotTab->ShowLegend( true ); plotTab->GetPlotDiagram( 0 )->ShowLegend( true );
} }
else else
{ {
wxString vectorName = vectorNameFromSignalName( plotTab, signalName, nullptr ); wxString vectorName = vectorNameFromSignalName( plotTab, signalName, nullptr );
TRACE* trace = plotTab->GetOrAddTrace( vectorName, (int) traceType ); TRACE* trace = plotTab->GetOrAddTrace( vectorName, (int) traceType, plotTab->GetPlotDiagram( 0 ) );
if( version >= 4 && trace ) if( version >= 4 && trace )
parseTraceParams( plotTab, trace, signalName, param ); parseTraceParams( plotTab, trace, signalName, param );
} }
} }
plotTab->UpdatePlotColors(); plotTab->UpdatePlotColorsFor( plotTab->GetPlotDiagram( 0 )->GetPrivatePlotWin() );
} }
if( SIM_TAB* simTab = GetCurrentSimTab() ) if( SIM_TAB* simTab = GetCurrentSimTab() )
@ -349,5 +349,3 @@ bool SIMULATOR_FRAME_UI::loadLegacyWorkbook( const wxString& aPath )
file.Close(); file.Close();
return true; return true;
} }

File diff suppressed because it is too large Load Diff

View File

@ -188,23 +188,45 @@ protected:
}; };
class SIM_PLOT_TAB : public SIM_TAB class SIM_PLOT_DIAGRAM
{ {
public: public:
SIM_PLOT_TAB( const wxString& aSimCommand, wxWindow* parent ); SIM_PLOT_DIAGRAM( wxWindow* aParent );
~SIM_PLOT_DIAGRAM();
virtual ~SIM_PLOT_TAB(); void EnsureThirdYAxisExists();
void ApplyPreferences( const SIM_PREFERENCES& aPrefs ) override wxString GetUnitsX() const;
{
m_plotWin->SetMouseWheelActions( convertMouseWheelActions( aPrefs.mouse_wheel_actions ) );
}
wxString GetLabelX() const wxString GetLabelX() const
{ {
return m_axis_x ? m_axis_x->GetName() : wxString( wxS( "" ) ); return m_axis_x ? m_axis_x->GetName() : wxString( wxS( "" ) );
} }
mpScaleXBase* GetAxisX() const { return m_axis_x; }
mpScaleY* GetAxisY1() const { return m_axis_y1; }
mpScaleY* GetAxisY2() const { return m_axis_y2; }
mpScaleY* GetAxisY3() const { return m_axis_y3; }
void SetAxisX( mpScaleXBase* aAxisX ) { m_axis_x = aAxisX; }
void SetAxisY1( mpScaleY* aAxisY1 ) { m_axis_y1 = aAxisY1; }
void SetAxisY2( mpScaleY* aAxisY2 ) { m_axis_y2 = aAxisY2; }
void SetAxisY3( mpScaleY* aAxisY3 ) { m_axis_y3 = aAxisY3; }
void SetY1Scale( bool aLock, double aMin, double aMax );
void SetY2Scale( bool aLock, double aMin, double aMax );
void SetY3Scale( bool aLock, double aMin, double aMax );
wxString GetUnitsY1() const;
wxString GetUnitsY2() const;
wxString GetUnitsY3() const;
wxString GetLabelY1() const wxString GetLabelY1() const
{ {
return m_axis_y1 ? m_axis_y1->GetName() : wxString( wxS( "" ) ); return m_axis_y1 ? m_axis_y1->GetName() : wxString( wxS( "" ) );
@ -244,25 +266,12 @@ public:
return false; return false;
} }
void SetY1Scale( bool aLock, double aMin, double aMax ); bool IsGridShown() const
void SetY2Scale( bool aLock, double aMin, double aMax );
void SetY3Scale( bool aLock, double aMin, double aMax );
wxString GetUnitsX() const;
wxString GetUnitsY1() const;
wxString GetUnitsY2() const;
wxString GetUnitsY3() const;
const std::map<wxString, TRACE*>& GetTraces() const
{ {
return m_traces; if( !m_axis_x || !m_axis_y1 )
} return false;
TRACE* GetTrace( const wxString& aVecName, int aType ) const return !m_axis_x->GetTicks();
{
auto trace = m_traces.find( getTraceId( aVecName, aType ) );
return trace == m_traces.end() ? nullptr : trace->second;
} }
void ShowGrid( bool aEnable ) void ShowGrid( bool aEnable )
@ -282,14 +291,24 @@ public:
m_plotWin->UpdateAll(); m_plotWin->UpdateAll();
} }
bool IsGridShown() const
{
if( !m_axis_x || !m_axis_y1 )
return false;
return !m_axis_x->GetTicks(); /**
* Draw secondary signal traces (current or phase) with dotted lines
*/
void SetDottedSecondary( bool aEnable )
{
m_dotted_cp = aEnable;
for( const auto& [name, trace] : m_traces )
UpdateTraceStyle( trace );
m_plotWin->UpdateAll();
} }
bool GetDottedSecondary() const { return m_dotted_cp; }
mpInfoLegend* GetLegend() { return m_legend; }
void ShowLegend( bool aEnable ) void ShowLegend( bool aEnable )
{ {
m_legend->SetVisible( aEnable ); m_legend->SetVisible( aEnable );
@ -313,22 +332,86 @@ public:
m_LastLegendPosition = aPosition; m_LastLegendPosition = aPosition;
} }
/** void SetNickname( wxString aNickname ) { m_nickname = aNickname; }
* Draw secondary signal traces (current or phase) with dotted lines void SetDescription( wxString aDescription ) { m_description = aDescription; }
*/ void SetId( int aId ) { m_id = aId; }
void SetDottedSecondary( bool aEnable )
wxString GetNickName() { return m_nickname; }
wxString GetDescription() const { return m_description; }
int GetId() { return m_id; }
wxBoxSizer* GetPlotDiaSizer() { return m_sizerBox; }
mpWindow* GetPrivatePlotWin() const { return m_plotWin; }
///< Update trace line style
void UpdateTraceStyle( TRACE* trace );
const std::map<wxString, TRACE*>& GetTraces() const { return m_traces; }
std::map<wxString, TRACE*>& GetTracesToChange() { return m_traces; }
void ClearTraces() { m_traces.clear(); }
void ResetScales( bool aIncludeX, SIM_PLOT_DIAGRAM* aPlotDiagram );
public:
wxPoint m_LastLegendPosition;
private:
wxWindow* m_parent;
// The plot window
mpWindow* m_plotWin;
/*
// A to be used plot's sizer
wxStaticBoxSizer* m_sizerBox;
*/
// A temp plot sizer for now
wxBoxSizer* m_sizerBox;
// Traces to be plotted
std::map<wxString, TRACE*> m_traces;
mpScaleXBase* m_axis_x;
mpScaleY* m_axis_y1;
mpScaleY* m_axis_y2;
mpScaleY* m_axis_y3;
bool m_dotted_cp;
mpInfoLegend* m_legend;
wxString m_nickname;
wxString m_description;
int m_id;
};
class SIM_PLOT_TAB : public SIM_TAB
{
public:
SIM_PLOT_TAB( const wxString& aSimCommand, wxWindow* parent );
virtual ~SIM_PLOT_TAB();
void ApplyPreferences( const SIM_PREFERENCES& aPrefs ) override
{ {
m_dotted_cp = aEnable; for( const auto& plotDiagram : GetPlotDiagramVect() )
{
for( const auto& [ name, trace ] : m_traces ) // clang-format off
UpdateTraceStyle( trace ); plotDiagram->GetPrivatePlotWin()->SetMouseWheelActions( convertMouseWheelActions( aPrefs.mouse_wheel_actions ) );
// clang-format on
m_plotWin->UpdateAll(); }
} }
bool GetDottedSecondary() const const std::map<wxString, TRACE*>& GetTraces() const { return GetPlotDiagram( 0 )->GetTraces(); }
TRACE* GetTrace( const wxString& aVecName, int aType, SIM_PLOT_DIAGRAM* aPlotDiagram ) const
{ {
return m_dotted_cp; auto trace = aPlotDiagram->GetTraces().find( getTraceId( aVecName, aType ) );
return trace == aPlotDiagram->GetTraces().end() ? nullptr : trace->second;
} }
///< Turn on/off the cursor for a particular trace. ///< Turn on/off the cursor for a particular trace.
@ -338,31 +421,36 @@ public:
///< Reset scale ranges to fit the current traces. ///< Reset scale ranges to fit the current traces.
void ResetScales( bool aIncludeX ); void ResetScales( bool aIncludeX );
///< Update trace line style
void UpdateTraceStyle( TRACE* trace );
///< Update plot colors ///< Update plot colors
void UpdatePlotColors(); void UpdatePlotColorsFor( mpWindow* aPlotWindow );
void OnLanguageChanged() override; void OnLanguageChanged() override;
///< Getter for math plot window ///< Getter for math plot window
mpWindow* GetPlotWin() const { return m_plotWin; } mpWindow* GetPlotWin() const { return GetPlotDiagram( 0 )->GetPrivatePlotWin(); }
TRACE* GetOrAddTrace( const wxString& aVectorName, int aType ); TRACE* GetOrAddTrace( const wxString& aVectorName, int aType, SIM_PLOT_DIAGRAM* aPlotDiagram );
void SetTraceData( TRACE* aTrace, std::vector<double>& aX, std::vector<double>& aY, void SetTraceData( TRACE* aTrace, std::vector<double>& aX, std::vector<double>& aY, int aSweepCount,
int aSweepCount, size_t aSweepSize ); size_t aSweepSize, SIM_PLOT_DIAGRAM* aPlotDiagram );
bool DeleteTrace( const wxString& aVectorName, int aTraceType ); bool DeleteTrace( const wxString& aVectorName, int aTraceType, SIM_PLOT_DIAGRAM* aPlotDiagram );
void DeleteTrace( TRACE* aTrace ); void DeleteTrace( TRACE* aTrace, SIM_PLOT_DIAGRAM* aPlotDiagram );
std::vector<std::pair<wxString, wxString>>& Measurements() { return m_measurements; } std::vector<std::pair<wxString, wxString>>& Measurements() { return m_measurements; }
void EnsureThirdYAxisExists(); ///< Getter for SIM_PLOT_DIAGRAM vector
std::vector<SIM_PLOT_DIAGRAM*> GetPlotDiagramVect() const { return m_plotsVector; };
public: ///< Indexed getter for SIM_PLOT_DIAGRAM vector
wxPoint m_LastLegendPosition; SIM_PLOT_DIAGRAM* GetPlotDiagram( size_t aIndex ) const;
size_t GetPlotDiagramSize() const;
void SetSessionColors( const wxString& aString, const wxColour& aColor ) { m_sessionTraceColors[aString] = aColor; }
///< Public caller to update a mpWindow's contex menu entries.
void UpdateContextMenuEntriesTo( mpWindow* aPlotWin ) { updateContextMenuEntriesTo( aPlotWin ); }
private: private:
static mpWindow::MouseWheelActionSet static mpWindow::MouseWheelActionSet
@ -389,29 +477,30 @@ private:
} }
///< @brief Construct the plot axes for DC simulation plot. ///< @brief Construct the plot axes for DC simulation plot.
void prepareDCAxes( int aNewTraceType ); void prepareDCAxes( int aNewTraceType, SIM_PLOT_DIAGRAM* aPlotDiagram );
///< Create/Ensure axes are available for plotting ///< Create/Ensure axes are available for plotting
void updateAxes( int aNewTraceType = SIM_TRACE_TYPE::SPT_UNKNOWN ); void updateAxesFor( int aNewTraceType = SIM_TRACE_TYPE::SPT_UNKNOWN, SIM_PLOT_DIAGRAM* aPlotDiagram = nullptr );
void makeNewPlotDiagram();
void initContextMenuEntriesTo( mpWindow* aPlotWin );
///< Private caller to update a mpWindow's contex menu entries.
void updateContextMenuEntriesTo( mpWindow* aPlotWin );
void onNewPlotdiagram( wxCommandEvent& aEvent );
void onDeletThisPlotdiagram( wxCommandEvent& aEvent );
void onDeleteAllPlotdiagrams( wxCommandEvent& aEvent );
private: private:
SIM_PLOT_COLORS m_colors; SIM_PLOT_COLORS m_colors;
std::map<wxString, wxColour> m_sessionTraceColors; std::map<wxString, wxColour> m_sessionTraceColors;
// Top-level plot window // Top-level sizer
mpWindow* m_plotWin; wxBoxSizer* m_sizerTop;
wxBoxSizer* m_sizer;
// Traces to be plotted std::vector<SIM_PLOT_DIAGRAM*> m_plotsVector;
std::map<wxString, TRACE*> m_traces;
mpScaleXBase* m_axis_x;
mpScaleY* m_axis_y1;
mpScaleY* m_axis_y2;
mpScaleY* m_axis_y3;
mpInfoLegend* m_legend;
bool m_dotted_cp;
// Measurements (and their format strings) // Measurements (and their format strings)
std::vector<std::pair<wxString, wxString>> m_measurements; std::vector<std::pair<wxString, wxString>> m_measurements;

View File

@ -507,7 +507,6 @@ const std::map<int, wxString>& SIMULATOR_FRAME::UserDefinedSignals()
return m_ui->UserDefinedSignals(); return m_ui->UserDefinedSignals();
} }
void SIMULATOR_FRAME::SetUserDefinedSignals( const std::map<int, wxString>& aSignals ) void SIMULATOR_FRAME::SetUserDefinedSignals( const std::map<int, wxString>& aSignals )
{ {
m_ui->SetUserDefinedSignals( aSignals ); m_ui->SetUserDefinedSignals( aSignals );
@ -608,7 +607,28 @@ bool SIMULATOR_FRAME::EditAnalysis()
dlg.SetSimCommand( simTab->GetSimCommand() ); dlg.SetSimCommand( simTab->GetSimCommand() );
dlg.SetSimOptions( simTab->GetSimOptions() ); dlg.SetSimOptions( simTab->GetSimOptions() );
dlg.SetPlotSettings( simTab );
if( simTab->IsPlottable( simTab->GetSimType() ) )
{
SIM_PLOT_TAB* plotTab = dynamic_cast<SIM_PLOT_TAB*>( GetCurrentSimTab() );
// Append available plots,
for( const auto& aPlotDiagramm : plotTab->GetPlotDiagramVect() )
{
dlg.AppendStrToPlotDiagramChoice( aPlotDiagramm->GetNickName() );
}
dlg.m_sizerPlotDiagram->Show( true );
dlg.GetNotebook()->GetPage( 1 )->Enable();
// and set selection to the first entry.
dlg.SetSelToPlotDiagramChoice( 0 );
for( size_t i = 0; i < plotTab->GetPlotDiagramSize(); i++ )
{
dlg.SetPlotSettingsFor( simTab, plotTab->GetPlotDiagram( i ) );
}
}
if( dlg.ShowModal() == wxID_OK ) if( dlg.ShowModal() == wxID_OK )
{ {
@ -678,21 +698,21 @@ void SIMULATOR_FRAME::setupUIConditions()
[this]( const SELECTION& aSel ) [this]( const SELECTION& aSel )
{ {
SIM_PLOT_TAB* plotTab = dynamic_cast<SIM_PLOT_TAB*>( GetCurrentSimTab() ); SIM_PLOT_TAB* plotTab = dynamic_cast<SIM_PLOT_TAB*>( GetCurrentSimTab() );
return plotTab && plotTab->IsGridShown(); return plotTab && plotTab->GetPlotDiagram( 0 )->IsGridShown();
}; };
auto showLegendCondition = auto showLegendCondition =
[this]( const SELECTION& aSel ) [this]( const SELECTION& aSel )
{ {
SIM_PLOT_TAB* plotTab = dynamic_cast<SIM_PLOT_TAB*>( GetCurrentSimTab() ); SIM_PLOT_TAB* plotTab = dynamic_cast<SIM_PLOT_TAB*>( GetCurrentSimTab() );
return plotTab && plotTab->IsLegendShown(); return plotTab && plotTab->GetPlotDiagram( 0 )->IsLegendShown();
}; };
auto showDottedCondition = auto showDottedCondition =
[this]( const SELECTION& aSel ) [this]( const SELECTION& aSel )
{ {
SIM_PLOT_TAB* plotTab = dynamic_cast<SIM_PLOT_TAB*>( GetCurrentSimTab() ); SIM_PLOT_TAB* plotTab = dynamic_cast<SIM_PLOT_TAB*>( GetCurrentSimTab() );
return plotTab && plotTab->GetDottedSecondary(); return plotTab && plotTab->GetPlotDiagram( 0 )->GetDottedSecondary();
}; };
auto darkModePlotCondition = auto darkModePlotCondition =

File diff suppressed because it is too large Load Diff

View File

@ -30,6 +30,7 @@
#include <sim/simulator_frame_ui_base.h> #include <sim/simulator_frame_ui_base.h>
#include "widgets/wx_grid.h"
#include <sim/sim_types.h> #include <sim/sim_types.h>
#include <sim/sim_plot_tab.h> #include <sim/sim_plot_tab.h>
#include <sim/sim_preferences.h> #include <sim/sim_preferences.h>
@ -47,21 +48,23 @@ class SPICE_CIRCUIT_MODEL;
class SIM_THREAD_REPORTER; class SIM_THREAD_REPORTER;
class TUNER_SLIDER; class TUNER_SLIDER;
/** /**
* *
* The SIMULATOR_FRAME_UI holds the main user-interface for running simulations. * The SIMULATOR_FRAME_UI holds the main user-interface for running simulations.
* *
* It contains a workbook with multiple tabs, each tab holding a SIM_PLOT_TAB, a specific * It contains a workbook with multiple tabs, each tab holding a SIM_PLOT_TAB
* simulation command (.TRAN, .AC, etc.), and simulation settings (save all currents, etc.). * that in its turn holds a SIM_PLOT_DIAGRAM std::vector to allow multiple/dynamic plots,
* a specific simulation command (.TRAN, .AC, etc.), and simulation settings (save all currents, etc.).
* *
* Each plot can have multiple TRACEs. While internally each TRACE can have multiple cursors, * Each plot can have multiple TRACEs. While internally each TRACE can have multiple cursors,
* the GUI supports only two cursors (and a differential cursor) for each plot. * the GUI supports only two hardcoded cursors 1 & 2 for each plot
* (and a differential cursor when both 1 & 2 are enabled ),
* plus some dynamically created cursors that do not offer a differential one.
* *
* TRACEs are identified by a signal (V(OUT), I(R2), etc.) and a type (SPT_VOLTAGE, SPT_AC_PHASE, * TRACEs are identified by a signal (V(OUT), I(R2), etc.) and a type (SPT_VOLTAGE, SPT_AC_PHASE,
* etc.). * etc.).
* *
* The simulator outputs simple signals in a vector of the same name. Complex signals (such as * The simulator outputs simple signals in a vector of the same name. Complex signals (such as
* V(OUT) / V(IN)) are stored in vectors of the format "user%d". * V(OUT) / V(IN)) are stored in vectors of the format "user%d".
* *
*/ */
@ -85,6 +88,9 @@ public:
std::vector<wxString> Signals() const; std::vector<wxString> Signals() const;
const std::map<int, wxString>& UserDefinedSignals() { return m_userDefinedSignals; } const std::map<int, wxString>& UserDefinedSignals() { return m_userDefinedSignals; }
wxAuiNotebook* GetPlotTabNotebook() { return m_plotNotebook; }
void SetUserDefinedSignals( const std::map<int, wxString>& aSignals ); void SetUserDefinedSignals( const std::map<int, wxString>& aSignals );
/** /**
@ -102,6 +108,18 @@ public:
*/ */
void DeleteCursor(); void DeleteCursor();
/**
* Shows a signal from m_signalsGrid to an aux plot
* Called from grids context menu.
*/
void ShowSignalToPlot( wxString& aSignalName, wxString& anEventID );
/**
* Public member to fire after ShowSignalToPlot
* from m_signalsGrid context menu
*/
void UpdateSignalsGrid() { updateSignalsGrid(); }
/** /**
* Add a new trace to the current plot. * Add a new trace to the current plot.
* *
@ -253,6 +271,11 @@ public:
void OnModify(); void OnModify();
const WX_GRID* GetSignalsGrid() { return m_signalsGrid; }
wxString GetSignalsGridCellValue( int aRow, int aCol ) { return GetSignalsGrid()->GetCellValue( aRow, aCol ); }
std::shared_ptr<SPICE_SIMULATOR> GetSimulator() const { return simulator(); }
private: private:
/** /**
* Get the simulator output vector name for a given signal name and type. * Get the simulator output vector name for a given signal name and type.
@ -267,9 +290,12 @@ private:
* @param aVectorName is the SPICE vector name, such as "I(Net-C1-Pad1)". * @param aVectorName is the SPICE vector name, such as "I(Net-C1-Pad1)".
* @param aTraceType describes the type of plot. * @param aTraceType describes the type of plot.
* @param aPlotTab is the tab that should receive the update. * @param aPlotTab is the tab that should receive the update.
* @param aPlotDiagram is a single plot diagram to update.
* if nullptr then iterate through the vector and update all existing plots.
*/ */
void updateTrace( const wxString& aVectorName, int aTraceType, SIM_PLOT_TAB* aPlotTab, void updateTrace( const wxString& aVectorName, int aTraceType, SIM_PLOT_TAB* aPlotTab,
std::vector<double>* aDataX = nullptr, bool aClearData = false ); std::vector<double>* aDataX = nullptr, bool aClearData = false,
SIM_PLOT_DIAGRAM* aPlotDiagram = nullptr );
/** /**
* A common toggler for the two main wxSplitterWindow s * A common toggler for the two main wxSplitterWindow s
@ -368,6 +394,8 @@ private:
void onPlotCursorUpdate( wxCommandEvent& aEvent ); void onPlotCursorUpdate( wxCommandEvent& aEvent );
void PlotProperties( wxCommandEvent& aEvent );
public: public:
int m_SuppressGridEvents; int m_SuppressGridEvents;

View File

@ -93,6 +93,8 @@ int SIMULATOR_CONTROL::NewAnalysisTab( const TOOL_EVENT& aEvent )
dlg.SetSimCommand( wxS( "*" ) ); dlg.SetSimCommand( wxS( "*" ) );
dlg.SetSimOptions( NETLIST_EXPORTER_SPICE::OPTION_DEFAULT_FLAGS ); dlg.SetSimOptions( NETLIST_EXPORTER_SPICE::OPTION_DEFAULT_FLAGS );
dlg.ShowPage( 0 );
if( dlg.ShowModal() == wxID_OK ) if( dlg.ShowModal() == wxID_OK )
{ {
SIM_TAB* tab = m_simulatorFrame->NewSimTab( dlg.GetSimCommand() ); SIM_TAB* tab = m_simulatorFrame->NewSimTab( dlg.GetSimCommand() );
@ -421,7 +423,7 @@ int SIMULATOR_CONTROL::ToggleGrid( const TOOL_EVENT& aEvent )
{ {
if( SIM_PLOT_TAB* plotTab = dynamic_cast<SIM_PLOT_TAB*>( getCurrentSimTab() ) ) if( SIM_PLOT_TAB* plotTab = dynamic_cast<SIM_PLOT_TAB*>( getCurrentSimTab() ) )
{ {
plotTab->ShowGrid( !plotTab->IsGridShown() ); plotTab->GetPlotDiagram( 0 )->ShowGrid( !plotTab->GetPlotDiagram( 0 )->IsGridShown() );
m_simulatorFrame->OnModify(); m_simulatorFrame->OnModify();
} }
@ -433,7 +435,7 @@ int SIMULATOR_CONTROL::ToggleLegend( const TOOL_EVENT& aEvent )
{ {
if( SIM_PLOT_TAB* plotTab = dynamic_cast<SIM_PLOT_TAB*>( getCurrentSimTab() ) ) if( SIM_PLOT_TAB* plotTab = dynamic_cast<SIM_PLOT_TAB*>( getCurrentSimTab() ) )
{ {
plotTab->ShowLegend( !plotTab->IsLegendShown() ); plotTab->GetPlotDiagram( 0 )->ShowLegend( !plotTab->GetPlotDiagram( 0 )->IsLegendShown() );
m_simulatorFrame->OnModify(); m_simulatorFrame->OnModify();
} }
@ -445,7 +447,7 @@ int SIMULATOR_CONTROL::ToggleDottedSecondary( const TOOL_EVENT& aEvent )
{ {
if( SIM_PLOT_TAB* plotTab = dynamic_cast<SIM_PLOT_TAB*>( getCurrentSimTab() ) ) if( SIM_PLOT_TAB* plotTab = dynamic_cast<SIM_PLOT_TAB*>( getCurrentSimTab() ) )
{ {
plotTab->SetDottedSecondary( !plotTab->GetDottedSecondary() ); plotTab->GetPlotDiagram( 0 )->SetDottedSecondary( !plotTab->GetPlotDiagram( 0 )->GetDottedSecondary() );
m_simulatorFrame->OnModify(); m_simulatorFrame->OnModify();
} }

View File

@ -112,12 +112,22 @@ class WXDLLIMPEXP_MATHPLOT mpPrintout;
/** Command IDs used by mpWindow */ /** Command IDs used by mpWindow */
enum enum
{ {
// clang-format off
mpID_FIT = 2000, // !< Fit view to match bounding box of all layers mpID_FIT = 2000, // !< Fit view to match bounding box of all layers
mpID_ZOOM_UNDO, mpID_ZOOM_UNDO,
mpID_ZOOM_REDO, mpID_ZOOM_REDO,
mpID_ZOOM_IN, // !< Zoom into view at clickposition / window center mpID_ZOOM_IN, // !< Zoom into view at clickposition / window center
mpID_ZOOM_OUT, // !< Zoom out mpID_ZOOM_OUT, // !< Zoom out
mpID_CENTER, // !< Center view on click position mpID_CENTER, // !< Center view on click position
// Not handled directly by mpWindow, here we just queue an event
mpID_PLOT_PROP, // !< Opens plot's properties
mpID_NEW_PLOTDIAGRAM, // !< Create a new plot into current sim tab,
mpID_DELETE_THIS_PLOTDIAGRAM, // !< Closes selected plot from current sim tab,
mpID_DELETE_ALL_PLOTDIAGRAMS, // !< Closes all but the main plot from current sim tab,
// clang-format on
}; };
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
@ -1290,6 +1300,13 @@ protected:
void onZoomOut( wxCommandEvent& event ); // !< Context menu handler void onZoomOut( wxCommandEvent& event ); // !< Context menu handler
void onZoomUndo( wxCommandEvent& event ); // !< Context menu handler void onZoomUndo( wxCommandEvent& event ); // !< Context menu handler
void onZoomRedo( wxCommandEvent& event ); // !< Context menu handler void onZoomRedo( wxCommandEvent& event ); // !< Context menu handler
void onPlotProperties( wxCommandEvent& event ); // !< Context menu handler to open plot properties
void onNewPlotdiagram( wxCommandEvent& event ); // !< Context menu handler to make a new plot
void onDeleteThisPlotdiagram( wxCommandEvent& event ); // !< Context menu handler to delete selected plot
void onDeleteAllPlotdiagrams( wxCommandEvent& event ); // !< Context menu handler to delete all plots
void onMouseWheel( wxMouseEvent& event ); // !< Mouse handler for the wheel void onMouseWheel( wxMouseEvent& event ); // !< Mouse handler for the wheel
void onMagnify( wxMouseEvent& event ); // !< Pinch zoom handler void onMagnify( wxMouseEvent& event ); // !< Pinch zoom handler
void onMouseMove( wxMouseEvent& event ); // !< Mouse handler for mouse motion (for pan) void onMouseMove( wxMouseEvent& event ); // !< Mouse handler for mouse motion (for pan)
@ -1482,4 +1499,10 @@ protected:
}; };
wxDECLARE_EVENT( EVT_SIM_PLOT_PROPERTIES, wxCommandEvent );
wxDECLARE_EVENT( EVT_SIM_NEW_PLOTDIAGRAM, wxCommandEvent );
wxDECLARE_EVENT( EVT_SIM_DELETE_THIS_PLOTDIAGRAM, wxCommandEvent );
wxDECLARE_EVENT( EVT_SIM_DELETE_ALL_PLOTDIAGRAMS, wxCommandEvent );
#endif // _MP_MATHPLOT_H_ #endif // _MP_MATHPLOT_H_