diff --git a/eeschema/sim/sim_plot_frame.cpp b/eeschema/sim/sim_plot_frame.cpp index a9bcafc64e..77c2a962ed 100644 --- a/eeschema/sim/sim_plot_frame.cpp +++ b/eeschema/sim/sim_plot_frame.cpp @@ -532,9 +532,9 @@ void SIM_PLOT_FRAME::onSimFinished( wxCommandEvent& aEvent ) void SIM_PLOT_FRAME::onSimReport( wxCommandEvent& aEvent ) { - m_simConsole->AppendText( aEvent.GetString() ); - m_simConsole->Newline(); - m_simConsole->MoveEnd(); /// @todo does not work.. + std::cout << aEvent.GetString() << std::endl; + m_simConsole->AppendText( aEvent.GetString() + "\n" ); + m_simConsole->SetInsertionPointEnd(); } diff --git a/eeschema/sim/sim_plot_frame_base.cpp b/eeschema/sim/sim_plot_frame_base.cpp index 35414efe3a..aed0f5f690 100644 --- a/eeschema/sim/sim_plot_frame_base.cpp +++ b/eeschema/sim/sim_plot_frame_base.cpp @@ -84,11 +84,22 @@ SIM_PLOT_FRAME_BASE::SIM_PLOT_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxBoxSizer* bSizer5; bSizer5 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer51; + bSizer51 = new wxBoxSizer( wxVERTICAL ); + m_plotNotebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); m_plotNotebook->SetMinSize( wxSize( 400,-1 ) ); - bSizer5->Add( m_plotNotebook, 6, wxEXPAND | wxALL, 5 ); + bSizer51->Add( m_plotNotebook, 3, wxEXPAND | wxALL, 5 ); + + m_simConsole = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY ); + m_simConsole->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); + + bSizer51->Add( m_simConsole, 1, wxALL|wxEXPAND, 5 ); + + + bSizer5->Add( bSizer51, 5, wxEXPAND, 5 ); wxBoxSizer* bSizer7; bSizer7 = new wxBoxSizer( wxVERTICAL ); @@ -131,11 +142,6 @@ SIM_PLOT_FRAME_BASE::SIM_PLOT_FRAME_BASE( wxWindow* parent, wxWindowID id, const bSizer1->Add( bSizer5, 3, wxEXPAND, 5 ); - m_simConsole = new wxRichTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxVSCROLL|wxHSCROLL|wxNO_BORDER|wxWANTS_CHARS ); - m_simConsole->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - - bSizer1->Add( m_simConsole, 1, wxEXPAND | wxALL, 5 ); - this->SetSizer( bSizer1 ); this->Layout(); diff --git a/eeschema/sim/sim_plot_frame_base.fbp b/eeschema/sim/sim_plot_frame_base.fbp index b392f8e370..be23240983 100644 --- a/eeschema/sim/sim_plot_frame_base.fbp +++ b/eeschema/sim/sim_plot_frame_base.fbp @@ -354,95 +354,197 @@ bSizer5 wxHORIZONTAL none - + 5 - wxEXPAND | wxALL - 6 - - 1 - 1 - 1 - 1 - - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - 400,-1 - 1 - m_plotNotebook - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - - - - - - - - - - - - - - - - - onPlotChanged - - - - - - - - + wxEXPAND + 5 + + + bSizer51 + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 3 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + 400,-1 + 1 + m_plotNotebook + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + onPlotChanged + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,-1,76,0 + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_simConsole + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 wxEXPAND 1 - + bSizer7 wxVERTICAL @@ -806,11 +908,11 @@ - + 5 0 - + bSizer4 wxHORIZONTAL @@ -903,11 +1005,11 @@ - + 5 wxALL 1 - + 1 1 1 @@ -1173,104 +1275,6 @@ - - 5 - wxEXPAND | wxALL - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - ,90,90,-1,76,0 - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_simConsole - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_READONLY - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - wxVSCROLL|wxHSCROLL|wxNO_BORDER|wxWANTS_CHARS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/eeschema/sim/sim_plot_frame_base.h b/eeschema/sim/sim_plot_frame_base.h index 50bf654e6a..1032993d93 100644 --- a/eeschema/sim/sim_plot_frame_base.h +++ b/eeschema/sim/sim_plot_frame_base.h @@ -24,12 +24,12 @@ class KIWAY_PLAYER; #include #include #include +#include +#include #include #include #include #include -#include -#include #include /////////////////////////////////////////////////////////////////////////// @@ -47,6 +47,7 @@ class SIM_PLOT_FRAME_BASE : public KIWAY_PLAYER wxMenu* m_fileMenu; wxMenu* m_viewMenu; wxNotebook* m_plotNotebook; + wxTextCtrl* m_simConsole; wxStaticText* m_staticText2; wxListBox* m_signals; wxStaticText* m_staticText21; @@ -55,7 +56,6 @@ class SIM_PLOT_FRAME_BASE : public KIWAY_PLAYER wxButton* m_settingsBtn; wxButton* m_probeBtn; wxButton* m_tuneBtn; - wxRichTextCtrl* m_simConsole; // Virtual event handlers, overide them in your derived class virtual void menuNewPlot( wxCommandEvent& event ) { event.Skip(); }