00001 #if !defined(AFX_GRIDDLG_H__CEF65935_5737_49A0_AF82_8854513FA90F__INCLUDED_)
00002 #define AFX_GRIDDLG_H__CEF65935_5737_49A0_AF82_8854513FA90F__INCLUDED_
00003
00004 #if _MSC_VER > 1000
00005 #pragma once
00006 #endif // _MSC_VER > 1000
00007
00008
00009
00010 #include "resource.h"
00011 #include "GridCtrl_src/GridCtrl.h"
00012 #include "ComHelp.h"
00013 #include "GMECOM.h"
00014 #include "Mga.h"
00015
00017
00018
00019 class CGridDlg : public CDialog
00020 {
00021
00022 public:
00023 CGridDlg(CWnd* pParent = NULL);
00024
00025 CGridDlg(IMgaFCOs* selectedObjs, CWnd* pParent = NULL);
00026
00027
00028 void SetProject(IMgaProject *proj) {m_Project = proj;}
00029
00030 void SetFilter(IMgaFilter *filter);
00031
00032
00033
00034 enum { IDD = IDD_GRIDDLG };
00035 CStatic m_stcFilters;
00036 CStatic m_stcSelect;
00037 CButton m_btnAllTypes;
00038 CButton m_btnAllKinds;
00039 CStatic m_stcType;
00040 CStatic m_stcKind;
00041 CStatic m_stcHelp;
00042 CButton m_btnDisp;
00043 CButton m_btnSet;
00044 CButton m_btnRef;
00045 CButton m_btnModel;
00046 CButton m_btnCon;
00047 CButton m_btnAtom;
00048 CListBox m_lstKind;
00049 CButton m_btnCANCEL;
00050 CButton m_btnOK;
00051 BOOL m_chkAllKinds;
00052 BOOL m_chkAllTypes;
00053 BOOL m_chkAtom;
00054 BOOL m_chkCon;
00055 BOOL m_chkModel;
00056 BOOL m_chkRef;
00057 BOOL m_chkSet;
00058 bool m_bInited;
00059
00060
00061
00062
00063
00064
00065 protected:
00066 virtual void DoDataExchange(CDataExchange* pDX);
00067
00068
00069
00070
00071
00072 protected:
00073
00074 CGridCtrl m_Grid;
00075 CComPtr<IMgaProject> m_Project;
00076 CComPtr<IMgaFCOs> m_FCOs;
00077 CComPtr<IMgaFilter> m_Filter;
00078 CComPtr<IMgaMetaFolder> m_rootMetaFolder;
00079
00080 CSize m_OldSize;
00081
00082 void GetMetaObjectNames(IMgaMetaBase *metaBase);
00083
00084 void BuildExtendedName(IMgaFCO *named, CString &extName);
00085 void BuildExtendedName(IMgaFolder *named, CString &extName);
00086
00087 void MoveWndDown(CWnd *wnd, int offset);
00088
00089 BOOL GetMultiLine(CComPtr<IMgaMetaAttribute> p_Meta);
00090 void InitGrid();
00091 HRESULT ShowItemsRecursively();
00092
00093
00094
00095 virtual BOOL OnInitDialog();
00096 afx_msg void OnSize(UINT nType, int cx, int cy);
00097 afx_msg void OnRecursivelyShowItems();
00098 afx_msg void OnButtonDisplay();
00099 afx_msg void OnCheckAllKinds();
00100 afx_msg void OnChkAllTypes();
00101 afx_msg void OnChkAtom();
00102 afx_msg void OnChkCon();
00103 afx_msg void OnChkModel();
00104 afx_msg void OnChkRef();
00105 afx_msg void OnChkSet();
00106
00107 afx_msg void OnGridDblClick(NMHDR *pNotifyStruct, LRESULT* pResult);
00108 afx_msg void OnGridClick(NMHDR *pNotifyStruct, LRESULT* pResult);
00109 afx_msg void OnGridRClick(NMHDR *pNotifyStruct, LRESULT* pResult);
00110 afx_msg void OnGridStartEdit(NMHDR *pNotifyStruct, LRESULT* pResult);
00111 afx_msg void OnGridEndEdit(NMHDR *pNotifyStruct, LRESULT* pResult);
00112 afx_msg void OnGridStartSelChange(NMHDR *pNotifyStruct, LRESULT* pResult);
00113 afx_msg void OnGridEndSelChange(NMHDR *pNotifyStruct, LRESULT* pResult);
00114 afx_msg void OnGridBeginDrag(NMHDR *pNotifyStruct, LRESULT* pResult);
00115 DECLARE_MESSAGE_MAP()
00116 };
00117
00118
00119
00120
00121 #endif // !defined(AFX_GRIDDLG_H__CEF65935_5737_49A0_AF82_8854513FA90F__INCLUDED_)