GME  13
GMEPartBrowser.h
Go to the documentation of this file.
00001 // GMEPartBrowser.h: interface for the CGMEPartBrowser class.
00002 //
00004 //{{AFX_INCLUDES()
00005 #include "PartBrowserWrapper.h"
00006 //}}AFX_INCLUDES
00007 
00008 #if !defined(AFX_GMEPARTBROWSER_H__59BC1DA9_E2FB_41e7_A562_389C1D6458B7__INCLUDED_)
00009 #define AFX_GMEPARTBROWSER_H__59BC1DA9_E2FB_41e7_A562_389C1D6458B7__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 // CGMEPartBrowser window
00020 
00021 class CGMEPartBrowser : public CDockablePane
00022 {
00023 // Construction
00024 public:
00025         CGMEPartBrowser();
00026         virtual ~CGMEPartBrowser() { theInstance = 0; };
00027 
00028         IDispatch * GetInterface() {
00029                 LPUNKNOWN pUnk = m_PartBrowserWrapper.GetControlUnknown();
00030 
00031                 // From there get the IDispatch interface of control.
00032                 LPDISPATCH pDisp = NULL;
00033                 pUnk->QueryInterface(IID_IDispatch, (LPVOID*)&pDisp);
00034                 return pDisp;
00035         }
00036 
00037         // Dialog Data
00038         //{{AFX_DATA(CGMEPartBrowser)
00039         enum { IDD = IDD_PART_BROWSER_DIALOG };
00040         CPartBrowserWrapper     m_PartBrowserWrapper;
00041         //}}AFX_DATA
00042 
00043         static CGMEPartBrowser *theInstance;
00044 
00045 // Overrides
00046         // ClassWizard generated virtual function overrides
00047         //{{AFX_VIRTUAL(CGMEPartBrowser)
00048         public:
00049         virtual BOOL PreTranslateMessage(MSG* pMsg);
00050         protected:
00051         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00052         //}}AFX_VIRTUAL
00053 
00054         virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
00055 
00056         // Generated message map functions
00057         //{{AFX_MSG(CGMEPartBrowser)
00058         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00059         afx_msg void OnSize(UINT nType, int cx, int cy);
00060         afx_msg void OnAspectChangedGmePartBrowserCtrl(LONG index);
00061         DECLARE_EVENTSINK_MAP()
00062         //}}AFX_MSG
00063         DECLARE_MESSAGE_MAP()
00064 
00065 // Implementation
00066 public:
00067         void SetProject(CComPtr<IMgaProject>& mgaProject);
00068         void SetMetaModel(CGuiMetaModel* meta);
00069         void SetBgColor(COLORREF bgColor);
00070         void ChangeAspect(int ind);
00071         void CycleAspect();
00072         void RePaint(void);
00073 
00074 protected:
00075         CGuiMetaModel*  guiMetaModel;
00076         CFont                   m_font;
00077 };
00078 
00079 //{{AFX_INSERT_LOCATION}}
00080 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00081 
00082 #endif // !defined(AFX_GMEPARTBROWSER_H__59BC1DA9_E2FB_41e7_A562_389C1D6458B7__INCLUDED_)