GME  13
GMEViewFrame.h
Go to the documentation of this file.
00001 #if !defined(AFX_GMEVIEWFRAME_H__7F2998F4_8B14_42a5_933D_B27192C030AC__INCLUDED_)
00002 #define AFX_GMEVIEWFRAME_H__7F2998F4_8B14_42a5_933D_B27192C030AC__INCLUDED_
00003 
00004 #if _MSC_VER > 1000
00005 #pragma once
00006 #endif // _MSC_VER > 1000
00007 // GMEViewFrame.h : header file
00008 //
00009 
00010 #include "Resource.h"
00011 #include "ModelPropertiesDlgBar.h"
00012 #include "GMEViewDlg.h"
00013 
00014 
00016 // CGMEViewFrame dialog
00017 
00018 
00019 class CGMEViewFrame : public CMiniFrameWnd
00020 {
00021         DECLARE_DYNCREATE(CGMEViewFrame)
00022 
00023 // Construction
00024 public:
00025         CGMEViewFrame();   // standard constructor
00026         virtual ~CGMEViewFrame();
00027 
00028 public:
00029 // Dialog Data
00030         //{{AFX_DATA(CGMEViewFrame)
00031         enum { IDD = IDD_GMEVIEW_DIALOG };
00032         //}}AFX_DATA
00033 
00034         CModelPropertiesDlgBar  propBar;
00035         CGMEViewDlg                             viewWnd;
00036 
00037         static int                              instanceCount;
00038         static CString                  strMyViewWndClass;
00039         CComPtr<IMgaProject>    mgaProject;
00040 
00041 // Overrides
00042         // ClassWizard generated virtual function overrides
00043         //{{AFX_VIRTUAL(CGMEViewFrame)
00044         protected:
00045         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00046         virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00047         //}}AFX_VIRTUAL
00048 
00049 public:
00050         void                                    SetCurrentProject(CComPtr<IMgaProject> project);
00051         void                                    SetMetaModel(CComPtr<IMgaMetaModel> meta);
00052         void                                    SetModel(CComPtr<IMgaModel> model);
00053         void                                    ChangeAspect(int aspect);
00054         void                                    Invalidate(void);
00055 // Implementation
00056 protected:
00057         void                                    InitPropBarFromMeta(CComPtr<IMgaMetaModel> meta);
00058         void                                    InitPropBarFromModel(CComPtr<IMgaModel> mgaModel);
00059         void                                    InitAspectBox(CComPtr<IMgaMetaModel> meta);
00060         void                                    InitModelKindName(CComPtr<IMgaMetaModel> meta);
00061         void                                    InitModelName(CComPtr<IMgaModel> mgaModel);
00062         void                                    InitModelType(CComPtr<IMgaModel> mgaModel);
00063         void                                    InitModelTypeName(CComPtr<IMgaFCO> baseType, CComPtr<IMgaModel> mgaModel);
00064 
00065         // Generated message map functions
00066         //{{AFX_MSG(CGMEViewFrame)
00067         virtual BOOL OnInitDialog();
00068         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00069         afx_msg void OnClose();
00070         afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
00071         afx_msg void OnSelchangeAspectBox();
00072         //}}AFX_MSG
00073         DECLARE_MESSAGE_MAP()
00074 
00075 public:
00076         int             GetAspectProperty(void) const;
00077         void    SetAspectProperty(int ind);
00078         void    SetKindNameProperty(CString& kindName);
00079         void    GetNameProperty(CString& txt) const;
00080         void    SetNameProperty(CString& name);
00081         void    SetTypeProperty(bool isType);
00082         void    SetTypeNameProperty(CString& typeName);
00083 
00084         void    SendAspectChange(long index);
00085         void    SendZoomChange(long index);
00086         void    SendWriteStatusZoom(long zoomVal);
00087 };
00088 
00089 //{{AFX_INSERT_LOCATION}}
00090 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00091 
00092 #endif // !defined(AFX_GMEVIEWFRAME_H__7F2998F4_8B14_42a5_933D_B27192C030AC__INCLUDED_)