dlgsimrcfg.cpp
来自「gspiceui电子CAD仿真程序.用于电路参数模拟仿真」· C++ 代码 · 共 183 行
CPP
183 行
//*****************************************************************************// DlgSimrCfg.cpp *// ---------------- *// Started : 17/05/2004 *// Last Update : 21/07/2005 *// Copyright : (C) 2004 by M.S.Waters *// Email : M.Waters@bom.gov.au *//*****************************************************************************//*****************************************************************************// *// This program is free software; you can redistribute it and/or modify *// it under the terms of the GNU General Public License as published by *// the Free Software Foundation; either version 2 of the License, or *// (at your option) any later version. *// *//*****************************************************************************#include "DlgSimrCfg.hpp"//*****************************************************************************// Implement an event table.BEGIN_EVENT_TABLE( DlgSimrCfg, wxDialog ) EVT_BUTTON( ID_BTN_SIM_GNUCAP, DlgSimrCfg::OnBtnSimrCmd ) EVT_BUTTON( ID_BTN_HLP_GNUCAP, DlgSimrCfg::OnBtnHelpDoc ) EVT_BUTTON( ID_BTN_SIM_NGSPICE, DlgSimrCfg::OnBtnSimrCmd ) EVT_BUTTON( ID_BTN_HLP_NGSPICE, DlgSimrCfg::OnBtnHelpDoc ) EVT_BUTTON( ID_BTN_OK, DlgSimrCfg::OnBtnOk ) EVT_BUTTON( ID_BTN_CANCEL, DlgSimrCfg::OnBtnCancel )END_EVENT_TABLE( )//*****************************************************************************// Constructor.//// Argument List:// ???DlgSimrCfg::DlgSimrCfg( wxWindow * poWin ) : wxDialog( poWin, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, wxDialogNameStr ){ SetTitle( wxT("Simulator Engine Setup") ); SetSize( wxSize( 275, 438 ) ); Init( );}//*****************************************************************************// Destructor.DlgSimrCfg::~DlgSimrCfg( ){}//*****************************************************************************// Initialize object attributes.void DlgSimrCfg::Init( void ){ InitObjs( );}//*****************************************************************************// Create and place all the display objects.void DlgSimrCfg::InitObjs( void ){ new wxStaticBox( this, ID_UNUSED, wxT("Simulator To Use"), wxPoint( 10, 10 ), wxSize( 256, 72 ) ); new wxStaticBox ( this, ID_UNUSED, wxT("GNU-Cap Setup"), wxPoint( 10, 90 ), wxSize( 256, 72 ) ); new wxStaticText( this, ID_UNUSED, wxT("Simulator Command"), wxPoint( 25, 30 ) ); new wxStaticText( this, ID_UNUSED, wxT("HTML Documentation"), wxPoint( 25, 30 ) ); new wxStaticBox ( this, ID_UNUSED, wxT("NG-Spice Setup"), wxPoint( 10, 170 ), wxSize( 256,222 ) ); new wxStaticText( this, ID_UNUSED, wxT("Simulator Command"), wxPoint( 25, 55 ) ); new wxStaticText( this, ID_UNUSED, wxT("HTML Documentation"), wxPoint( 25, 55 ) ); m_oBtnOk .Create( this, ID_BTN_OK, wxT("Ok"), wxPoint( 45, 405 ) ); m_oBtnCancel.Create( this, ID_BTN_CANCEL, wxT("Cancel"), wxPoint(145, 405 ) );}//*****************************************************************************// Reset all dialog settings to defaults.void DlgSimrCfg::Clear( void ){}//*****************************************************************************// Get the simulator command.//// Argument List:// iSimrID - The simulation identification number// (1 - GNU-Cap, 2 - NG-Spice)//// Return Values:// Success - A string containing the simulator command (eg. /usr/local/bin/gnucap)// Failure - An empty stringconst wxString & DlgSimrCfg::rosGetSimrCmd( int iSimrID ){ static wxString osSimrCmd; if( iSimrID>=ID_FST_SIMR && iSimrID<=ID_LST_SIMR ) osSimrCmd = m_oTxtSimrCmd[iSimrID].GetValue( ); else osSimrCmd = wxT(""); return( osSimrCmd );}//*****************************************************************************// Get the help HTML documentation index file.//// Argument List:// iSimrID - The simulation identification number// (1 - GNU-Cap, 2 - NG-Spice)//// Return Values:// Success - A string containing the HTML documentation file (eg. index.html)// Failure - An empty stringconst wxString & DlgSimrCfg::rosGetHelpDoc( int iSimrID ){ static wxString osHelpDoc; if( iSimrID<ID_FST_SIMR || iSimrID>ID_LST_SIMR ) return( osHelpDoc ); if( iSimrID>=ID_FST_SIMR && iSimrID<=ID_LST_SIMR ) osHelpDoc = m_oTxtHelpDoc[iSimrID].GetValue( ); else osHelpDoc = wxT(""); return( osHelpDoc );}//*****************************************************************************//// Event Handlers////*****************************************************************************// ???void DlgSimrCfg::OnBtnSimrCmd( wxCommandEvent & WXUNUSED( roEvtCmd ) ){ // ???}//*****************************************************************************// ???void DlgSimrCfg::OnBtnHelpDoc( wxCommandEvent & WXUNUSED( roEvtCmd ) ){ // ???}//*****************************************************************************// Ok button event handler.//// Argument List:// roEvtCmd - An object holding information about the event (not used)void DlgSimrCfg::OnBtnOk( wxCommandEvent & WXUNUSED( roEvtCmd ) ){ EndModal( wxID_OK );}//*****************************************************************************// Cancel button event handler.//// Argument List:// roEvtCmd - An object holding information about the event (not used)void DlgSimrCfg::OnBtnCancel( wxCommandEvent & WXUNUSED( roEvtCmd ) ){ EndModal( wxID_CANCEL );}//*****************************************************************************
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?