GME  13
GMEOLEModel.h
Go to the documentation of this file.
00001 #if !defined(AFX_GMEOLEMODEL_H__AFDFA91A_CACB_40E6_A254_6C835A980383__INCLUDED_)
00002 #define AFX_GMEOLEMODEL_H__AFDFA91A_CACB_40E6_A254_6C835A980383__INCLUDED_
00003 
00004 #include "GMEView.h"
00005 
00006 #if _MSC_VER > 1000
00007 #pragma once
00008 #endif // _MSC_VER > 1000
00009 // GMEOLEModel.h : header file
00010 //
00011 
00012 
00013 
00015 // CGMEOLEModel command target
00016 
00017 class CGMEOLEModel : public CCmdTarget
00018 {
00019         DECLARE_DYNCREATE(CGMEOLEModel)
00020 
00021 public:
00022         CGMEOLEModel();           // constructor used by dynamic creation
00023         
00024 
00025 // Attributes
00026 public:
00027 
00028 // Operations
00029 public:
00030         void SetView(CGMEView *view) { m_view = view; }
00031 
00032 // Overrides
00033 public:
00034         virtual void OnFinalRelease();
00035 
00036 // Implementation
00037 protected:
00038         CGMEView* m_view;
00039         virtual ~CGMEOLEModel();
00040 
00041         bool AmIValid();
00042 
00043         // Generated message map functions
00044         //{{AFX_MSG(CGMEOLEModel)
00045                 // NOTE - the ClassWizard will add and remove member functions here.
00046         //}}AFX_MSG
00047 
00048         DECLARE_MESSAGE_MAP()
00049         // OLE dispatch map functions
00050         afx_msg BOOL GetActive();
00051         afx_msg void SetActive(BOOL bNewValue);
00052         afx_msg LPDISPATCH GetAspects();
00053         afx_msg void SetAspects(LPDISPATCH newValue);
00054         afx_msg LPDISPATCH GetMgaModel();
00055         afx_msg void SetMgaModel(LPDISPATCH newValue);
00056         afx_msg BOOL GetValid();
00057         afx_msg void SetValid(BOOL bNewValue);
00058         afx_msg void Print();
00059         afx_msg void PrintDialog();
00060         afx_msg void DumpWindowsMetaFile(LPCTSTR filePath);
00061         afx_msg void CheckConstraints();
00062         afx_msg void RunComponent(LPCTSTR appID);
00063         afx_msg void RunComponentDialog();
00064         afx_msg void Close();
00065         afx_msg void GrayOutFCO(BOOL bGray, BOOL bNeighbours, LPDISPATCH mgaFCOs);
00066         afx_msg void GrayOutHide();
00067         afx_msg void ShowSetMembers(LPDISPATCH mgaFCO);
00068         afx_msg void HideSetMembers();
00069         afx_msg void Zoom(long percent);
00070         afx_msg void ZoomTo(LPDISPATCH mgaFCOs);
00071         afx_msg void Scroll(long bar, long scroll);
00072         afx_msg HRESULT DumpModelGeometryXML(LPCTSTR filePath);
00073         afx_msg CString GetCurrentAspect(void);
00074         afx_msg void SetCurrentAspect(const CString& aspectName);
00075 
00076         DECLARE_DISPATCH_MAP()
00077         DECLARE_INTERFACE_MAP()
00078 
00079         BEGIN_DUAL_INTERFACE_PART(Dual, IGMEOLEModel)
00080                 STDMETHOD(put_Active)(THIS_ VARIANT_BOOL isActive);
00081                 STDMETHOD(get_Active)(THIS_ VARIANT_BOOL* isActive);
00082                 STDMETHOD(get_Aspects)(THIS_ IGMEOLEColl** coll);
00083                 STDMETHOD(get_MgaModel)(THIS_ IMgaModel** model);
00084                 STDMETHOD(get_Valid)(THIS_ VARIANT_BOOL* isValid);
00085                 
00086                 STDMETHOD(Print)(THIS);
00087                 STDMETHOD(PrintDialog)(THIS);
00088                 STDMETHOD(DumpWindowsMetaFile)(THIS_ BSTR filePath);
00089                 STDMETHOD(CheckConstraints)(THIS);
00090                 STDMETHOD(RunComponent)(THIS_ BSTR appID);
00091                 STDMETHOD(RunComponentDialog)(THIS);
00092                 STDMETHOD(Close)(THIS);
00093                 STDMETHOD(GrayOutFCO)(THIS_ VARIANT_BOOL bGray, VARIANT_BOOL bNeighbours, IMgaFCOs* mgaFCO);
00094                 STDMETHOD(GrayOutHide)(THIS);
00095                 STDMETHOD(ShowSetMembers)(THIS_ IMgaFCO* mgaFCO);
00096                 STDMETHOD(HideSetMembers)(THIS);
00097                 STDMETHOD(Zoom)(THIS_ DWORD percent);
00098                 STDMETHOD(ZoomTo)(THIS_ IMgaFCOs* mgaFCOs);
00099                 STDMETHOD(Scroll)(THIS_ bar_enum bar, scroll_enum scroll);
00100                 STDMETHOD(DumpModelGeometryXML)(THIS_ BSTR filePath);
00101                 STDMETHOD(GetCurrentAspect)(THIS_ BSTR* aspectName);
00102                 STDMETHOD(SetCurrentAspect)(THIS_ BSTR aspectName);
00103         END_DUAL_INTERFACE_PART(Dual)
00104 
00105         
00106         //     add declaration of ISupportErrorInfo implementation
00107         //     to indicate we support the OLE Automation error object
00108         DECLARE_DUAL_ERRORINFO()
00109 };
00110 
00112 
00113 //{{AFX_INSERT_LOCATION}}
00114 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00115 
00116 #endif // !defined(AFX_GMEOLEMODEL_H__AFDFA91A_CACB_40E6_A254_6C835A980383__INCLUDED_)