#ifndef __XAW_TABLE_H__
#define __XAW_TABLE_H__

/*
 *  $Id: Table.h,v 1.1 1992/01/24 07:35:31 marc Exp marc $
 */

/* Table widget public .h file, subclass of (my new) Table widget.
Subclassed as specified in the R5 intrinsics doc, section 1.6.2 */

#include <X11/IntrinsicP.h>	/* This should be in Xaw/Simple.h */

/* A reference to the public .h file for the superclass */

#include <X11/Xaw/List.h>

/* Symbolic identifiers */

#define XtNcolumnOrder "columnOrder"
#define XtCColumnOrder "ColumnOrder"

#define XtNrowSorting "rowSorting"
#define XtCRowSorting "RowSorting"

/* Type declarations for any new resource data types defined by the class */

typedef struct _XtColumnOrder {
   int *columns;
   int ncols;
   int cont;
   int contofs;
} XtColumnOrder;

typedef char * XawTableElement;

typedef struct _XawTableLine {
   XawTableElement *element;
   int nelem;
} XawTableLine;

typedef struct _XawTableInt {	/* Internal line for extra state */
   XawTableLine line;
   int extline;
} XawTableInt;

typedef enum _XawTableReturnType {
   XawTableReturnNone, XawTableReturnLine, XawTableReturnElement
} XawTableReturnType;

/* note that all indices in this struct refer to the table passed to
XawTableChange().  There is no reference to the actual displayed
position on the screen. */

typedef struct _XawTableReturnStruct {
   XawTableReturnType type;
   /* some or all of the following fields may be invalid, depending on
      the type */
   XawTableLine *line;
   int row;	/* row in table */
   XawTableElement *element;
   int col;	/* element in line */
} XawTableReturnStruct;

/* The class record pointer variable */

extern WidgetClass tableWidgetClass;

/* The C type for widgets of this class */

typedef struct _TableRec *TableWidget;
typedef struct _TableClassRec *TableWidgetClass;  /* not sure if I need this */

/* Entry points for new class methods */

_XFUNCPROTOBEGIN

extern void XawTableChange
   (
#if NeedFunctionPrototypes
    Widget		/* w */,
    XawTableLine *	/* lines */,
    int			/* nlines */,
    int			/* longest */,
#if NeedWidePrototypes
    /* Boolean */ int	/* resize */
#else
    Boolean		/* resize */
#endif
#endif
    );

extern void XawTableUnhighlight
   (
#if NeedFunctionPrototypes
    Widget		/* w */
#endif
    );

extern void XawTableHighlight
   (
#if NeedFunctionPrototypes
    Widget			/* w */,
    XawTableReturnStruct *	/* frob */
#endif
    );

extern XawTableReturnStruct *XawTableShowCurrent
   (
#if NeedFunctionPrototypes
    Widget		/* w */
#endif
    );

extern Boolean XawTableGetClicked
   (
#if NeedFunctionPrototypes
    Widget		/* w */,
    XEvent *		/* ev */,
    XawTableReturnType	/* type */,
    XawTableReturnStruct * /* ret */
#endif
    );

_XFUNCPROTOEND

#endif /* __XAW_TABLE_H__ */
/* DON'T ADD STUFF AFTER THIS #endif */
