/*  $Id: treeitem_generic.cpp,v 1.10 2004/01/15 00:55:22 grumbel 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 "treeitem_generic.h"
#include "API/GUI/treeitem.h"
#include "API/GUI/component.h"
#include "API/GUI/stylemanager.h"
#include "API/Core/XML/dom_element.h"
#include "API/Display/surface.h"

/////////////////////////////////////////////////////////////////////////////
// Construction:

CL_TreeItem_Generic::CL_TreeItem_Generic(
	CL_TreeItem *self,
	CL_TreeNode *node)
: node(node), 
  sur_icon(0),
  delete_sur_icon(false),
  custom_height(0),
  text_margin(0),
  item(self)
{
	slot_mouse_down = item->sig_mouse_down().connect(
		this, &CL_TreeItem_Generic::on_mouse_down);

	items.reserve(8);
}

CL_TreeItem_Generic::~CL_TreeItem_Generic()
{
	if(sur_icon && delete_sur_icon)
		delete sur_icon;
}

/////////////////////////////////////////////////////////////////////////////
// Callbacks:

void CL_TreeItem_Generic::on_mouse_down(const CL_InputEvent &key)
{
//	item->sig_clicked()();
}
