#ifndef CODE_DIRVIEWP_H
#define CODE_DiRVIEWP_H

/*-----------------------------------------------------------------------
 * Xclasses header file
 * ($Id: dirview_p.h,v 1.2 1998/09/23 18:52:21 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/listview.h>
#include <Xclasses/gadget.h>
#include <Xclasses/dlist.h>
#include <Xclasses/input.h>

struct filenode
{
	struct node		base;
	struct stat		file;
	struct stat		lfile;
	char			name[1];
};

class pdirview
{
	friend class dirview;
public:
	dirview *o;
	dlist	files;

	int	dirsfirst:1,
		showperiod:1,
		showdirs:1,
		showfiles:1,
		dirmode:1,
		dclick:1,
		free:1;

	char curdir[400];
	char pattern[100];
	char buf[400],buf2[100];
	char *barr[2];

	DIR *dfd;
	struct dirent *dptr;

	input *dirip;

	pdirview();
	~pdirview();
	void RemoveAll(void);
	void addfile(char *);
	void addpath(char *);
	void readdirtick(void);
};

#endif
