// OCNSView.h : interface of the COCNSView class // ///////////////////////////////////////////////////////////////////////////// #if !defined(AFX_OCNSVIEW_H__BB189F9A_FD2B_4488_B79A_A5BE32A12567__INCLUDED_) #define AFX_OCNSVIEW_H__BB189F9A_FD2B_4488_B79A_A5BE32A12567__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class COCNSCntrItem; class COCNSView : public CView // this class is in affiliation with the menu bar tabs and its derivatives of this software and everything that you want to show in the document of project. { protected: // create from serialization only COCNSView(); DECLARE_DYNCREATE(COCNSView) // Attributes public: COCNSDoc* GetDocument();// this function returns the handle of the current document of project. // m_pSelection holds the selection to the current COCNSCntrItem. // For many applications, such a member variable isn't adequate to // represent a selection, such as a multiple selection or a selection // of objects that are not COCNSCntrItem objects. This selection // mechanism is provided just to help you get started. // TODO: replace this selection mechanism with one appropriate to your app. COCNSCntrItem* m_pSelection; // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(COCNSView) public: virtual void OnDraw(CDC* pDC); // overridden to draw this view virtual BOOL PreCreateWindow(CREATESTRUCT& cs);// set some parameter before creation of window. protected: virtual void OnInitialUpdate(); // called first time after construct virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);// called when user clicks "print" icon on toolbar. virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);// called when user clicks "print" icon on toolbar. virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);// called when user clicks "print" icon on toolbar. virtual BOOL IsSelected(const CObject* pDocItem) const;// Container support //}}AFX_VIRTUAL // Implementation public: void ShowSchematic();// to show the buttons of Tx's,Rx's and medium on the document of current project. BOOL changed;// when user change some features of current project(Tx's,Rx's or medium) / this variable is set. CSim* sim;// the pointer of main simulation object of this project. virtual ~COCNSView(); #ifdef _DEBUG virtual void AssertValid() const;// check the validity of document object and the others. virtual void Dump(CDumpContext& dc) const;// empty the document when no object is in. #endif protected: // Generated message map functions protected: //{{AFX_MSG(COCNSView) afx_msg void OnDestroy();// called when user close all windows. afx_msg void OnSetFocus(CWnd* pOldWnd);// called when user chooses a window as an active window. afx_msg void OnSize(UINT nType, int cx, int cy);// called when user changes the size of a window. afx_msg void OnInsertObject();// called when user inserts an object from "Edit" tab. afx_msg void OnCancelEditCntr();// called when user cancels the Edit control. afx_msg void OnSimulationNew();// called when user chooses "new" choice in "simulation" tab of menubar. afx_msg void OnDebugRun();// called when user chooses "run" choice in "debug" tab of menubar. afx_msg void OnDebugParametersLinkutilization();// called when user chooses "Link Utilization" in "debug" tab of menubar. afx_msg void OnDebugCheckintegrity();// called when user selects "Checking Integrity" choice in "debug" tab of menubar. afx_msg void OnProfileTransmitters();// called when user chooses Tx's choice in "profile" tab of menubar. afx_msg void OnProfileReceivers();// called when user chooses Rx's choice in "profile" tab of menubar. afx_msg void OnSimulationOpen();// called when user chooses "open" choice in "simulation" tab of menubar. afx_msg void OnSimulationSave();// called when user selects "save"choice in "simulation" tab of menubar. afx_msg void OnSimulationSaveas();// called when user chooses "save as" choice in "simulation" tab of menubar. afx_msg void OnSimulationEdit();// called when user chooses "Edit" choice in "simulation" tab of menubar. afx_msg void OnProfileMedium();// called when user selects "medium" chice in "profile" tab of menubar. //}}AFX_MSG DECLARE_MESSAGE_MAP() }; #ifndef _DEBUG // debug version in OCNSView.cpp inline COCNSDoc* COCNSView::GetDocument() { return (COCNSDoc*)m_pDocument; } #endif ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_OCNSVIEW_H__BB189F9A_FD2B_4488_B79A_A5BE32A12567__INCLUDED_)