/* *************************************************************************
 *  Copyright (C) 1990-1993 by ILOG.
 *  All Rights Reserved.
 *
 *  N O T I C E
 *
 *  THIS MATERIAL IS CONSIDERED A TRADE SECRET BY ILOG.
 *  UNAUTHORIZED ACCESS, USE, REPRODUCTION OR DISTRIBUTION IS PROHIBITED.
 * *************************************************************************/

/*
 *  File :        IlogViewsP.h
 *  Description : Private header of the IlogViews widgets.
 */

#ifndef _IlogViewsP_h
#define _IlogViewsP_h

#include <X11/StringDefs.h>
#include <Xm/XmP.h>
#include <Xm/DrawingAP.h>
#include <Xm/DrawingA.h>

/*
 * Class records
 */

typedef struct _XmIlogViewsClassPart {
	XContext _managersContext;
} XmIlogViewsClassPart;

typedef struct _XmIlogViewsClassRec {
   CoreClassPart          core_class;
   CompositeClassPart	  composite_class;
   ConstraintClassPart	  constraint_class;
   XmManagerClassPart	  manager_class;
   XmDrawingAreaClassPart drawing_area_class;
   XmIlogViewsClassPart   ilogviews_class;
} XmIlogViewsClassRec;

externalref XmIlogViewsClassRec xmIlogViewsClassRec;

/*
 * New fields for the Views Manager / CellManager widget record
 */

typedef struct _XmIlvManagerPart {
    XtPointer ilvdisplay;	/* Ilog Views display                      */
    XtPointer ilvmanager;	/* Manager associated to the current view  */
    String    ilvmanagerid;	/* Manager Id, may be shared among views  */
    Boolean   ilvselectint;
    String    ilvfilename;	/* Loaded filename, maybe NULL             */
    XtPointer ilvview;		/* Current view                            */
    XtPointer ilvscrollhook;	/* ScrollViewHook to manage scroll         */
    Widget    ilvhsb;		/* Horizontal Scrollbar                    */
    Widget    ilvvsb;		/* Vertical Scrollbar                      */
} XmIlvManagerPart;

typedef struct _XmIlvCellManagerPart {
    XtPointer ilvdisplay;	/* Ilog Views display                      */
    XtPointer ilvcellmanager;	/* Manager associated to the current view  */
    String    ilvmanagerid;	/* Manager Id, may be shared by many views */
    XtPointer ilvview;		/* Current view                            */
    int	      ilvnbrow;		/* Number of rows		           */
    int       ilvnbcol;		/* Number of columns			   */
} XmIlvCellManagerPart;

#define _IlvDisplay(w)     (w)->ilvmanager.ilvdisplay
#define _IlvManager(w)     (w)->ilvmanager.ilvmanager
#define _IlvManagerId(w)   (w)->ilvmanager.ilvmanagerid
#define _IlvFileName(w)    (w)->ilvmanager.ilvfilename
#define _IlvView(w)        (w)->ilvmanager.ilvview
#define _IlvScrollHook(w)  (w)->ilvmanager.ilvscrollhook
#define _IlvHsb(w)         (w)->ilvmanager.ilvhsb
#define _IlvVsb(w)         (w)->ilvmanager.ilvvsb

#define _IlvCellDisplay(w)   (w)->ilvcellmanager.ilvdisplay
#define _IlvCellManager(w)   (w)->ilvcellmanager.ilvcellmanager
#define _IlvCellManagerId(w) (w)->ilvcellmanager.ilvmanagerid
#define _IlvCellView(w)      (w)->ilvcellmanager.ilvview
#define _IlvNbRow(w)         (w)->ilvcellmanager.ilvnbrow
#define _IlvNbCol(w)         (w)->ilvcellmanager.ilvnbcol

typedef struct _XmIlvManagerRec
{
   CorePart          core;
   CompositePart     composite;
   ConstraintPart    constraint;
   XmManagerPart     manager;
   XmDrawingAreaPart drawing_area;
   XmIlvManagerPart  ilvmanager;
} XmIlvManagerRec;

typedef struct _XmIlvCellManagerRec
{
   CorePart             core;
   CompositePart        composite;
   ConstraintPart       constraint;
   XmManagerPart        manager;
   XmDrawingAreaPart    drawing_area;
   XmIlvCellManagerPart ilvcellmanager;
} XmIlvCellManagerRec;

#endif /* _IlogViewsP_h */
