frmmain.hpp

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

HPP
188
字号
//*****************************************************************************//                                FrmMain.hpp                                 *//                               -------------                                *//  Description : The main frame used to contain the applications display     *//                objects.                                                    *//  Started     : 18/08/2003                                                  *//  Last Update : 14/07/2005                                                  *//  Copyright   : (C) 2003 by MSWaters                                        *//  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 FRMMAIN_HPP#define FRMMAIN_HPP// System Includes#include <iostream>// wxWindows Includes#include <wx/wx.h>#include <wx/filename.h>#include <wx/process.h>#include <wx/utils.h>#include <wx/notebook.h>#include <wx/cursor.h>#include <wx/tooltip.h>// Application Includesclass FrmMain;  // Only line required to compile FrmMain.o#include "Version.hpp"#include "FileTasks.hpp"#include "HelpTasks.hpp"#include "TextCtrl.hpp"#include "NbkTxtCtls.hpp"#include "gnucap/NbkGnuCap.hpp"#include "ngspice/NbkNgSpice.hpp"#include "NetList.hpp"#include "Simulation.hpp"#include "PrcGnuCap.hpp"#include "PrcNgSpice.hpp"#include "PrcGWave.hpp"// Local Constant Declarations#define  FRMMAIN_WIDTH  740  // The total width of the frame in pixels//*****************************************************************************class FrmMain : public wxFrame{  private:    const wxApp * m_poApp;      // Pointer to the frames parent application    FileTasks     m_oFileTsks;  // Class to handler file operations    HelpTasks     m_oHelpTsks;  // Class to handler help operations    Simulation    m_oSimn;      // Simulation object    PrcSimrBase * m_poPrcSimr;  // Pointer to the simulator process    PrcGWave      m_oPrcGWave;  // Object to view simulation results    // Display control objects    NbkSimrBase * m_poNbkSimr;    wxStaticText  m_oLblNodes;    wxListBox     m_oLbxNodes;    wxStaticText  m_oLblCpnts;    wxListBox     m_oLbxCpnts;    NbkTxtCtls    m_oNbkTxtCtls;    // Object initialization functions    void  Initialize  ( void ); // This function calls the following init. fns    void  InitMenuBar ( void );    void  InitToolBar ( void );    void  InitLstBoxs ( void );    void  InitNbkTCtls( void );    void  InitStatBar ( void );    void  InitToolTips( void );    void  InitSimrEng ( Simulation::eSimrType eType=Simulation::eSIMR_GNUCAP );    void  InitLogFiles( void );    // Clear the object attributes    bool  bClear( void );    bool  bLoadSimn  ( void ); // Load   information from the Simulation object    bool  bReloadSimn( void ); // Reload information from the Simulation object    bool  bSaveSimn  ( void ); // Save   information to   the Simulation object    void  DlgErrMsg( const wxString & rosTitle, const wxString & rosMsg );    // Check that helper utilities are present & accounted for    bool  bOkSimr ( PrcSimrBase * poPrcSimr );    bool  bOkGWave( PrcGWave    * poPrcGWave );  public:    FrmMain( const wxApp * poApp=NULL );    ~FrmMain( );    bool  bSetTitle( void );    bool  bSetSchems( const wxArrayString & roasFileName );    bool  bSetNetList( const wxString & rosFileName );    // Event handlers    void  OnOpen   ( wxCommandEvent  & roEvtCmd );    void  OnImport ( wxCommandEvent  & roEvtCmd );    void  OnReload ( wxCommandEvent  & roEvtCmd );    void  OnClose  ( wxCommandEvent  & roEvtCmd );    void  OnExit   ( wxCommandEvent  & roEvtCmd );    void  OnCreate ( wxCommandEvent  & roEvtCmd );    void  OnRun    ( wxCommandEvent  & roEvtCmd );    void  OnStop   ( wxCommandEvent  & roEvtCmd );    void  OnPlot   ( wxCommandEvent  & roEvtCmd );    void  OnSelSimr( wxCommandEvent  & roEvtCmd );    void  OnPaths  ( wxCommandEvent  & roEvtCmd );    void  OnToolTip( wxCommandEvent  & roEvtCmd );    void  OnContent( wxCommandEvent  & roEvtCmd );    void  OnGnuCap ( wxCommandEvent  & roEvtCmd );    void  OnNgSpice( wxCommandEvent  & roEvtCmd );    void  OnAbout  ( wxCommandEvent  & roEvtCmd );    void  OnParm   ( void );    void  OnParmNbk( wxNotebookEvent & roEvtNbk );    void  OnParmCmd( wxCommandEvent  & roEvtCmd );    friend  class  CmdLinePcr;    friend  class  AppGSpiceUI;    friend  class  FileTasks;    // 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 eFrmItemID    {      ID_MNU_OPEN = 1,      ID_MNU_IMPORT,      ID_MNU_RELOAD,      ID_MNU_CLOSE,      ID_MNU_EXIT,      ID_MNU_CREATE,      ID_MNU_RUN,      ID_MNU_STOP,      ID_MNU_PLOT,      ID_MNU_SELGCAP,      ID_MNU_SELNGSP,      ID_MNU_PATHS,      ID_MNU_TOOLTIP,      ID_MNU_CONTENT,      ID_MNU_HLPGCAP,      ID_MNU_HLPNGSP,      ID_MNU_ABOUT,      ID_TOOLBAR,      ID_TBR_OPEN,      ID_TBR_IMPORT,      ID_TBR_RELOAD,      ID_TBR_CLOSE,      ID_TBR_CREATE,      ID_TBR_RUN,      ID_TBR_STOP,      ID_TBR_PLOT,      ID_LBX_NODES,      ID_LBX_CPNTS,      ID_NBK_ANALYS,      ID_NBK_TXTCTLS,      ID_UNUSED,      // Assigned to controls for which events are not used      ID_FST = ID_MNU_OPEN,      ID_LST = ID_NBK_TXTCTLS    };    // Leave this as the last line as private access is envoked by this macro    DECLARE_EVENT_TABLE( )};//*****************************************************************************#endif // FRMMAIN_HPP

⌨️ 快捷键说明

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