Sindbad~EG File Manager

Current Path : /usr/home/beeson/Otter-Lambda/yyy/
Upload File :
Current File : /usr/home/beeson/Otter-Lambda/yyy/papyrus.h

/* M. Beeson for Mathpert      */
/*_______________________________________________________________________*/
/* The following data structure (Papyrus) is associated to a symbolic
document, but is not saved when the document is saved.  When a saved
document is opened, this structure must be created again; it may
be different if the document is opened on a different machine or
even in a different window.  */

/* First we need a structure to specify the location of a single line.
The YPAIRs specify the top and bottom of the components of the line
in papyrus coordinates */

typedef short coord;

typedef struct { coord x;
                 coord y;
               } YPAIR;

typedef struct { YPAIR formula;
                 YPAIR reasonrect;
                 YPAIR comment;
               } line;  /* 12 bytes per line */

typedef struct
{ int cxChar;      /* horizontal pixels corresponding to 16 papyrus coordinate units */
  int cyChar;      /* height of current font in pixels */
                   /* That is, pixels corresponding to 16 vertical papyrus coordinate units */
  short width;     /* of papyrus, in papyrus coordinates */
  short height;    /* of papyrus, in papyrus coordinates. Measures area on which lines are written,
                      not including any blank area below the solution-so-far. */
  short top;       /* of window, in papyrus coordinates  */
  short left;      /* of window, in papyrus coordinates  */
  short right;     /* of window, in papyrus coordinates  */
  short bottom;    /* of window, in papyrus coordinates. Note this corresponds to
                      the bottom of the window, not the bottom of the window
                      minus the bottommargin.  */
  short leftmargin;/* x coordinate at which formulas begin */
  short rightmargin; /* how far left of pPapyrus->right the formulas will break;
                        but + signs in a sum can occur to the right of here */
  short topmargin; /* y coordinate at which formulas begin */
  short bottommargin;  /* leave this much room at the bottom of the window below the
                          last displayed formula. */
  short reasons;   /* x-coordinate at which justifications begin */
  line *lines;     /* array of pointers to line, of dimension nlines*/
  short nlines;    /* dimension of the lines array        */
  void *selected;  /* linked list of subterms of the active line currently selected by user */
                   /* making it void * enables compiling without lterm.h */
  int selectedline;  /* history[selectedline] is the line from which the
                        selected terms are chosen  */
} Papyrus;

#define REASONLINE 29   /* papyrus->reasons is set to start reasons
                           this multiple of 16 from the right of the papyrus. */

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists