dlggencfg.hpp

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

HPP
140
字号
//*****************************************************************************//                                 DlgGenCfg.hpp                              *//                                ---------------                             *//  Description : This dialogue is used to enter values associated with a     *//                GNU-Cap generator command line. It is used for Transient    *//                analysis.                                                   *//  Started     : 27/02/2004                                                  *//  Last Update : 06/06/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.                                     *//                                                                            *//*****************************************************************************#ifndef DLGGENCFG_HPP#define DLGGENCFG_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 DlgGenCfg : public wxDialog{  private:    // Value panel controls    PnlValue  m_oPnlAmp;    PnlValue  m_oPnlOffset;    PnlValue  m_oPnlFreq;    PnlValue  m_oPnlPhase;    PnlValue  m_oPnlInitV;    PnlValue  m_oPnlMinV;    PnlValue  m_oPnlMaxV;    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_osGenCmd;    // Object initialization functions    void  Init( void );    PnlValue & roGetPanel( int iPnlID );    void  SetPnlValues( void );    void  GetPnlValues( void );  public:    DlgGenCfg( wxWindow * poWin );    ~DlgGenCfg( );    bool  bClear( void );    bool    bEnablePanel( int iPnlID, bool bState );     bool    bSetPnlValue( int iPnlID, float fValue, const wxString & rosUnits=wxT("") );    double dfGetPnlValue( int iPnlID );               bool    bSetGenCmd( const wxString & rosCmd );    const wxString & rosGetGenCmd( 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_AMP = 0,      ID_PNL_OFFSET,      ID_PNL_FREQ,      ID_PNL_PHASE,      ID_PNL_INITV,      ID_PNL_MINV,      ID_PNL_MAXV,      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_AMP,      ID_PNL_LST = ID_PNL_PERIOD,      ID_FST = ID_PNL_AMP,      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 // DLGGENCFG_HPP

⌨️ 快捷键说明

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