Spice simulator: code formatting

This commit is contained in:
Maciej Suminski 2018-03-21 17:20:35 +01:00
parent 33620ecc85
commit 50053e7f27
2 changed files with 14 additions and 15 deletions

View File

@ -1097,34 +1097,33 @@ void SIM_PLOT_FRAME::onShowNetlist( wxCommandEvent& event )
wxDefaultPosition, wxSize(1500,900), wxDefaultPosition, wxSize(1500,900),
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
{ {
wxStyledTextCtrl* text = new wxStyledTextCtrl(this, wxID_ANY); wxStyledTextCtrl* text = new wxStyledTextCtrl( this, wxID_ANY );
text->SetMarginWidth (MARGIN_LINE_NUMBERS, 50); text->SetMarginWidth( MARGIN_LINE_NUMBERS, 50 );
text->StyleSetForeground (wxSTC_STYLE_LINENUMBER, wxColour (75, 75, 75) ); text->StyleSetForeground( wxSTC_STYLE_LINENUMBER, wxColour( 75, 75, 75 ) );
text->StyleSetBackground (wxSTC_STYLE_LINENUMBER, wxColour (220, 220, 220)); text->StyleSetBackground( wxSTC_STYLE_LINENUMBER, wxColour( 220, 220, 220 ) );
text->SetMarginType (MARGIN_LINE_NUMBERS, wxSTC_MARGIN_NUMBER); text->SetMarginType( MARGIN_LINE_NUMBERS, wxSTC_MARGIN_NUMBER );
text->SetWrapMode (wxSTC_WRAP_WORD); text->SetWrapMode( wxSTC_WRAP_WORD );
text->SetText( source ); text->SetText( source );
text->StyleClearAll(); text->StyleClearAll();
text->SetLexer(wxSTC_LEX_SPICE); text->SetLexer( wxSTC_LEX_SPICE );
wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); wxBoxSizer* sizer = new wxBoxSizer( wxVERTICAL );
sizer->Add(text, 1, wxEXPAND); sizer->Add( text, 1, wxEXPAND );
SetSizer(sizer); SetSizer( sizer );
Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(NETLIST_VIEW_DIALOG::onClose), NULL, this); Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( NETLIST_VIEW_DIALOG::onClose ), NULL,
this );
} }
}; };
if( m_schematicFrame == NULL || m_simulator == NULL ) if( m_schematicFrame == NULL || m_simulator == NULL )
return; return;
NETLIST_VIEW_DIALOG dlg( this, m_simulator->GetNetlist() ); NETLIST_VIEW_DIALOG dlg( this, m_simulator->GetNetlist() );
dlg.ShowModal(); dlg.ShowModal();
} }

View File

@ -25,8 +25,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#ifndef __sim_plot_frame__ #ifndef __SIM_PLOT_FRAME__
#define __sim_plot_frame__ #define __SIM_PLOT_FRAME__
/** /**
* @file sim_plot_frame.h * @file sim_plot_frame.h