Tuner tool.
This commit is contained in:
parent
fead9ca831
commit
92a3e405c2
|
@ -191,6 +191,8 @@ set( EESCHEMA_SRCS
|
||||||
dialogs/dialog_sim_settings_base.cpp
|
dialogs/dialog_sim_settings_base.cpp
|
||||||
dialogs/dialog_spice_model.cpp
|
dialogs/dialog_spice_model.cpp
|
||||||
dialogs/dialog_spice_model_base.cpp
|
dialogs/dialog_spice_model_base.cpp
|
||||||
|
widgets/tuner_slider.cpp
|
||||||
|
widgets/tuner_slider_base.cpp
|
||||||
|
|
||||||
netlist_exporters/netlist_exporter.cpp
|
netlist_exporters/netlist_exporter.cpp
|
||||||
netlist_exporters/netlist_exporter_cadstar.cpp
|
netlist_exporters/netlist_exporter_cadstar.cpp
|
||||||
|
|
|
@ -257,7 +257,8 @@ enum id_eeschema_frm
|
||||||
ID_UPDATE_SCH_FROM_PCB,
|
ID_UPDATE_SCH_FROM_PCB,
|
||||||
|
|
||||||
ID_SIM_SHOW,
|
ID_SIM_SHOW,
|
||||||
ID_SIM_ADD_PROBE
|
ID_SIM_PROBE,
|
||||||
|
ID_SIM_TUNE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -325,7 +325,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_SIM_ADD_PROBE:
|
case ID_SIM_PROBE:
|
||||||
{
|
{
|
||||||
const KICAD_T wiresAndComponents[] = { SCH_LINE_T, SCH_COMPONENT_T, SCH_SHEET_PIN_T };
|
const KICAD_T wiresAndComponents[] = { SCH_LINE_T, SCH_COMPONENT_T, SCH_SHEET_PIN_T };
|
||||||
item = LocateAndShowItem( aPosition, wiresAndComponents );
|
item = LocateAndShowItem( aPosition, wiresAndComponents );
|
||||||
|
@ -350,6 +350,29 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ID_SIM_TUNE:
|
||||||
|
{
|
||||||
|
const KICAD_T fieldsAndComponents[] = { SCH_COMPONENT_T, SCH_FIELD_T };
|
||||||
|
item = LocateAndShowItem( aPosition, fieldsAndComponents );
|
||||||
|
|
||||||
|
if( !item )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if( item->Type() != SCH_COMPONENT_T )
|
||||||
|
{
|
||||||
|
item = static_cast<SCH_ITEM*>( item->GetParent() );
|
||||||
|
|
||||||
|
if( item->Type() != SCH_COMPONENT_T )
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
SIM_PLOT_FRAME* simFrame = (SIM_PLOT_FRAME*) Kiway().Player( FRAME_SIMULATOR, false );
|
||||||
|
|
||||||
|
if( simFrame )
|
||||||
|
simFrame->AddTuner( static_cast<SCH_COMPONENT*>( item ) );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString );
|
SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString );
|
||||||
wxFAIL_MSG( wxT( "SCH_EDIT_FRAME::OnLeftClick invalid tool ID <" ) +
|
wxFAIL_MSG( wxT( "SCH_EDIT_FRAME::OnLeftClick invalid tool ID <" ) +
|
||||||
|
|
|
@ -609,11 +609,16 @@ void SCH_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent )
|
||||||
SetToolID( id, wxCURSOR_BULLSEYE, _( "Delete item" ) );
|
SetToolID( id, wxCURSOR_BULLSEYE, _( "Delete item" ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_SIM_ADD_PROBE:
|
case ID_SIM_PROBE:
|
||||||
SetToolID( id, -1, _( "Add a simulator probe" ) );
|
SetToolID( id, -1, _( "Add a simulator probe" ) );
|
||||||
m_canvas->SetCursor( CURSOR_PROBE );
|
m_canvas->SetCursor( CURSOR_PROBE );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ID_SIM_TUNE:
|
||||||
|
SetToolID( id, -1, _( "Select a value to be tuned" ) );
|
||||||
|
m_canvas->SetCursor( CURSOR_TUNE );
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
SetRepeatItem( NULL );
|
SetRepeatItem( NULL );
|
||||||
}
|
}
|
||||||
|
|
|
@ -281,7 +281,8 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
|
||||||
EVT_TOOL_RANGE( ID_SCHEMATIC_VERTICAL_TOOLBAR_START, ID_SCHEMATIC_VERTICAL_TOOLBAR_END,
|
EVT_TOOL_RANGE( ID_SCHEMATIC_VERTICAL_TOOLBAR_START, ID_SCHEMATIC_VERTICAL_TOOLBAR_END,
|
||||||
SCH_EDIT_FRAME::OnSelectTool )
|
SCH_EDIT_FRAME::OnSelectTool )
|
||||||
|
|
||||||
EVT_TOOL( ID_SIM_ADD_PROBE, SCH_EDIT_FRAME::OnSelectTool )
|
EVT_TOOL( ID_SIM_PROBE, SCH_EDIT_FRAME::OnSelectTool )
|
||||||
|
EVT_TOOL( ID_SIM_TUNE, SCH_EDIT_FRAME::OnSelectTool )
|
||||||
|
|
||||||
EVT_MENU( ID_CANCEL_CURRENT_COMMAND, SCH_EDIT_FRAME::OnCancelCurrentCommand )
|
EVT_MENU( ID_CANCEL_CURRENT_COMMAND, SCH_EDIT_FRAME::OnCancelCurrentCommand )
|
||||||
EVT_MENU( ID_SCH_DRAG_ITEM, SCH_EDIT_FRAME::OnDragItem )
|
EVT_MENU( ID_SCH_DRAG_ITEM, SCH_EDIT_FRAME::OnDragItem )
|
||||||
|
|
|
@ -1381,8 +1381,12 @@ public:
|
||||||
|
|
||||||
wxString GetNetListerCommand() const { return m_netListerCommand; }
|
wxString GetNetListerCommand() const { return m_netListerCommand; }
|
||||||
|
|
||||||
|
///> Probe cursor, used by circuit simulator
|
||||||
const static wxCursor CURSOR_PROBE;
|
const static wxCursor CURSOR_PROBE;
|
||||||
|
|
||||||
|
///> Tuner cursor, used by circuit simulator
|
||||||
|
const static wxCursor CURSOR_TUNE;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,9 @@
|
||||||
#include <schframe.h>
|
#include <schframe.h>
|
||||||
#include <eeschema_id.h>
|
#include <eeschema_id.h>
|
||||||
#include <kiway.h>
|
#include <kiway.h>
|
||||||
|
#include <confirm.h>
|
||||||
|
|
||||||
|
#include <widgets/tuner_slider.h>
|
||||||
#include <dialogs/dialog_signal_list.h>
|
#include <dialogs/dialog_signal_list.h>
|
||||||
#include "netlist_exporter_pspice_sim.h"
|
#include "netlist_exporter_pspice_sim.h"
|
||||||
|
|
||||||
|
@ -87,6 +89,7 @@ SIM_PLOT_FRAME::SIM_PLOT_FRAME( KIWAY* aKiway, wxWindow* aParent )
|
||||||
updateNetlistExporter();
|
updateNetlistExporter();
|
||||||
|
|
||||||
Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SIM_PLOT_FRAME::onClose ), NULL, this );
|
Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SIM_PLOT_FRAME::onClose ), NULL, this );
|
||||||
|
Connect( EVT_SIM_UPDATE, wxCommandEventHandler( SIM_PLOT_FRAME::onSimUpdate ), NULL, this );
|
||||||
Connect( EVT_SIM_REPORT, wxCommandEventHandler( SIM_PLOT_FRAME::onSimReport ), NULL, this );
|
Connect( EVT_SIM_REPORT, wxCommandEventHandler( SIM_PLOT_FRAME::onSimReport ), NULL, this );
|
||||||
Connect( EVT_SIM_STARTED, wxCommandEventHandler( SIM_PLOT_FRAME::onSimStarted ), NULL, this );
|
Connect( EVT_SIM_STARTED, wxCommandEventHandler( SIM_PLOT_FRAME::onSimStarted ), NULL, this );
|
||||||
Connect( EVT_SIM_FINISHED, wxCommandEventHandler( SIM_PLOT_FRAME::onSimFinished ), NULL, this );
|
Connect( EVT_SIM_FINISHED, wxCommandEventHandler( SIM_PLOT_FRAME::onSimFinished ), NULL, this );
|
||||||
|
@ -105,17 +108,20 @@ void SIM_PLOT_FRAME::StartSimulation()
|
||||||
|
|
||||||
m_simConsole->Clear();
|
m_simConsole->Clear();
|
||||||
|
|
||||||
// TODO check if there is a valid simulation command
|
updateNetlistExporter();
|
||||||
|
m_exporter->SetSimCommand( m_settingsDlg.GetSimCommand() );
|
||||||
|
m_exporter->Format( &formatter, m_settingsDlg.GetNetlistOptions() );
|
||||||
|
|
||||||
|
if( m_exporter->GetSimType() == ST_UNKNOWN )
|
||||||
|
{
|
||||||
|
DisplayInfoMessage( this, wxT( "You need to select the simulation settings first" ) );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/// @todo is it necessary to recreate simulator every time?
|
/// @todo is it necessary to recreate simulator every time?
|
||||||
m_simulator.reset( SPICE_SIMULATOR::CreateInstance( "ngspice" ) );
|
m_simulator.reset( SPICE_SIMULATOR::CreateInstance( "ngspice" ) );
|
||||||
m_simulator->SetReporter( new SIM_THREAD_REPORTER( this ) );
|
m_simulator->SetReporter( new SIM_THREAD_REPORTER( this ) );
|
||||||
m_simulator->Init();
|
m_simulator->Init();
|
||||||
|
|
||||||
updateNetlistExporter();
|
|
||||||
m_exporter->SetSimCommand( m_settingsDlg.GetSimCommand() );
|
|
||||||
m_exporter->Format( &formatter, m_settingsDlg.GetNetlistOptions() );
|
|
||||||
|
|
||||||
m_simulator->LoadNetlist( formatter.GetString() );
|
m_simulator->LoadNetlist( formatter.GetString() );
|
||||||
m_simulator->Run();
|
m_simulator->Run();
|
||||||
}
|
}
|
||||||
|
@ -128,6 +134,12 @@ void SIM_PLOT_FRAME::StopSimulation()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool SIM_PLOT_FRAME::IsSimulationRunning()
|
||||||
|
{
|
||||||
|
return m_simulator ? m_simulator->IsRunning() : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
SIM_PLOT_PANEL* SIM_PLOT_FRAME::NewPlotPanel( SIM_TYPE aSimType )
|
SIM_PLOT_PANEL* SIM_PLOT_FRAME::NewPlotPanel( SIM_TYPE aSimType )
|
||||||
{
|
{
|
||||||
SIM_PLOT_PANEL* plot = new SIM_PLOT_PANEL( aSimType, m_plotNotebook, wxID_ANY );
|
SIM_PLOT_PANEL* plot = new SIM_PLOT_PANEL( aSimType, m_plotNotebook, wxID_ANY );
|
||||||
|
@ -165,15 +177,56 @@ void SIM_PLOT_FRAME::AddVoltagePlot( const wxString& aNetName )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SIM_PLOT_PANEL* SIM_PLOT_FRAME::CurrentPlot() const
|
void SIM_PLOT_FRAME::AddTuner( SCH_COMPONENT* aComponent )
|
||||||
{
|
{
|
||||||
return static_cast<SIM_PLOT_PANEL*>( m_plotNotebook->GetCurrentPage() );
|
SIM_PLOT_PANEL* plotPanel = CurrentPlot();
|
||||||
|
|
||||||
|
if( !plotPanel )
|
||||||
|
return;
|
||||||
|
|
||||||
|
const wxString& componentName = aComponent->GetField( REFERENCE )->GetText();
|
||||||
|
auto& tunerList = m_tuners[plotPanel];
|
||||||
|
|
||||||
|
// Do not add multiple instances for the same component
|
||||||
|
auto tunerIt = std::find_if( tunerList.begin(), tunerList.end(), [&]( const TUNER_SLIDER* t )
|
||||||
|
{
|
||||||
|
return t->GetComponentName() == componentName;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
if( tunerIt != tunerList.end() )
|
||||||
|
return; // We already have it
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
TUNER_SLIDER* tuner = new TUNER_SLIDER( this, aComponent );
|
||||||
|
m_tuneSizer->Add( tuner );
|
||||||
|
tunerList.push_back( tuner );
|
||||||
|
Layout();
|
||||||
|
}
|
||||||
|
catch( ... )
|
||||||
|
{
|
||||||
|
// Sorry, no bonus
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool SIM_PLOT_FRAME::isSimulationRunning()
|
void SIM_PLOT_FRAME::RemoveTuner( TUNER_SLIDER* aTuner )
|
||||||
{
|
{
|
||||||
return m_simulator ? m_simulator->IsRunning() : false;
|
SIM_PLOT_PANEL* plotPanel = CurrentPlot();
|
||||||
|
|
||||||
|
if( !plotPanel )
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_tuners[plotPanel].remove( aTuner );
|
||||||
|
aTuner->Destroy();
|
||||||
|
Layout();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SIM_PLOT_PANEL* SIM_PLOT_FRAME::CurrentPlot() const
|
||||||
|
{
|
||||||
|
return static_cast<SIM_PLOT_PANEL*>( m_plotNotebook->GetCurrentPage() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -283,6 +336,28 @@ void SIM_PLOT_FRAME::updateSignalList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SIM_PLOT_FRAME::updateTuners()
|
||||||
|
{
|
||||||
|
SIM_PLOT_PANEL* plotPanel = CurrentPlot();
|
||||||
|
|
||||||
|
if( !plotPanel )
|
||||||
|
return;
|
||||||
|
|
||||||
|
for( unsigned int i = 0; i < m_tuneSizer->GetItemCount(); ++i )
|
||||||
|
m_tuneSizer->Hide( i );
|
||||||
|
|
||||||
|
m_tuneSizer->Clear();
|
||||||
|
|
||||||
|
for( auto tuner : m_tuners[plotPanel] )
|
||||||
|
{
|
||||||
|
m_tuneSizer->Add( tuner );
|
||||||
|
tuner->Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
Layout();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int SIM_PLOT_FRAME::getNodeNumber( const wxString& aNetName )
|
int SIM_PLOT_FRAME::getNodeNumber( const wxString& aNetName )
|
||||||
{
|
{
|
||||||
const auto& netMapping = m_exporter->GetNetIndexMap();
|
const auto& netMapping = m_exporter->GetNetIndexMap();
|
||||||
|
@ -419,6 +494,7 @@ void SIM_PLOT_FRAME::menuShowCoordsUpdate( wxUpdateUIEvent& event )
|
||||||
void SIM_PLOT_FRAME::onPlotChanged( wxNotebookEvent& event )
|
void SIM_PLOT_FRAME::onPlotChanged( wxNotebookEvent& event )
|
||||||
{
|
{
|
||||||
updateSignalList();
|
updateSignalList();
|
||||||
|
updateTuners();
|
||||||
|
|
||||||
// Update cursors
|
// Update cursors
|
||||||
wxQueueEvent( this, new wxCommandEvent( EVT_SIM_CURSOR_UPDATE ) );
|
wxQueueEvent( this, new wxCommandEvent( EVT_SIM_CURSOR_UPDATE ) );
|
||||||
|
@ -461,7 +537,7 @@ void SIM_PLOT_FRAME::onSignalRClick( wxMouseEvent& event )
|
||||||
|
|
||||||
void SIM_PLOT_FRAME::onSimulate( wxCommandEvent& event )
|
void SIM_PLOT_FRAME::onSimulate( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
if( isSimulationRunning() )
|
if( IsSimulationRunning() )
|
||||||
StopSimulation();
|
StopSimulation();
|
||||||
else
|
else
|
||||||
StartSimulation();
|
StartSimulation();
|
||||||
|
@ -489,14 +565,22 @@ void SIM_PLOT_FRAME::onProbe( wxCommandEvent& event )
|
||||||
if( m_schematicFrame == NULL )
|
if( m_schematicFrame == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxCommandEvent* placeProbe = new wxCommandEvent( wxEVT_TOOL, ID_SIM_ADD_PROBE );
|
wxQueueEvent( m_schematicFrame, new wxCommandEvent( wxEVT_TOOL, ID_SIM_PROBE ) );
|
||||||
wxQueueEvent( m_schematicFrame, placeProbe );
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SIM_PLOT_FRAME::onTune( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
if( m_schematicFrame == NULL )
|
||||||
|
return;
|
||||||
|
|
||||||
|
wxQueueEvent( m_schematicFrame, new wxCommandEvent( wxEVT_TOOL, ID_SIM_TUNE ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SIM_PLOT_FRAME::onClose( wxCloseEvent& aEvent )
|
void SIM_PLOT_FRAME::onClose( wxCloseEvent& aEvent )
|
||||||
{
|
{
|
||||||
if( isSimulationRunning() )
|
if( IsSimulationRunning() )
|
||||||
m_simulator->Stop();
|
m_simulator->Stop();
|
||||||
|
|
||||||
Destroy();
|
Destroy();
|
||||||
|
@ -539,6 +623,10 @@ void SIM_PLOT_FRAME::onSimFinished( wxCommandEvent& aEvent )
|
||||||
SetCursor( wxCURSOR_ARROW );
|
SetCursor( wxCURSOR_ARROW );
|
||||||
|
|
||||||
SIM_TYPE simType = m_exporter->GetSimType();
|
SIM_TYPE simType = m_exporter->GetSimType();
|
||||||
|
|
||||||
|
if( simType == ST_UNKNOWN )
|
||||||
|
return;
|
||||||
|
|
||||||
SIM_PLOT_PANEL* plotPanel = CurrentPlot();
|
SIM_PLOT_PANEL* plotPanel = CurrentPlot();
|
||||||
|
|
||||||
if( plotPanel == nullptr || plotPanel->GetType() != simType )
|
if( plotPanel == nullptr || plotPanel->GetType() != simType )
|
||||||
|
@ -565,6 +653,32 @@ void SIM_PLOT_FRAME::onSimFinished( wxCommandEvent& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SIM_PLOT_FRAME::onSimUpdate( wxCommandEvent& aEvent )
|
||||||
|
{
|
||||||
|
if( !m_simulator )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if( IsSimulationRunning() )
|
||||||
|
StopSimulation();
|
||||||
|
|
||||||
|
m_simConsole->Clear();
|
||||||
|
|
||||||
|
// Apply tuned values
|
||||||
|
if( SIM_PLOT_PANEL* plotPanel = CurrentPlot() )
|
||||||
|
{
|
||||||
|
for( auto tuner : m_tuners[plotPanel] )
|
||||||
|
{
|
||||||
|
/// @todo no ngspice hardcoding
|
||||||
|
std::string command( "alter @" + tuner->GetSpiceName()
|
||||||
|
+ "=" + tuner->GetValue().ToSpiceString() );
|
||||||
|
m_simulator->Command( command );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
m_simulator->Run();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void SIM_PLOT_FRAME::onSimReport( wxCommandEvent& aEvent )
|
void SIM_PLOT_FRAME::onSimReport( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
std::cout << aEvent.GetString() << std::endl;
|
std::cout << aEvent.GetString() << std::endl;
|
||||||
|
@ -624,6 +738,8 @@ void SIM_PLOT_FRAME::SIGNAL_CONTEXT_MENU::onMenuEvent( wxMenuEvent& aEvent )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxDEFINE_EVENT( EVT_SIM_UPDATE, wxCommandEvent );
|
||||||
wxDEFINE_EVENT( EVT_SIM_REPORT, wxCommandEvent );
|
wxDEFINE_EVENT( EVT_SIM_REPORT, wxCommandEvent );
|
||||||
|
|
||||||
wxDEFINE_EVENT( EVT_SIM_STARTED, wxCommandEvent );
|
wxDEFINE_EVENT( EVT_SIM_STARTED, wxCommandEvent );
|
||||||
wxDEFINE_EVENT( EVT_SIM_FINISHED, wxCommandEvent );
|
wxDEFINE_EVENT( EVT_SIM_FINISHED, wxCommandEvent );
|
||||||
|
|
|
@ -36,12 +36,18 @@
|
||||||
#include <dialogs/dialog_sim_settings.h>
|
#include <dialogs/dialog_sim_settings.h>
|
||||||
|
|
||||||
#include <wx/event.h>
|
#include <wx/event.h>
|
||||||
|
|
||||||
|
#include <list>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
class SCH_EDIT_FRAME;
|
class SCH_EDIT_FRAME;
|
||||||
|
class SCH_COMPONENT;
|
||||||
|
|
||||||
class SPICE_SIMULATOR;
|
class SPICE_SIMULATOR;
|
||||||
class NETLIST_EXPORTER_PSPICE_SIM;
|
class NETLIST_EXPORTER_PSPICE_SIM;
|
||||||
class SIM_PLOT_PANEL;
|
class SIM_PLOT_PANEL;
|
||||||
|
class TUNER_SLIDER;
|
||||||
|
|
||||||
/** Implementing SIM_PLOT_FRAME_BASE */
|
/** Implementing SIM_PLOT_FRAME_BASE */
|
||||||
class SIM_PLOT_FRAME : public SIM_PLOT_FRAME_BASE
|
class SIM_PLOT_FRAME : public SIM_PLOT_FRAME_BASE
|
||||||
|
@ -53,6 +59,7 @@ class SIM_PLOT_FRAME : public SIM_PLOT_FRAME_BASE
|
||||||
|
|
||||||
void StartSimulation();
|
void StartSimulation();
|
||||||
void StopSimulation();
|
void StopSimulation();
|
||||||
|
bool IsSimulationRunning();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a new plot panel for a given simulation type and adds it to the main
|
* @brief Creates a new plot panel for a given simulation type and adds it to the main
|
||||||
|
@ -64,11 +71,13 @@ class SIM_PLOT_FRAME : public SIM_PLOT_FRAME_BASE
|
||||||
|
|
||||||
void AddVoltagePlot( const wxString& aNetName );
|
void AddVoltagePlot( const wxString& aNetName );
|
||||||
|
|
||||||
|
void AddTuner( SCH_COMPONENT* aComponent );
|
||||||
|
|
||||||
|
void RemoveTuner( TUNER_SLIDER* aTuner );
|
||||||
|
|
||||||
SIM_PLOT_PANEL* CurrentPlot() const;
|
SIM_PLOT_PANEL* CurrentPlot() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool isSimulationRunning();
|
|
||||||
|
|
||||||
void updateNetlistExporter();
|
void updateNetlistExporter();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -87,6 +96,11 @@ class SIM_PLOT_FRAME : public SIM_PLOT_FRAME_BASE
|
||||||
*/
|
*/
|
||||||
void updateSignalList();
|
void updateSignalList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Fills the tuners area with the ones related to the current plot.
|
||||||
|
*/
|
||||||
|
void updateTuners();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns node number for a given net.
|
* @brief Returns node number for a given net.
|
||||||
* @param aNetName is the net number.
|
* @param aNetName is the net number.
|
||||||
|
@ -124,17 +138,20 @@ class SIM_PLOT_FRAME : public SIM_PLOT_FRAME_BASE
|
||||||
void onSettings( wxCommandEvent& event ) override;
|
void onSettings( wxCommandEvent& event ) override;
|
||||||
void onAddSignal( wxCommandEvent& event ) override;
|
void onAddSignal( wxCommandEvent& event ) override;
|
||||||
void onProbe( wxCommandEvent& event ) override;
|
void onProbe( wxCommandEvent& event ) override;
|
||||||
|
void onTune( wxCommandEvent& event ) override;
|
||||||
|
|
||||||
void onClose( wxCloseEvent& aEvent );
|
void onClose( wxCloseEvent& aEvent );
|
||||||
|
|
||||||
void onCursorUpdate( wxCommandEvent& aEvent );
|
void onCursorUpdate( wxCommandEvent& aEvent );
|
||||||
|
void onSimUpdate( wxCommandEvent& aEvent );
|
||||||
|
void onSimReport( wxCommandEvent& aEvent );
|
||||||
void onSimStarted( wxCommandEvent& aEvent );
|
void onSimStarted( wxCommandEvent& aEvent );
|
||||||
void onSimFinished( wxCommandEvent& aEvent );
|
void onSimFinished( wxCommandEvent& aEvent );
|
||||||
void onSimReport( wxCommandEvent& aEvent );
|
|
||||||
|
|
||||||
SCH_EDIT_FRAME* m_schematicFrame;
|
SCH_EDIT_FRAME* m_schematicFrame;
|
||||||
std::unique_ptr<NETLIST_EXPORTER_PSPICE_SIM> m_exporter;
|
std::unique_ptr<NETLIST_EXPORTER_PSPICE_SIM> m_exporter;
|
||||||
std::unique_ptr<SPICE_SIMULATOR> m_simulator;
|
std::unique_ptr<SPICE_SIMULATOR> m_simulator;
|
||||||
|
std::map<SIM_PLOT_PANEL*, std::list<TUNER_SLIDER*> > m_tuners;
|
||||||
|
|
||||||
// Trick to preserve settings between runs
|
// Trick to preserve settings between runs
|
||||||
DIALOG_SIM_SETTINGS m_settingsDlg;
|
DIALOG_SIM_SETTINGS m_settingsDlg;
|
||||||
|
@ -161,7 +178,11 @@ class SIM_PLOT_FRAME : public SIM_PLOT_FRAME_BASE
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Commands
|
||||||
|
wxDECLARE_EVENT( EVT_SIM_UPDATE, wxCommandEvent );
|
||||||
wxDECLARE_EVENT( EVT_SIM_REPORT, wxCommandEvent );
|
wxDECLARE_EVENT( EVT_SIM_REPORT, wxCommandEvent );
|
||||||
|
|
||||||
|
// Notifications
|
||||||
wxDECLARE_EVENT( EVT_SIM_STARTED, wxCommandEvent );
|
wxDECLARE_EVENT( EVT_SIM_STARTED, wxCommandEvent );
|
||||||
wxDECLARE_EVENT( EVT_SIM_FINISHED, wxCommandEvent );
|
wxDECLARE_EVENT( EVT_SIM_FINISHED, wxCommandEvent );
|
||||||
|
|
||||||
|
|
|
@ -104,19 +104,34 @@ SIM_PLOT_FRAME_BASE::SIM_PLOT_FRAME_BASE( wxWindow* parent, wxWindowID id, const
|
||||||
wxBoxSizer* bSizer7;
|
wxBoxSizer* bSizer7;
|
||||||
bSizer7 = new wxBoxSizer( wxVERTICAL );
|
bSizer7 = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Signals"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
|
wxStaticBoxSizer* sbSizer1;
|
||||||
m_staticText2->Wrap( -1 );
|
sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Signals") ), wxVERTICAL );
|
||||||
bSizer7->Add( m_staticText2, 0, wxALL|wxEXPAND, 5 );
|
|
||||||
|
|
||||||
m_signals = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE|wxLB_SORT );
|
m_signals = new wxListBox( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE|wxLB_SORT );
|
||||||
bSizer7->Add( m_signals, 1, wxALL|wxEXPAND, 5 );
|
sbSizer1->Add( m_signals, 1, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
m_staticText21 = new wxStaticText( this, wxID_ANY, _("Cursors"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_staticText21->Wrap( -1 );
|
|
||||||
bSizer7->Add( m_staticText21, 0, wxALL, 5 );
|
|
||||||
|
|
||||||
m_cursors = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL );
|
bSizer7->Add( sbSizer1, 1, wxEXPAND, 5 );
|
||||||
bSizer7->Add( m_cursors, 1, wxALL|wxEXPAND, 5 );
|
|
||||||
|
wxStaticBoxSizer* sbSizer3;
|
||||||
|
sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Cursors") ), wxVERTICAL );
|
||||||
|
|
||||||
|
m_cursors = new wxListCtrl( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL );
|
||||||
|
sbSizer3->Add( m_cursors, 1, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizer7->Add( sbSizer3, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
wxStaticBoxSizer* sbSizer4;
|
||||||
|
sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Tune") ), wxVERTICAL );
|
||||||
|
|
||||||
|
m_tuneSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
|
||||||
|
sbSizer4->Add( m_tuneSizer, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizer7->Add( sbSizer4, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
wxBoxSizer* bSizer4;
|
wxBoxSizer* bSizer4;
|
||||||
bSizer4 = new wxBoxSizer( wxHORIZONTAL );
|
bSizer4 = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
|
@ -544,371 +544,261 @@
|
||||||
<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="wxBoxSizer" expanded="0">
|
<object class="wxBoxSizer" expanded="1">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">bSizer7</property>
|
<property name="name">bSizer7</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="0">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxEXPAND</property>
|
<property name="flag">wxEXPAND</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxStaticText" expanded="0">
|
<object class="wxStaticBoxSizer" expanded="0">
|
||||||
<property name="BottomDockable">1</property>
|
|
||||||
<property name="LeftDockable">1</property>
|
|
||||||
<property name="RightDockable">1</property>
|
|
||||||
<property name="TopDockable">1</property>
|
|
||||||
<property name="aui_layer"></property>
|
|
||||||
<property name="aui_name"></property>
|
|
||||||
<property name="aui_position"></property>
|
|
||||||
<property name="aui_row"></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="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="id">wxID_ANY</property>
|
||||||
<property name="label">Signals</property>
|
<property name="label">Signals</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="minimum_size"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="name">sbSizer1</property>
|
||||||
<property name="name">m_staticText2</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="parent">1</property>
|
||||||
<property name="pane_position"></property>
|
<property name="permission">none</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">wxALIGN_CENTRE</property>
|
|
||||||
<property name="subclass"></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>
|
|
||||||
<event name="OnChar"></event>
|
|
||||||
<event name="OnEnterWindow"></event>
|
|
||||||
<event name="OnEraseBackground"></event>
|
|
||||||
<event name="OnKeyDown"></event>
|
|
||||||
<event name="OnKeyUp"></event>
|
|
||||||
<event name="OnKillFocus"></event>
|
|
||||||
<event name="OnLeaveWindow"></event>
|
|
||||||
<event name="OnLeftDClick"></event>
|
|
||||||
<event name="OnLeftDown"></event>
|
|
||||||
<event name="OnLeftUp"></event>
|
|
||||||
<event name="OnMiddleDClick"></event>
|
|
||||||
<event name="OnMiddleDown"></event>
|
|
||||||
<event name="OnMiddleUp"></event>
|
|
||||||
<event name="OnMotion"></event>
|
|
||||||
<event name="OnMouseEvents"></event>
|
|
||||||
<event name="OnMouseWheel"></event>
|
|
||||||
<event name="OnPaint"></event>
|
|
||||||
<event name="OnRightDClick"></event>
|
|
||||||
<event name="OnRightDown"></event>
|
|
||||||
<event name="OnRightUp"></event>
|
|
||||||
<event name="OnSetFocus"></event>
|
|
||||||
<event name="OnSize"></event>
|
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
|
<object class="sizeritem" expanded="0">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALL|wxEXPAND</property>
|
||||||
|
<property name="proportion">1</property>
|
||||||
|
<object class="wxListBox" expanded="0">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_layer"></property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="aui_position"></property>
|
||||||
|
<property name="aui_row"></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="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_signals</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">wxLB_SINGLE|wxLB_SORT</property>
|
||||||
|
<property name="subclass"></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="OnChar"></event>
|
||||||
|
<event name="OnEnterWindow"></event>
|
||||||
|
<event name="OnEraseBackground"></event>
|
||||||
|
<event name="OnKeyDown"></event>
|
||||||
|
<event name="OnKeyUp"></event>
|
||||||
|
<event name="OnKillFocus"></event>
|
||||||
|
<event name="OnLeaveWindow"></event>
|
||||||
|
<event name="OnLeftDClick"></event>
|
||||||
|
<event name="OnLeftDown"></event>
|
||||||
|
<event name="OnLeftUp"></event>
|
||||||
|
<event name="OnListBox"></event>
|
||||||
|
<event name="OnListBoxDClick">onSignalDblClick</event>
|
||||||
|
<event name="OnMiddleDClick"></event>
|
||||||
|
<event name="OnMiddleDown"></event>
|
||||||
|
<event name="OnMiddleUp"></event>
|
||||||
|
<event name="OnMotion"></event>
|
||||||
|
<event name="OnMouseEvents"></event>
|
||||||
|
<event name="OnMouseWheel"></event>
|
||||||
|
<event name="OnPaint"></event>
|
||||||
|
<event name="OnRightDClick"></event>
|
||||||
|
<event name="OnRightDown"></event>
|
||||||
|
<event name="OnRightUp">onSignalRClick</event>
|
||||||
|
<event name="OnSetFocus"></event>
|
||||||
|
<event name="OnSize"></event>
|
||||||
|
<event name="OnUpdateUI"></event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxEXPAND</property>
|
<property name="flag">wxEXPAND</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxListBox" expanded="0">
|
<object class="wxStaticBoxSizer" expanded="0">
|
||||||
<property name="BottomDockable">1</property>
|
|
||||||
<property name="LeftDockable">1</property>
|
|
||||||
<property name="RightDockable">1</property>
|
|
||||||
<property name="TopDockable">1</property>
|
|
||||||
<property name="aui_layer"></property>
|
|
||||||
<property name="aui_name"></property>
|
|
||||||
<property name="aui_position"></property>
|
|
||||||
<property name="aui_row"></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="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_signals</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">wxLB_SINGLE|wxLB_SORT</property>
|
|
||||||
<property name="subclass"></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="OnChar"></event>
|
|
||||||
<event name="OnEnterWindow"></event>
|
|
||||||
<event name="OnEraseBackground"></event>
|
|
||||||
<event name="OnKeyDown"></event>
|
|
||||||
<event name="OnKeyUp"></event>
|
|
||||||
<event name="OnKillFocus"></event>
|
|
||||||
<event name="OnLeaveWindow"></event>
|
|
||||||
<event name="OnLeftDClick"></event>
|
|
||||||
<event name="OnLeftDown"></event>
|
|
||||||
<event name="OnLeftUp"></event>
|
|
||||||
<event name="OnListBox"></event>
|
|
||||||
<event name="OnListBoxDClick">onSignalDblClick</event>
|
|
||||||
<event name="OnMiddleDClick"></event>
|
|
||||||
<event name="OnMiddleDown"></event>
|
|
||||||
<event name="OnMiddleUp"></event>
|
|
||||||
<event name="OnMotion"></event>
|
|
||||||
<event name="OnMouseEvents"></event>
|
|
||||||
<event name="OnMouseWheel"></event>
|
|
||||||
<event name="OnPaint"></event>
|
|
||||||
<event name="OnRightDClick"></event>
|
|
||||||
<event name="OnRightDown"></event>
|
|
||||||
<event name="OnRightUp">onSignalRClick</event>
|
|
||||||
<event name="OnSetFocus"></event>
|
|
||||||
<event name="OnSize"></event>
|
|
||||||
<event name="OnUpdateUI"></event>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem" expanded="0">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxALL</property>
|
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxStaticText" expanded="0">
|
|
||||||
<property name="BottomDockable">1</property>
|
|
||||||
<property name="LeftDockable">1</property>
|
|
||||||
<property name="RightDockable">1</property>
|
|
||||||
<property name="TopDockable">1</property>
|
|
||||||
<property name="aui_layer"></property>
|
|
||||||
<property name="aui_name"></property>
|
|
||||||
<property name="aui_position"></property>
|
|
||||||
<property name="aui_row"></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="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="id">wxID_ANY</property>
|
||||||
<property name="label">Cursors</property>
|
<property name="label">Cursors</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="minimum_size"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="name">sbSizer3</property>
|
||||||
<property name="name">m_staticText21</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="parent">1</property>
|
||||||
<property name="pane_position"></property>
|
<property name="permission">none</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"></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>
|
|
||||||
<event name="OnChar"></event>
|
|
||||||
<event name="OnEnterWindow"></event>
|
|
||||||
<event name="OnEraseBackground"></event>
|
|
||||||
<event name="OnKeyDown"></event>
|
|
||||||
<event name="OnKeyUp"></event>
|
|
||||||
<event name="OnKillFocus"></event>
|
|
||||||
<event name="OnLeaveWindow"></event>
|
|
||||||
<event name="OnLeftDClick"></event>
|
|
||||||
<event name="OnLeftDown"></event>
|
|
||||||
<event name="OnLeftUp"></event>
|
|
||||||
<event name="OnMiddleDClick"></event>
|
|
||||||
<event name="OnMiddleDown"></event>
|
|
||||||
<event name="OnMiddleUp"></event>
|
|
||||||
<event name="OnMotion"></event>
|
|
||||||
<event name="OnMouseEvents"></event>
|
|
||||||
<event name="OnMouseWheel"></event>
|
|
||||||
<event name="OnPaint"></event>
|
|
||||||
<event name="OnRightDClick"></event>
|
|
||||||
<event name="OnRightDown"></event>
|
|
||||||
<event name="OnRightUp"></event>
|
|
||||||
<event name="OnSetFocus"></event>
|
|
||||||
<event name="OnSize"></event>
|
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
|
<object class="sizeritem" expanded="0">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALL|wxEXPAND</property>
|
||||||
|
<property name="proportion">1</property>
|
||||||
|
<object class="wxListCtrl" expanded="0">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_layer"></property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="aui_position"></property>
|
||||||
|
<property name="aui_row"></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="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_cursors</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">wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL</property>
|
||||||
|
<property name="subclass"></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="OnChar"></event>
|
||||||
|
<event name="OnEnterWindow"></event>
|
||||||
|
<event name="OnEraseBackground"></event>
|
||||||
|
<event name="OnKeyDown"></event>
|
||||||
|
<event name="OnKeyUp"></event>
|
||||||
|
<event name="OnKillFocus"></event>
|
||||||
|
<event name="OnLeaveWindow"></event>
|
||||||
|
<event name="OnLeftDClick"></event>
|
||||||
|
<event name="OnLeftDown"></event>
|
||||||
|
<event name="OnLeftUp"></event>
|
||||||
|
<event name="OnListBeginDrag"></event>
|
||||||
|
<event name="OnListBeginLabelEdit"></event>
|
||||||
|
<event name="OnListBeginRDrag"></event>
|
||||||
|
<event name="OnListCacheHint"></event>
|
||||||
|
<event name="OnListColBeginDrag"></event>
|
||||||
|
<event name="OnListColClick"></event>
|
||||||
|
<event name="OnListColDragging"></event>
|
||||||
|
<event name="OnListColEndDrag"></event>
|
||||||
|
<event name="OnListColRightClick"></event>
|
||||||
|
<event name="OnListDeleteAllItems"></event>
|
||||||
|
<event name="OnListDeleteItem"></event>
|
||||||
|
<event name="OnListEndLabelEdit"></event>
|
||||||
|
<event name="OnListInsertItem"></event>
|
||||||
|
<event name="OnListItemActivated"></event>
|
||||||
|
<event name="OnListItemDeselected"></event>
|
||||||
|
<event name="OnListItemFocused"></event>
|
||||||
|
<event name="OnListItemMiddleClick"></event>
|
||||||
|
<event name="OnListItemRightClick"></event>
|
||||||
|
<event name="OnListItemSelected"></event>
|
||||||
|
<event name="OnListKeyDown"></event>
|
||||||
|
<event name="OnMiddleDClick"></event>
|
||||||
|
<event name="OnMiddleDown"></event>
|
||||||
|
<event name="OnMiddleUp"></event>
|
||||||
|
<event name="OnMotion"></event>
|
||||||
|
<event name="OnMouseEvents"></event>
|
||||||
|
<event name="OnMouseWheel"></event>
|
||||||
|
<event name="OnPaint"></event>
|
||||||
|
<event name="OnRightDClick"></event>
|
||||||
|
<event name="OnRightDown"></event>
|
||||||
|
<event name="OnRightUp"></event>
|
||||||
|
<event name="OnSetFocus"></event>
|
||||||
|
<event name="OnSize"></event>
|
||||||
|
<event name="OnUpdateUI"></event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxEXPAND</property>
|
<property name="flag">wxEXPAND</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxListCtrl" expanded="0">
|
<object class="wxStaticBoxSizer" expanded="1">
|
||||||
<property name="BottomDockable">1</property>
|
|
||||||
<property name="LeftDockable">1</property>
|
|
||||||
<property name="RightDockable">1</property>
|
|
||||||
<property name="TopDockable">1</property>
|
|
||||||
<property name="aui_layer"></property>
|
|
||||||
<property name="aui_name"></property>
|
|
||||||
<property name="aui_position"></property>
|
|
||||||
<property name="aui_row"></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="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="id">wxID_ANY</property>
|
||||||
<property name="max_size"></property>
|
<property name="label">Tune</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="minimum_size"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="name">sbSizer4</property>
|
||||||
<property name="name">m_cursors</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="parent">1</property>
|
||||||
<property name="pane_position"></property>
|
<property name="permission">none</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">wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL</property>
|
|
||||||
<property name="subclass"></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="OnChar"></event>
|
|
||||||
<event name="OnEnterWindow"></event>
|
|
||||||
<event name="OnEraseBackground"></event>
|
|
||||||
<event name="OnKeyDown"></event>
|
|
||||||
<event name="OnKeyUp"></event>
|
|
||||||
<event name="OnKillFocus"></event>
|
|
||||||
<event name="OnLeaveWindow"></event>
|
|
||||||
<event name="OnLeftDClick"></event>
|
|
||||||
<event name="OnLeftDown"></event>
|
|
||||||
<event name="OnLeftUp"></event>
|
|
||||||
<event name="OnListBeginDrag"></event>
|
|
||||||
<event name="OnListBeginLabelEdit"></event>
|
|
||||||
<event name="OnListBeginRDrag"></event>
|
|
||||||
<event name="OnListCacheHint"></event>
|
|
||||||
<event name="OnListColBeginDrag"></event>
|
|
||||||
<event name="OnListColClick"></event>
|
|
||||||
<event name="OnListColDragging"></event>
|
|
||||||
<event name="OnListColEndDrag"></event>
|
|
||||||
<event name="OnListColRightClick"></event>
|
|
||||||
<event name="OnListDeleteAllItems"></event>
|
|
||||||
<event name="OnListDeleteItem"></event>
|
|
||||||
<event name="OnListEndLabelEdit"></event>
|
|
||||||
<event name="OnListInsertItem"></event>
|
|
||||||
<event name="OnListItemActivated"></event>
|
|
||||||
<event name="OnListItemDeselected"></event>
|
|
||||||
<event name="OnListItemFocused"></event>
|
|
||||||
<event name="OnListItemMiddleClick"></event>
|
|
||||||
<event name="OnListItemRightClick"></event>
|
|
||||||
<event name="OnListItemSelected"></event>
|
|
||||||
<event name="OnListKeyDown"></event>
|
|
||||||
<event name="OnMiddleDClick"></event>
|
|
||||||
<event name="OnMiddleDown"></event>
|
|
||||||
<event name="OnMiddleUp"></event>
|
|
||||||
<event name="OnMotion"></event>
|
|
||||||
<event name="OnMouseEvents"></event>
|
|
||||||
<event name="OnMouseWheel"></event>
|
|
||||||
<event name="OnPaint"></event>
|
|
||||||
<event name="OnRightDClick"></event>
|
|
||||||
<event name="OnRightDown"></event>
|
|
||||||
<event name="OnRightUp"></event>
|
|
||||||
<event name="OnSetFocus"></event>
|
|
||||||
<event name="OnSize"></event>
|
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxEXPAND</property>
|
||||||
|
<property name="proportion">1</property>
|
||||||
|
<object class="wxBoxSizer" expanded="1">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">m_tuneSizer</property>
|
||||||
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag"></property>
|
<property name="flag"></property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
|
@ -1093,11 +983,11 @@
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="0">
|
||||||
<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="wxButton" expanded="1">
|
<object class="wxButton" expanded="0">
|
||||||
<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>
|
||||||
|
|
|
@ -26,8 +26,8 @@ class KIWAY_PLAYER;
|
||||||
#include <wx/notebook.h>
|
#include <wx/notebook.h>
|
||||||
#include <wx/textctrl.h>
|
#include <wx/textctrl.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
#include <wx/stattext.h>
|
|
||||||
#include <wx/listbox.h>
|
#include <wx/listbox.h>
|
||||||
|
#include <wx/statbox.h>
|
||||||
#include <wx/listctrl.h>
|
#include <wx/listctrl.h>
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
#include <wx/frame.h>
|
#include <wx/frame.h>
|
||||||
|
@ -48,10 +48,9 @@ class SIM_PLOT_FRAME_BASE : public KIWAY_PLAYER
|
||||||
wxMenu* m_viewMenu;
|
wxMenu* m_viewMenu;
|
||||||
wxNotebook* m_plotNotebook;
|
wxNotebook* m_plotNotebook;
|
||||||
wxTextCtrl* m_simConsole;
|
wxTextCtrl* m_simConsole;
|
||||||
wxStaticText* m_staticText2;
|
|
||||||
wxListBox* m_signals;
|
wxListBox* m_signals;
|
||||||
wxStaticText* m_staticText21;
|
|
||||||
wxListCtrl* m_cursors;
|
wxListCtrl* m_cursors;
|
||||||
|
wxBoxSizer* m_tuneSizer;
|
||||||
wxButton* m_simulateBtn;
|
wxButton* m_simulateBtn;
|
||||||
wxButton* m_settingsBtn;
|
wxButton* m_settingsBtn;
|
||||||
wxButton* m_addSignal;
|
wxButton* m_addSignal;
|
||||||
|
|
|
@ -67,8 +67,34 @@ static const unsigned char cursor_probe_mask[] {
|
||||||
0x7c, 0x07, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
|
0x7c, 0x07, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
|
||||||
0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 };
|
0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 };
|
||||||
|
|
||||||
|
static const unsigned char cursor_tune[] = {
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xc0, 0x0f,
|
||||||
|
0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x0f,
|
||||||
|
0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xff, 0x01,
|
||||||
|
0x00, 0x80, 0xff, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0xe0, 0x3f, 0x00,
|
||||||
|
0x00, 0xe0, 0x1f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00,
|
||||||
|
0x00, 0xfc, 0x03, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00,
|
||||||
|
0x00, 0xea, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00,
|
||||||
|
0x40, 0x01, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
|
||||||
|
0x2c, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
|
||||||
|
0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00 };
|
||||||
|
|
||||||
|
static const unsigned char cursor_tune_mask[] = {
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xc0, 0x0f,
|
||||||
|
0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x0f,
|
||||||
|
0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xff, 0x01,
|
||||||
|
0x00, 0x80, 0xff, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0xe0, 0x3f, 0x00,
|
||||||
|
0x00, 0xe0, 0x1f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00,
|
||||||
|
0x00, 0xfc, 0x03, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00,
|
||||||
|
0x00, 0xee, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00,
|
||||||
|
0xc0, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
|
||||||
|
0x3c, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
|
||||||
|
0x0e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00 };
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
struct CURSOR_PROBE_INIT
|
struct SIM_CURSORS_INIT
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static wxImage& GetProbeImage()
|
static wxImage& GetProbeImage()
|
||||||
|
@ -87,9 +113,28 @@ public:
|
||||||
|
|
||||||
return *probe_image;
|
return *probe_image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static wxImage& GetTuneImage()
|
||||||
|
{
|
||||||
|
static wxImage* tune_image = NULL;
|
||||||
|
|
||||||
|
if( tune_image == NULL )
|
||||||
|
{
|
||||||
|
wxBitmap tune_bitmap( (const char*) cursor_tune, 32, 32 );
|
||||||
|
wxBitmap tune_mask_bitmap( (const char*) cursor_tune_mask, 32, 32 );
|
||||||
|
tune_bitmap.SetMask( new wxMask( tune_mask_bitmap ) );
|
||||||
|
tune_image = new wxImage( tune_bitmap.ConvertToImage() );
|
||||||
|
tune_image->SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_X, 0 );
|
||||||
|
tune_image->SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_Y, 31 );
|
||||||
|
}
|
||||||
|
|
||||||
|
return *tune_image;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const wxCursor SCH_EDIT_FRAME::CURSOR_PROBE( CURSOR_PROBE_INIT::GetProbeImage() );
|
const wxCursor SCH_EDIT_FRAME::CURSOR_PROBE( SIM_CURSORS_INIT::GetProbeImage() );
|
||||||
|
const wxCursor SCH_EDIT_FRAME::CURSOR_TUNE( SIM_CURSORS_INIT::GetTuneImage() );
|
||||||
#elif defined(__WXGTK__) or defined(__WXMOTIF__)
|
#elif defined(__WXGTK__) or defined(__WXMOTIF__)
|
||||||
const wxCursor SCH_EDIT_FRAME::CURSOR_PROBE( (const char*) cursor_probe, 32, 32, 0, 31, (const char*) cursor_probe_mask );
|
const wxCursor SCH_EDIT_FRAME::CURSOR_PROBE( (const char*) cursor_probe, 32, 32, 0, 31, (const char*) cursor_probe_mask );
|
||||||
|
const wxCursor SCH_EDIT_FRAME::CURSOR_TUNE( (const char*) cursor_tune, 32, 32, 1, 30, (const char*) cursor_tune_mask );
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue