dlgsrccfg.hpp

来自「gspiceui电子CAD仿真程序.用于电路参数模拟仿真」· HPP 代码 · 共 130 行

HPP
130
字号
//*****************************************************************************//                                 DlgSrcCfg.hpp                              *//                                ---------------                             *//  Description : This dialogue is used to enter values associated with an    *//                Ng-Spice independent voltage source definition. It is used  *//                for Transient analysis and is based on a pulse function.    *//  Started     : 10/05/2005                                                  *//  Last Update : 06/06/2005                                                  *//  Copyright   : (C) 2005 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.                                     *//                                                                            *//*****************************************************************************#ifndef DLGSRCCFG_HPP#define DLGSRCCFG_HPP// System Includes#include <iostream>#include <climits>// wxWidgets Includes#include <wx/wx.h>#include <wx/dialog.h>#include <wx/choice.h>#include <wx/tokenzr.h>// Application Includes#include "PnlValue.hpp"// Local Constant Declarations//*****************************************************************************class DlgSrcCfg : public wxDialog{  private:    // Value panel controls    PnlValue  m_oPnlInitV;    PnlValue  m_oPnlPulseV;    PnlValue  m_oPnlDelay;    PnlValue  m_oPnlRise;    PnlValue  m_oPnlWidth;    PnlValue  m_oPnlFall;    PnlValue  m_oPnlPeriod;    // Button controls    wxButton  m_oBtnOk;    wxButton  m_oBtnCancel;    // Generator command string    wxString  m_osSrcCmd;    // Object initialization functions    void  Init( void );    PnlValue & roGetPanel( int iPnlID );    void  SetPnlValues( void );    void  GetPnlValues( void );  public:    DlgSrcCfg( wxWindow * poWin );    ~DlgSrcCfg( );    bool  bClear( void );    bool    bEnablePanel( int iPnlID, bool bState );     bool    bSetPnlValue( int iPnlID, float fValue, const wxString & rosUnits=wxT("") );    double dfGetPnlValue( int iPnlID );               bool    bSetSrcCmd( const wxString & rosCmd );    const wxString & rosGetSrcCmd( void );    // Event handlers    void  OnBtnOk    ( wxCommandEvent & roEvtCmd );    void  OnBtnCancel( wxCommandEvent & roEvtCmd );    // In order to be able to react to a menu command, it must be given a    // unique identifier such as a const or an enum.    enum eDlgItemID    {      ID_PNL_INITV = 0,      ID_PNL_PULSEV,      ID_PNL_DELAY,      ID_PNL_RISE,      ID_PNL_WIDTH,      ID_PNL_FALL,      ID_PNL_PERIOD,      ID_BTN_OK,      ID_BTN_CANCEL,      ID_UNUSED,      // Assigned to controls for which events are not used      ID_PNL_FST = ID_PNL_INITV,      ID_PNL_LST = ID_PNL_PERIOD,      ID_FST = ID_PNL_INITV,      ID_LST = ID_BTN_CANCEL    };  private:    // Temporary storage for original spin control values until Ok pressed    double  m_dfPnlValue[ ID_PNL_LST+1 ];  public:    // Leave this as the last line as private access is envoked by macro    DECLARE_EVENT_TABLE( )};//*****************************************************************************#endif // DLGSRCCFG_HPP

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?