#ifndef __SFJP_MYU__AGH_Factory_H__
#define __SFJP_MYU__AGH_Factory_H__

typedef unsigned int  agh_control_id_t;

#define AGH_IMPL_FACTORY_WINDOW		(0x3000)

class CWindowBase;

/////////////////////////////////////////////////////

//	コントロールの実装を生成するクラス、のベース
class CImplFactoryBase : public agh::CControlBase
{
public:
	//virtual void* Create(const char* szControlType)=0;
	//virtual void* Create(agh_control_id_t nControlId)=0;
	//virtual void* Create(agh::CControlBase* pUser, const char* szControlType)=0;
	virtual void* Create(agh::CControlBase* pUser, agh_control_id_t nControlId)=0;

	//virtual IImageImpl* CreateImage(){ return (IImageImpl*)Create("Image"); }
	//virtual void* CreateText(){ return Create("Text"); }
#ifdef CreateWindow
	#undef CreateWindow
#endif
	//virtual void* CreateWindow(){ return Create("Window"); }
	//virtual void* CreateWindow(){ return Create(AGH_IMPL_FACTORY_WINDOW); }
	virtual agh::CWindowBase* CreateWindow(agh::CWindowBase* pUser){
		return (agh::CWindowBase*)Create((agh::CControlBase*)pUser, AGH_IMPL_FACTORY_WINDOW); }
};

typedef CImplFactoryBase IImplFactory, CControlImplFactoryBase;

/*
//	コントロールの実装を生成するクラス、のベース
class CControlImplFactoryBase
{
public:
	virtual void* Create(const char* szControlType)=0;
	virtual void* Create(agh_control_id_t nControlId)=0;

	virtual IImageImpl* CreateImage(){ return (IImageImpl*)Create("Image"); }
	virtual void* CreateText(){ return Create("Text"); }
#ifdef CreateWindow
	#undef CreateWindow
#endif
	virtual void* CreateWindow(){ return Create("Window"); }
};
*/

#endif//__SFJP_MYU__AGH_Factory_H__
