/* $Id: ListP.h,v 1.3 1997/05/11 13:01:38 archer Exp $
 *	LISTP.H - Private structures needed by Lists
 *
 * A List uses the Scroller for its own scrolling, plus sub-lists
 */
#ifndef _widget_listp_h_included
#define _widget_listp_h_included
#include <Widget/WidgetsP.h>
#include <Widget/List.h>
#include <Widget/ScrollerP.h>
#include <Widget/ScrollbarP.h>
#include <Widget/fontsP.h>


/**
 ** Constants
 **/
#define X11_LIST_MAX_TABS	10


/**
 ** Private types
 **/
typedef struct {
	char		*text;
	void		*data;
	int		length;
	X11_icon	*icon;
	boolean		selected;
	boolean		checked;
} x11__list_line;

typedef struct {
	x11__core	core;
/*
 * Scrolling list
 */
	X11_widget	focus;
	x11__scroller	*scroller;
#if 0
	X11_int_call	on_select,
			on_deselect;
	X11_callback	on_doubleclick;
	void		*user_data;
#endif
	Time		last_click;
	long		delta_x, delta_y;
#if 0
	int		double_click_time;
	int		last_clicked_on,
			clicked_on,
			currently_on;
#endif
/*
 * Lines
 */
	XFontStruct	*font;
	x11__list_line	*lines;
	X11_icon	*check_icon;
	int		w_hint, h_hint;
	int		text_h, height;
	int		max_w;
	int		margin;
	int		number_of_lines;
	int		allocated_lines;
	int		tabs[X11_LIST_MAX_TABS+1];
	boolean		being_filled;
} x11__list;
#define W_LIST		((x11__list *)wdg)


#endif /*_widget_listp_h_included*/
