#ifndef _Table_h
#define _Table_h
    
#define XtNnumRows "numRows"
#define XtNnumColumns "numColumns"
#define XtNvalueChangedCallback "valueChangedCallback"
#define XtNsizeChangedCallback "sizeChangedCallback"

#define XtCNumRows "NumRows"
#define XtCNumColumns "NumColumns"

extern WidgetClass atTableObjectClass;
typedef struct _AtTableClassRec *AtTableObjectClass;
typedef struct _AtTableRec *AtTableObject;

typedef struct {
    int x1, y1, x2, y2;  /* The region that changed */
    char *value;         /* if only 1 cell changed, this is the new value */
                         /* otherwise, it is NULL */
} AtTableValueChangedStruct;

#define AtTableROW_INSERTED     0
#define AtTableROW_DELETED      1
#define AtTableCOLUMN_INSERTED  2
#define AtTableCOLUMN_DELETED   3

typedef struct {
    int nrows, ncols;    /* the new number of rows and columns */
    int what;            /* what happened.  One of the above. */
    int where;           /* which row/col deleted or inserted */
} AtTableSizeChangedStruct;

char *AtTableGetCellValue(AtTableObject t, int x, int y);
void AtTableSetCellValue(AtTableObject t, int x, int y, char *value);
char *AtTableGetRowName(AtTableObject t, int x);
char *AtTableGetColumnName(AtTableObject t, int x);
void AtTableGetSize(AtTableObject t, int *x, int *y);

#endif /* _Table_h */    
