#ifndef _TableP_h
#define _TableP_h

#include <X11/IntrinsicP.h>
#include <X11/ObjectP.h>
#include "Table.h"

/*
 * The AtTableObject is not intended to be instantiated.  Rather it is
 * to serve as the parent superclass for a family of table object classes.
 * The Class methods and resources defined by this class are necessary
 * for communication with the AtSpreadsheet widget.  If they are defined,
 * then the AtSpreadsheet widget will allow automatic  display and editing 
 * of any table object.  Table objects will generally have many associated
 * routines, but those given here are the only ones required.
 */
    
typedef struct _AtTableClassPart {
    char * (*GetCellValue)(AtTableObject, int, int);
    void (*SetCellValue)(AtTableObject, int, int, char *);
    char *(*GetRowName)(AtTableObject, int);
    char *(*GetColumnName)(AtTableObject, int);
} AtTableClassPart;

typedef struct _AtTableClassRec {
    ObjectClassPart object_class;
    AtTableClassPart table_class;
} AtTableClassRec;

typedef struct _AtTablePart {
    /* resources */
    short numRows;
    short numColumns;
    XtCallbackList valueChangedCallback;
    XtCallbackList sizeChangedCallback;

    /* private state */
    char **data;
} AtTablePart;

typedef struct _AtTableRec {
    ObjectPart object;
    AtTablePart table;
} AtTableRec;

#define XtInheritGetCellValue ((XtProc) _XtInherit)
#define XtInheritSetCellValue ((XtProc) _XtInherit)
#define XtInheritGetRowName ((XtProc) _XtInherit)
#define XtInheritGetColumnName ((XtProc) _XtInherit)

#endif /* TableP_h */





