/*  $Id: component_manager.cpp,v 1.9 2004/02/01 20:53:15 mbn Exp $
**
**  ClanLib Game SDK
**  Copyright (C) 2003  The ClanLib Team
**  For a total list of contributers see the file CREDITS.
**
**  This library is free software; you can redistribute it and/or
**  modify it under the terms of the GNU Lesser General Public
**  License as published by the Free Software Foundation; either
**  version 2.1 of the License, or (at your option) any later version.
**
**  This library is distributed in the hope that it will be useful,
**  but WITHOUT ANY WARRANTY; without even the implied warranty of
**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
**  Lesser General Public License for more details.
**
**  You should have received a copy of the GNU Lesser General Public
**  License along with this library; if not, write to the Free Software
**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
**
*/

#include "precomp.h"
#include "API/GUI/component_manager.h"
#include "component_manager_generic.h"

/////////////////////////////////////////////////////////////////////////////
// CL_ComponentManager construction:

CL_ComponentManager::CL_ComponentManager(
	const std::string &resource_id,
	CL_ResourceManager *res_manager,
	CL_Component *parent,
	CL_StyleManager *style)
{
	impl = new CL_ComponentManager_Generic(resource_id, res_manager, parent, style);
}

CL_ComponentManager::CL_ComponentManager(
	const std::string &filename,
	CL_Component *parent,
	CL_StyleManager *style, 
	CL_InputSourceProvider *input_provider,
	bool delete_provider)
{
	impl = new CL_ComponentManager_Generic(filename, parent, style, input_provider, delete_provider);
}

CL_ComponentManager::CL_ComponentManager(
	const CL_DomDocument &document,
	const CL_DomElement &element,
	CL_Component *parent,
	CL_StyleManager *style)
{
	impl = new CL_ComponentManager_Generic(document, element, parent, style);
}

CL_ComponentManager::CL_ComponentManager(const CL_ComponentManager &copy)
: impl(copy.impl)
{
}

CL_ComponentManager::~CL_ComponentManager()
{
}

/////////////////////////////////////////////////////////////////////////////
// CL_ComponentManager attributes:

CL_Component *CL_ComponentManager::get_component(const std::string &name) const
{
	return impl->get_component(name);
}

CL_StyleManager *CL_ComponentManager::get_style_manager() const
{
	return impl->get_style_manager();
}

/////////////////////////////////////////////////////////////////////////////
// CL_ComponentManager operations:

/////////////////////////////////////////////////////////////////////////////
// CL_ComponentManager implementation:
