/* 
 * CalendarP.h - Private definitions for Calendar widget
 * 
 */

#ifndef _XtCalendarP_h
#define _XtCalendarP_h

/***********************************************************************
 *
 * Calendar Widget Private Data
 *
 ***********************************************************************/

#include "Calendar.h"
#include <X11/IntrinsicP.h>
#include <X11/Xmu/Xmu.h> /* just to get XtJustify */

/* New fields for the Calendar widget class record */

typedef struct {int foo;} CalendarClassPart;

/* Full class record declaration */
typedef struct _CalendarClassRec {
    CoreClassPart	core_class;
    CalendarClassPart	calendar_class;
} CalendarClassRec;

extern CalendarClassRec calendarClassRec;

/* New fields for the Calendar widget record */
typedef struct {
  Boolean           showDays;
  XtCallbackList    clickProc;
  XtCallbackList    dateProc;
  XtCallbackList    dateExtProc;
  XtCallbackList    monthProc;
  XtCallbackList    yearProc;
  Pixel             foreground_pixel;
  Boolean           reverse_video;
  Boolean           showMonth;
  Boolean           showYear;
  Boolean           drawGrid;
  GC		    normal_GC;
  GC                reverse_GC;
  XFontStruct       *font;
  XFontStruct       *dayFont;
  XFontStruct       *monthFont;
  XFontStruct       *hiliteFont;
  int               days_top;
  int               cells_top,
                    cells_left;
  Dimension         cell_BorderWidth;
  Dimension         cell_width,
                    cell_height;
  int               hStep, vStep,
                    hMax, vMax;
  XtJustify         dateJustify;
  int               calendar_width,
                    calendar_height;
  int               extended;
  int               select_start_x,
                    select_start_y,
                    select_end_x,
                    select_end_y;
  int               select_mode; /* ADDING or SUBING */
  int               selection[100]; /* width*height < 100; do dynamically? */
  int               mapping[100];
  int               invmapping[100];
  CalendarSelection appsel[32]; /* publicly accessible selections */
  int               normal_ascent;
  int               month;
  int               year;
  int               monthLeft, monthRight,
                    yearLeft, yearRight;
  char              strMY[30];
} CalendarPart;


/****************************************************************
 *
 * Full instance record declaration
 *
 ****************************************************************/

typedef struct _CalendarRec {
  CorePart	core;
  CalendarPart	calendar;
} CalendarRec;

#define IN_BORDER -1

#define C_SELECT 0
#define C_UNSELECT 1

#define NOTHING 0
#define ADDING 1
#define SUBING 2

#define NOTIN 0
#define INMONTH 1
#define INYEAR 2

#endif /* _XtCalendarP_h */
