[GME-commit] GMESRC/GME/Gme GMEPartBrowser.cpp, NONE, 1.1 GMEPartBrowser.h, NONE, 1.1 PartBrowserWrapper.cpp, NONE, 1.1 PartBrowserWrapper.h, NONE, 1.1 GME.rc, 1.164, 1.165 GME.vcproj, 1.4, 1.5 GMEApp.cpp, 1.146, 1.147 MainFrm.h, 1.30, 1.31 resource.h, 1.75, 1.76 PartBrowser.cpp, 1.2, NONE PartBrowser.h, 1.5, NONE PartBrowserDlg.cpp, 1.7, NONE PartBrowserDlg.h, 1.4, NONE PartBrowserPane.cpp, 1.11, NONE PartBrowserPane.h, 1.2, NONE PartBrowserPaneFrame.cpp, 1.3, NONE PartBrowserPaneFrame.h, 1.1, NONE

Log messages of CVS commits gme-commit at list.isis.vanderbilt.edu
Wed Feb 13 15:24:00 CST 2008


Update of /project/gme-repository/GMESRC/GME/Gme
In directory escher:/tmp/cvs-serv7992/GME/Gme

Modified Files:
	GME.rc GME.vcproj GMEApp.cpp MainFrm.h resource.h 
Added Files:
	GMEPartBrowser.cpp GMEPartBrowser.h PartBrowserWrapper.cpp 
	PartBrowserWrapper.h 
Removed Files:
	PartBrowser.cpp PartBrowser.h PartBrowserDlg.cpp 
	PartBrowserDlg.h PartBrowserPane.cpp PartBrowserPane.h 
	PartBrowserPaneFrame.cpp PartBrowserPaneFrame.h 
Log Message:
1. PartBrowser ActiveX control
2. Drag-drop support PartBrowserbol kozvetlenul a treeview-ba (AggregateTreeCtrl.cpp)
3. Java-s kodok az Eclipse-es kiserletezesi prototipushoz


CVS User:  (csaba)

--- PartBrowserDlg.h DELETED ---

--- PartBrowserPane.h DELETED ---

Index: MainFrm.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/MainFrm.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** MainFrm.h	7 Feb 2008 22:54:48 -0000	1.30
--- MainFrm.h	13 Feb 2008 21:23:58 -0000	1.31
***************
*** 10,14 ****
  #endif // _MSC_VER > 1000
  
! #include "PartBrowser.h"
  #include "GMEBrowser.h"
  #include "GMEObjectInspector.h"
--- 10,14 ----
  #endif // _MSC_VER > 1000
  
! #include "GMEPartBrowser.h"
  #include "GMEBrowser.h"
  #include "GMEObjectInspector.h"
***************
*** 56,61 ****
  	void UpdateTitle(LPCTSTR title);
  	void SetPartBrowser(CGuiMetaModel *meta)		{ m_partBrowser.SetMetaModel(meta); }
! 	void SetPartBrowserBg(COLORREF bgColor)			{ m_partBrowser.SetBgColor(bgColor); m_partBrowser.PostMessage(WM_PAINT);}
! 	void ResetPartBrowser()							{ m_partBrowser.PostMessage(WM_PAINT); }
  	void ChangePartBrowserAspect(int ind)			{ m_partBrowser.ChangeAspect(ind); }
  	void CyclePartBrowserAspect()                   { m_partBrowser.CycleAspect(); }
--- 56,61 ----
  	void UpdateTitle(LPCTSTR title);
  	void SetPartBrowser(CGuiMetaModel *meta)		{ m_partBrowser.SetMetaModel(meta); }
! 	void SetPartBrowserBg(COLORREF bgColor)			{ m_partBrowser.SetBgColor(bgColor); m_partBrowser.RePaint(); }
! 	void ResetPartBrowser()							{ m_partBrowser.RePaint(); }
  	void ChangePartBrowserAspect(int ind)			{ m_partBrowser.ChangeAspect(ind); }
  	void CyclePartBrowserAspect()                   { m_partBrowser.CycleAspect(); }
***************
*** 102,106 ****
  	CComponentBar	m_wndComponentBar;
  	CDialogBar		m_wndDlgBar;
! 	CPartBrowser	m_partBrowser;
  	CGMEBrowser	    m_browser;
  	CGMEObjectInspector	m_objectInspector;
--- 102,106 ----
  	CComponentBar	m_wndComponentBar;
  	CDialogBar		m_wndDlgBar;
! 	CGMEPartBrowser	m_partBrowser;
  	CGMEBrowser	    m_browser;
  	CGMEObjectInspector	m_objectInspector;

--- NEW FILE: GMEPartBrowser.cpp ---
// GMEPartBrowser.cpp: implementation of the CGMEPartBrowser class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "GMEApp.h"
#include "GMEstd.h"
#include "mainfrm.h"
#include "GMEDoc.h"
#include "GMEView.h"
#include "sizecbar.h"
#include "GMEPartBrowser.h"
#include "GuiMeta.h"


/////////////////////////////////////////////////////////////////////////////
// CGMEPartBrowser

CGMEPartBrowser* CGMEPartBrowser::theInstance = 0;
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CGMEPartBrowser::CGMEPartBrowser():
	guiMetaModel (NULL)
{
	//{{AFX_DATA_INIT(CGMEPartBrowser)
	//}}AFX_DATA_INIT

	VERIFY(theInstance == 0);
	theInstance = this;
}


BEGIN_MESSAGE_MAP(CGMEPartBrowser, CSizingControlBar)
	//{{AFX_MSG_MAP(CGMEPartBrowser)
	ON_WM_CREATE()
	ON_WM_SIZE()
	ON_WM_CLOSE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


BEGIN_EVENTSINK_MAP(CGMEPartBrowser, CSizingControlBar)
	//{{AFX_EVENTSINK_MAP(CGMEPartBrowser)
	ON_EVENT(CGMEPartBrowser, IDC_PARTBROWSERCTRL1, 1 /* AspectChanged */, OnAspectChangedGmePartBrowserCtrl, VTS_I4)
	//}}AFX_EVENTSINK_MAP
END_EVENTSINK_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPartBrowser message handlers

int CGMEPartBrowser::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CSizingControlBar::OnCreate(lpCreateStruct) == -1)
		return -1;

	// TODO? Instead: if (!browserDlg.Create(IDD_PARTBROWSER_DIALOG, this)
	if (!m_PartBrowser.Create("PartBrowser", WS_CHILD | WS_VISIBLE, CRect(0, 0, 300, 150), this, IDC_PARTBROWSERCTRL1))
		return -1;

	// older versions of Windows* (NT 3.51 for instance)
	// fail with DEFAULT_GUI_FONT
	if (!m_font.CreateStockObject(DEFAULT_GUI_FONT))
		if (!m_font.CreatePointFont(80, "MS Sans Serif"))
			return -1;

	m_PartBrowser.SetFont(&m_font);	// TODO: maybe needed in the control (CPartBrowserDlg)?

    m_szFloat = CSize(500,165); 
	m_szHorz = CSize(100,165);
    m_szVert = CSize(120,400);

	return 0;
}


void CGMEPartBrowser::OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler)
{
	CSizingControlBar::OnUpdateCmdUI(pTarget, bDisableIfNoHndler);

	UpdateDialogControls(pTarget, bDisableIfNoHndler);
}


void CGMEPartBrowser::OnSize(UINT nType, int cx, int cy) 
{
	CSizingControlBar::OnSize(nType, cx, cy);

	CRect rc;
	GetClientRect(rc);

	m_PartBrowser.MoveWindow(rc);
}


void CGMEPartBrowser::DoDataExchange(CDataExchange* pDX)
{
	//{{AFX_DATA_MAP(CGMEPartBrowser)	
	DDX_Control(pDX, IDC_PARTBROWSERCTRL1, m_PartBrowser);
	//}}AFX_DATA_MAP
}


/* 
ActiveX controls do not have their message pump, it is owned by their containers.
The container in case of GME is a kind of control bar, which is treated as a dialog.
Dialog box messages are filtered by ::IsDialogMessage, which does not allow the 
default dialog kestroke messages (ESC - close dialog, ENTER - push default button
TAB - next item in the tab order etc...) to be propagated to the controls placed on 
the dialog.

Here we avoid calling the default PreTranslateMessage which filtered by 
::IsDialogMessage, dispatch it directly to the controls.

Tihamer

*/

BOOL CGMEPartBrowser::PreTranslateMessage(MSG* pMsg) 
{
	if (pMsg->message == WM_KEYDOWN) {
		switch (pMsg->wParam) {
			case VK_RETURN:
			case VK_ESCAPE:
			case VK_DELETE:
			// Modification by Volgyesi (undo problems)
			case VK_CONTROL:
			case 'z':
			case 'Z':
			// Modification End
				::TranslateMessage(pMsg);
				::DispatchMessage(pMsg);
				return TRUE;
		}
	}

	return CSizingControlBar::PreTranslateMessage(pMsg);
}


void CGMEPartBrowser::SetProject(CComPtr<IMgaProject> mgaProject)
{
	m_PartBrowser.SetCurrentProject(mgaProject);
}


void CGMEPartBrowser::SetMetaModel(CGuiMetaModel* meta)
{
	LPUNKNOWN pMeta = NULL;
	guiMetaModel = meta;
	if (meta != NULL) {
		CComQIPtr<IMgaMetaModel> iMeta;
		iMeta = meta->mgaMeta;
		if (iMeta)
			pMeta = iMeta;
	}
	m_PartBrowser.SetMetaModel(pMeta);
}


void CGMEPartBrowser::SetBgColor(COLORREF bgColor)
{
	m_PartBrowser.SetBgColor((OLE_COLOR)bgColor);
}


void CGMEPartBrowser::ChangeAspect(int ind)
{
	m_PartBrowser.ChangeAspect(ind);
}


void CGMEPartBrowser::CycleAspect()
{
	m_PartBrowser.CycleAspect();
}


void CGMEPartBrowser::RePaint(void)
{
	m_PartBrowser.RePaint();
	CSizingControlBar::PostMessage(WM_PAINT);
}


void CGMEPartBrowser::OnAspectChangedGmePartBrowserCtrl(LONG index)
{
	if (CGMEDoc::theInstance && guiMetaModel) {
		CGuiMetaAspect *am = guiMetaModel->FindAspect(index);
		VERIFY(am);
		CString aspName = am->name;
		CGMEDoc::theInstance->ChangeAspects(aspName);
	}
}

--- PartBrowserPaneFrame.h DELETED ---

Index: GME.vcproj
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GME.vcproj,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** GME.vcproj	8 Mar 2007 19:49:31 -0000	1.4
--- GME.vcproj	13 Feb 2008 21:23:58 -0000	1.5
***************
*** 156,159 ****
--- 156,162 ----
  	</Configurations>
  	<References>
+ 		<ProjectReference
+ 			ReferencedProjectIdentifier="{EC447287-A21A-4DE2-822A-55F20A5805D4}"
+ 			Name="PartBrowser"/>
  	</References>
  	<Files>
***************
*** 730,754 ****
  			</File>
  			<File
! 				RelativePath="GMEOLEData.cpp">
! 				<FileConfiguration
! 					Name="Release|Win32">
! 					<Tool
! 						Name="VCCLCompilerTool"
! 						Optimization="1"
! 						AdditionalIncludeDirectories=""
! 						PreprocessorDefinitions=""
! 						BrowseInformation="1"/>
! 				</FileConfiguration>
! 				<FileConfiguration
! 					Name="Debug|Win32">
! 					<Tool
! 						Name="VCCLCompilerTool"
! 						Optimization="0"
! 						AdditionalIncludeDirectories=""
! 						PreprocessorDefinitions=""
! 						BasicRuntimeChecks="3"
! 						BrowseInformation="1"
! 						WarningLevel="3"/>
! 				</FileConfiguration>
  			</File>
  			<File
--- 733,737 ----
  			</File>
  			<File
! 				RelativePath=".\GMEOLEData.cpp">
  			</File>
  			<File
***************
*** 800,803 ****
--- 783,789 ----
  			</File>
  			<File
+ 				RelativePath=".\GMEPartBrowser.cpp">
+ 			</File>
+ 			<File
  				RelativePath="GmePrintDialog.cpp">
  				<FileConfiguration
***************
*** 954,977 ****
  			</File>
  			<File
! 				RelativePath="mfcdual.cpp">
! 				<FileConfiguration
! 					Name="Release|Win32">
! 					<Tool
! 						Name="VCCLCompilerTool"
! 						Optimization="1"
! 						AdditionalIncludeDirectories=""
! 						PreprocessorDefinitions=""
! 						BrowseInformation="1"/>
! 				</FileConfiguration>
! 				<FileConfiguration
! 					Name="Debug|Win32">
! 					<Tool
! 						Name="VCCLCompilerTool"
! 						Optimization="0"
! 						AdditionalIncludeDirectories=""
! 						PreprocessorDefinitions=""
! 						BasicRuntimeChecks="3"
! 						BrowseInformation="1"/>
! 				</FileConfiguration>
  			</File>
  			<File
--- 940,944 ----
  			</File>
  			<File
! 				RelativePath=".\mfcdual.cpp">
  			</File>
  			<File
***************
*** 1174,1263 ****
  			</File>
  			<File
! 				RelativePath="PartBrowser.cpp">
! 				<FileConfiguration
! 					Name="Release|Win32">
! 					<Tool
! 						Name="VCCLCompilerTool"
! 						Optimization="1"
! 						AdditionalIncludeDirectories=""
! 						PreprocessorDefinitions=""
! 						BrowseInformation="1"/>
! 				</FileConfiguration>
! 				<FileConfiguration
! 					Name="Debug|Win32">
! 					<Tool
! 						Name="VCCLCompilerTool"
! 						Optimization="0"
! 						AdditionalIncludeDirectories=""
! 						PreprocessorDefinitions=""
! 						BasicRuntimeChecks="3"
! 						BrowseInformation="1"/>
! 				</FileConfiguration>
! 			</File>
! 			<File
! 				RelativePath="PartBrowserDlg.cpp">
! 				<FileConfiguration
! 					Name="Release|Win32">
! 					<Tool
! 						Name="VCCLCompilerTool"
! 						Optimization="1"
! 						AdditionalIncludeDirectories=""
! 						PreprocessorDefinitions=""
! 						BrowseInformation="1"/>
! 				</FileConfiguration>
! 				<FileConfiguration
! 					Name="Debug|Win32">
! 					<Tool
! 						Name="VCCLCompilerTool"
! 						Optimization="0"
! 						AdditionalIncludeDirectories=""
! 						PreprocessorDefinitions=""
! 						BasicRuntimeChecks="3"
! 						BrowseInformation="1"/>
! 				</FileConfiguration>
! 			</File>
! 			<File
! 				RelativePath="PartBrowserPane.cpp">
! 				<FileConfiguration
! 					Name="Release|Win32">
! 					<Tool
! 						Name="VCCLCompilerTool"
! 						Optimization="1"
! 						AdditionalIncludeDirectories=""
! 						PreprocessorDefinitions=""
! 						BrowseInformation="1"/>
! 				</FileConfiguration>
! 				<FileConfiguration
! 					Name="Debug|Win32">
! 					<Tool
! 						Name="VCCLCompilerTool"
! 						Optimization="0"
! 						AdditionalIncludeDirectories=""
! 						PreprocessorDefinitions=""
! 						BasicRuntimeChecks="3"
! 						BrowseInformation="1"/>
! 				</FileConfiguration>
! 			</File>
! 			<File
! 				RelativePath="PartBrowserPaneFrame.cpp">
! 				<FileConfiguration
! 					Name="Release|Win32">
! 					<Tool
! 						Name="VCCLCompilerTool"
! 						Optimization="1"
! 						AdditionalIncludeDirectories=""
! 						PreprocessorDefinitions=""
! 						BrowseInformation="1"/>
! 				</FileConfiguration>
! 				<FileConfiguration
! 					Name="Debug|Win32">
! 					<Tool
! 						Name="VCCLCompilerTool"
! 						Optimization="0"
! 						AdditionalIncludeDirectories=""
! 						PreprocessorDefinitions=""
! 						BasicRuntimeChecks="3"
! 						BrowseInformation="1"/>
! 				</FileConfiguration>
  			</File>
  			<File
--- 1141,1145 ----
  			</File>
  			<File
! 				RelativePath=".\PartBrowserWrapper.cpp">
  			</File>
  			<File
***************
*** 1579,1582 ****
--- 1461,1467 ----
  			</File>
  			<File
+ 				RelativePath=".\DynMenu.h">
+ 			</File>
+ 			<File
  				RelativePath="EnumVar.h">
  			</File>
***************
*** 1615,1619 ****
  			</File>
  			<File
! 				RelativePath="GMEOLEData.h">
  			</File>
  			<File
--- 1500,1504 ----
  			</File>
  			<File
! 				RelativePath=".\GMEOLEData.h">
  			</File>
  			<File
***************
*** 1630,1633 ****
--- 1515,1521 ----
  			</File>
  			<File
+ 				RelativePath=".\GMEPartBrowser.h">
+ 			</File>
+ 			<File
  				RelativePath="GmePrintDialog.h">
  			</File>
***************
*** 1660,1664 ****
  			</File>
  			<File
! 				RelativePath="mfcdual.h">
  			</File>
  			<File
--- 1548,1552 ----
  			</File>
  			<File
! 				RelativePath=".\mfcdual.h">
  			</File>
  			<File
***************
*** 1690,1703 ****
  			</File>
  			<File
! 				RelativePath="PartBrowser.h">
! 			</File>
! 			<File
! 				RelativePath="PartBrowserDlg.h">
! 			</File>
! 			<File
! 				RelativePath="PartBrowserPane.h">
! 			</File>
! 			<File
! 				RelativePath="PartBrowserPaneFrame.h">
  			</File>
  			<File
--- 1578,1582 ----
  			</File>
  			<File
! 				RelativePath=".\PartBrowserWrapper.h">
  			</File>
  			<File

Index: GMEApp.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEApp.cpp,v
retrieving revision 1.146
retrieving revision 1.147
diff -C2 -d -r1.146 -r1.147
*** GMEApp.cpp	13 Feb 2008 19:03:15 -0000	1.146
--- GMEApp.cpp	13 Feb 2008 21:23:58 -0000	1.147
***************
*** 887,890 ****
--- 887,894 ----
  		CGMEObjectInspector::theInstance->SetProject(mgaProject);
  
+ // notify Part Browser
+ 		ASSERT(CGMEPartBrowser::theInstance!=NULL);
+ 		CGMEPartBrowser::theInstance->SetProject(mgaProject);
+ 
  // by swapping the order of SetProject (first ObjectInspector, then Browser), 
  // the user will see the properties of the initally selected project at once

--- PartBrowserDlg.cpp DELETED ---

--- NEW FILE: PartBrowserWrapper.h ---
#if !defined(AFX_PARTBROWSER_H__A93E5E7F_4E48_44cd_AF65_F45FFECAEBA4__INCLUDED_)
#define AFX_PARTBROWSER_H__A93E5E7F_4E48_44cd_AF65_F45FFECAEBA4__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++

// NOTE: Do not modify the contents of this file.  If this class is regenerated by
//  Microsoft Visual C++, your modifications will be overwritten.

/////////////////////////////////////////////////////////////////////////////
// CPartBrowser wrapper class

#pragma warning(disable: 4100) // unreferenced formal parameter warning

class CPartBrowser : public CWnd
{
protected:
	DECLARE_DYNCREATE(CPartBrowser)
public:
	CLSID const& GetClsid()
	{
		static CLSID const clsid
			= { 0x1FF57057, 0xD598, 0x4FC2, { 0x8F, 0x9D, 0x70, 0x8F, 0x59, 0xB9, 0xC0, 0x17 } };
		return clsid;
	}
	virtual BOOL Create(LPCTSTR lpszClassName,
		LPCTSTR lpszWindowName, DWORD dwStyle,
		const RECT& rect,
		CWnd* pParentWnd, UINT nID,
		CCreateContext* pContext = NULL)
	{ return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); }

    BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle,
		const RECT& rect, CWnd* pParentWnd, UINT nID,
		CFile* pPersist = NULL, BOOL bStorage = FALSE,
		BSTR bstrLicKey = NULL)
	{ return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,
		pPersist, bStorage, bstrLicKey); }

// Attributes
public:

// Operations
public:
	void SetCurrentProject(LPUNKNOWN pMgaProject);
	void SetMetaModel(LPUNKNOWN meta);
	void SetBgColor(OLE_COLOR oleBgColor);
	void ChangeAspect(LONG index);
	void CycleAspect(void);
	void RePaint(void);
	void AboutBox();
};

#pragma warning(default: 4100) // unreferenced formal parameter warning

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_PARTBROWSER_H__A93E5E7F_4E48_44cd_AF65_F45FFECAEBA4__INCLUDED_)

--- NEW FILE: PartBrowserWrapper.cpp ---
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++

// NOTE: Do not modify the contents of this file.  If this class is regenerated by
//  Microsoft Visual C++, your modifications will be overwritten.


#include "stdafx.h"
#include "partbrowserwrapper.h"

/////////////////////////////////////////////////////////////////////////////
// CPartBrowser

IMPLEMENT_DYNCREATE(CPartBrowser, CWnd)

/////////////////////////////////////////////////////////////////////////////
// CPartBrowser operations

void CPartBrowser::SetCurrentProject(LPUNKNOWN pMgaProject)
{
	static BYTE parms[] =
		VTS_UNKNOWN;
	InvokeHelper(0x1, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
		pMgaProject);
}

void CPartBrowser::SetMetaModel(LPUNKNOWN meta)
{
	static BYTE parms[] =
		VTS_UNKNOWN;
	InvokeHelper(0x2, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
		meta);
}

void CPartBrowser::SetBgColor(OLE_COLOR oleBgColor)
{
	static BYTE parms[] =
		VTS_COLOR;
	InvokeHelper(0x3, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
		oleBgColor);
}

void CPartBrowser::ChangeAspect(LONG index)
{
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x4, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
		 index);
}

void CPartBrowser::CycleAspect(void)
{
	InvokeHelper(0x5, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

void CPartBrowser::RePaint(void)
{
	InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

void CPartBrowser::AboutBox()
{
	InvokeHelper(0xfffffdd8, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

--- PartBrowser.h DELETED ---

--- PartBrowserPaneFrame.cpp DELETED ---

--- NEW FILE: GMEPartBrowser.h ---
// GMEPartBrowser.h: interface for the CGMEPartBrowser class.
//
//////////////////////////////////////////////////////////////////////
//{{AFX_INCLUDES()
#include "PartBrowserWrapper.h"
//}}AFX_INCLUDES

#if !defined(AFX_GMEPARTBROWSER_H__59BC1DA9_E2FB_41e7_A562_389C1D6458B7__INCLUDED_)
#define AFX_GMEPARTBROWSER_H__59BC1DA9_E2FB_41e7_A562_389C1D6458B7__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

//#include "stdafx.h"
#include "sizecbar.h"
#include "resource.h"
#include "GuiMeta.h"

/////////////////////////////////////////////////////////////////////////////
// CPartBrowser window

class CGMEPartBrowser : public CSizingControlBar
{
// Construction
public:
	CGMEPartBrowser();
	virtual ~CGMEPartBrowser() { theInstance = 0; };

	IDispatch * GetInterface() {
		LPUNKNOWN pUnk = m_PartBrowser.GetControlUnknown();

		// From there get the IDispatch interface of control.
		LPDISPATCH pDisp = NULL;
		pUnk->QueryInterface(IID_IDispatch, (LPVOID*)&pDisp);
		return pDisp;
	}

	// Dialog Data
	//{{AFX_DATA(CGMEPartBrowser)
	enum { IDD = IDD_PART_BROWSER_DIALOG };
	CPartBrowser	m_PartBrowser;
	//}}AFX_DATA

	static CGMEPartBrowser *theInstance;

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CGMEPartBrowser)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

	virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);

	// Generated message map functions
	//{{AFX_MSG(CGMEPartBrowser)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnAspectChangedGmePartBrowserCtrl(LONG index);
	DECLARE_EVENTSINK_MAP()
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

// Implementation
public:
	void SetProject(CComPtr<IMgaProject> mgaProject);
	void SetMetaModel(CGuiMetaModel* meta);
	void SetBgColor(COLORREF bgColor);
	void ChangeAspect(int ind);
	void CycleAspect();
	void RePaint(void);

protected:
	CGuiMetaModel*	guiMetaModel;
	CFont			m_font;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_GMEPARTBROWSER_H__59BC1DA9_E2FB_41e7_A562_389C1D6458B7__INCLUDED_)

Index: resource.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/resource.h,v
retrieving revision 1.75
retrieving revision 1.76
diff -C2 -d -r1.75 -r1.76
*** resource.h	7 Feb 2008 22:54:48 -0000	1.75
--- resource.h	13 Feb 2008 21:23:58 -0000	1.76
***************
*** 29,34 ****
  #define IDI_TYPEMARK_ICON               137
  #define IDI_INSTANCEMARK_ICON           138
- #define IDD_PARTBROWSER_DIALOG          139
- #define IDD_PARTBROWSERFRAME_DIALOG     140
  #define IDC_AUTOCONNECT2_CURSOR         142
  #define IDD_ATTRIBUTES_DIALOG           143
--- 29,32 ----
***************
*** 77,80 ****
--- 75,79 ----
  #define IDR_MYTOOLBARS_MENU             212
  #define IDR_TOOLBAR_NAVIG               213
+ #define IDD_PART_BROWSER_DIALOG         214
  #define IDC_NAME                        1000
  #define IDC_TYPENAME                    1001
***************
*** 185,188 ****
--- 184,188 ----
  #define IDC_BUTTON_SVNTRY               1114
  #define IDC_STATIC_SVN_SECTION1         1115
+ #define IDC_PARTBROWSERCTRL1            1116
  #define IDD_PRINT_DIALOG                1538
  #define IDD_PRINTSETUP_DIALOG           1539
***************
*** 419,423 ****
  #ifndef APSTUDIO_READONLY_SYMBOLS
  #define _APS_3D_CONTROLS                     1
! #define _APS_NEXT_RESOURCE_VALUE        214
  #define _APS_NEXT_COMMAND_VALUE         33047
  #define _APS_NEXT_CONTROL_VALUE         1124
--- 419,423 ----
  #ifndef APSTUDIO_READONLY_SYMBOLS
  #define _APS_3D_CONTROLS                     1
! #define _APS_NEXT_RESOURCE_VALUE        216
  #define _APS_NEXT_COMMAND_VALUE         33047
  #define _APS_NEXT_CONTROL_VALUE         1124

--- PartBrowserPane.cpp DELETED ---

Index: GME.rc
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GME.rc,v
retrieving revision 1.164
retrieving revision 1.165
diff -C2 -d -r1.164 -r1.165
*** GME.rc	13 Feb 2008 19:00:15 -0000	1.164
--- GME.rc	13 Feb 2008 21:23:58 -0000	1.165
***************
*** 716,734 ****
  END
  
- IDD_PARTBROWSER_DIALOG DIALOGEX 0, 0, 137, 74
- STYLE DS_SETFONT | DS_SETFOREGROUND | WS_CHILD | WS_VISIBLE
- EXSTYLE WS_EX_CLIENTEDGE
- FONT 8, "MS Sans Serif", 0, 0, 0x1
- BEGIN
-     CONTROL         "Tab1",IDC_ASPECT_TAB,"SysTabControl32",TCS_BOTTOM | 
-                     TCS_MULTILINE | TCS_RAGGEDRIGHT,7,7,123,60
- END
- 
- IDD_PARTBROWSERFRAME_DIALOG DIALOG  0, 0, 107, 56
- STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE | WS_VSCROLL
- FONT 8, "MS Sans Serif"
- BEGIN
- END
- 
  IDD_BROWSER_DIALOG DIALOGEX 0, 0, 250, 256
  STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
--- 716,719 ----
***************
*** 1092,1095 ****
--- 1077,1091 ----
  END
  
+ IDD_PART_BROWSER_DIALOG DIALOGEX 0, 0, 186, 90
+ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | 
+     WS_SYSMENU
+ CAPTION "Dialog"
+ FONT 8, "MS Shell Dlg", 400, 0, 0x1
+ BEGIN
+     CONTROL         "",IDC_PARTBROWSERCTRL1,
+                     "{0AC21E5F-BC62-4557-8FFB-EFC2DEADA460}",WS_TABSTOP,7,7,
+                     172,76
+ END
+ 
  
  /////////////////////////////////////////////////////////////////////////////
***************
*** 1155,1174 ****
      END
  
-     IDD_PARTBROWSER_DIALOG, DIALOG
-     BEGIN
-         LEFTMARGIN, 7
-         RIGHTMARGIN, 130
-         TOPMARGIN, 7
-         BOTTOMMARGIN, 67
-     END
- 
-     IDD_PARTBROWSERFRAME_DIALOG, DIALOG
-     BEGIN
-         LEFTMARGIN, 7
-         RIGHTMARGIN, 92
-         TOPMARGIN, 7
-         BOTTOMMARGIN, 49
-     END
- 
      IDD_BROWSER_DIALOG, DIALOG
      BEGIN
--- 1151,1154 ----
***************
*** 1296,1299 ****
--- 1276,1287 ----
          BOTTOMMARGIN, 58
      END
+ 
+     IDD_PART_BROWSER_DIALOG, DIALOG
+     BEGIN
+         LEFTMARGIN, 7
+         RIGHTMARGIN, 179
+         TOPMARGIN, 7
+         BOTTOMMARGIN, 83
+     END
  END
  #endif    // APSTUDIO_INVOKED
***************
*** 1345,1349 ****
      0
  END
- 
  
  /////////////////////////////////////////////////////////////////////////////
--- 1333,1336 ----

--- PartBrowser.cpp DELETED ---



More information about the GME-commit mailing list