GME  13
GMEChildFrame.h
Go to the documentation of this file.
00001 // GMEChildFrame.h: interface for the CGMEChildFrame class.
00002 //
00004 //{{AFX_INCLUDES()
00005 #include "GMEChildFrameWrapper.h"
00006 //}}AFX_INCLUDES
00007 
00008 #if !defined(AFX_GMECHILDFRAME_H__A4303466_69AA_4DE9_BEDC_F67BBACF83FD__INCLUDED_)
00009 #define AFX_GMECHILDFRAME_H__A4303466_69AA_4DE9_BEDC_F67BBACF83FD__INCLUDED_
00010 
00011 #if _MSC_VER > 1000
00012 #pragma once
00013 #endif // _MSC_VER > 1000
00014 
00015 #include "resource.h"
00016 #include "GuiMeta.h"
00017 
00019 // CGMEChildFrame window
00020 
00021 class CGMEChildFrame : public CView
00022 {
00023 protected:
00024         DECLARE_DYNCREATE(CGMEChildFrame)
00025 // Construction
00026 public:
00027         CGMEChildFrame();
00028         virtual ~CGMEChildFrame() { theInstance = 0; };
00029 
00030         IDispatch * GetInterface() {
00031                 LPUNKNOWN pUnk = m_ChildFrame.GetControlUnknown();
00032 
00033                 // From there get the IDispatch interface of control.
00034                 LPDISPATCH pDisp = NULL;
00035                 pUnk->QueryInterface(IID_IDispatch, (LPVOID*)&pDisp);
00036                 return pDisp;
00037         }
00038 
00039         // Dialog Data
00040         //{{AFX_DATA(CGMEChildFrame)
00041         enum { IDD = IDD_CHILDFRAME_DIALOG };
00042         CGMEChildFrameWrapper   m_ChildFrame;
00043         //}}AFX_DATA
00044 
00045         static CGMEChildFrame *theInstance;
00046 
00047 // Overrides
00048         // ClassWizard generated virtual function overrides
00049         //{{AFX_VIRTUAL(CGMEChildFrame)
00050         public:
00051         virtual void OnDraw(CDC* pDC);  // overridden to draw this view
00052         virtual BOOL PreTranslateMessage(MSG* pMsg);
00053         protected:
00054         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00055         //}}AFX_VIRTUAL
00056 
00057         // Generated message map functions
00058         //{{AFX_MSG(CGMEChildFrame)
00059         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00060         afx_msg void OnSize(UINT nType, int cx, int cy);
00061         afx_msg void OnAspectChangedGmeViewCtrl(LONG index);
00062         afx_msg void OnWriteStatusZoomGmeViewCtrl(LONG zoomVal);
00063         DECLARE_EVENTSINK_MAP()
00064         //}}AFX_MSG
00065         DECLARE_MESSAGE_MAP()
00066 
00067 // Implementation
00068 public:
00069         void SetProject(CComPtr<IMgaProject> mgaProject);
00070         void SetMetaModel(CGuiMetaModel* meta);
00071         void SetModel(CComPtr<IMgaModel> mgaModel);
00072         void ChangeAspect(int aspect);
00073         void CycleAspect(void);
00074         void Invalidate(void);
00075 
00076         CComPtr<IMgaModel>&     GetMgaModel(void) { return mgaModel; };
00077 
00078 protected:
00079         CGuiMetaModel*          guiMetaModel;
00080         CComPtr<IMgaModel>      mgaModel;
00081 };
00082 
00083 //{{AFX_INSERT_LOCATION}}
00084 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00085 
00086 #endif // !defined(AFX_GMECHILDFRAME_H__A4303466_69AA_4DE9_BEDC_F67BBACF83FD__INCLUDED_)