#ifndef CODE_TREEVIEWP_H
#define CODE_TREEVIEWP_H

/*-----------------------------------------------------------------------
 * Xclasses header file
 * ($Id: treeview_p.h,v 1.4 1999/10/13 16:26:39 schmitzj Exp $)
 * 
 * Copyright (C) 1998 Jürgen Schmitz
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library 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 <Xclasses/callable.h>
#include <Xclasses/gfx_checkbox.h>

#define SUBDIST		10
#define SUBBOXSIZE	(hd->height-2)

class ptv_tree : public tv_tree
{
public:
	class ptreeview *tv;

	ptv_tree(class ptreeview *t) : tv_tree()
	{
		tv=t;
	};
	~ptv_tree(void) {};

	void Update(tv_tree *t);
};

class ptreeview : public callable
{
	friend class treeview;
public:
	class treeview *o;

	ptreeview(void);
	~ptreeview();

	ptv_tree roottree;
	unsigned int linecolor;
	gfx_checkbox subbox;

	int lvhook(struct hook_data *);
	int search(tv_tree *root,tv_tree *s,int &r);

	void draw(tv_tree *);
	int show(tv_tree *,int oldcount,int r=0);
};

#endif
