home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / s / stex2-18.zip / SeeTeX / Xtex / page.h < prev    next >
C/C++ Source or Header  |  1992-04-22  |  3KB  |  125 lines

  1. /*
  2.  * Copyright 1989 Dirk Grunwald
  3.  * 
  4.  * Permission to use, copy, modify, distribute, and sell this software
  5.  * and its documentation for any purpose is hereby granted without fee,
  6.  * provided that the above copyright notice appear in all copies and that
  7.  * both that copyright notice and this permission notice appear in
  8.  * supporting documentation, and that the name of Dirk Grunwald or M.I.T.
  9.  * not be used in advertising or publicity pertaining to distribution of
  10.  * the software without specific, written prior permission.  Dirk
  11.  * Grunwald and M.I.T. makes no representations about the suitability of
  12.  * this software for any purpose.  It is provided "as is" without express
  13.  * or implied warranty.
  14.  * 
  15.  * DIRK GRUNWALD AND M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
  16.  * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  17.  * FITNESS, IN NO EVENT SHALL M.I.T.  BE LIABLE FOR ANY SPECIAL, INDIRECT
  18.  * OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
  19.  * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  20.  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  21.  * OR PERFORMANCE OF THIS SOFTWARE.
  22.  * 
  23.  * Author:
  24.  *     Dr. Dirk Grunwald
  25.  *     Dept. of Computer Science
  26.  *     Campus Box 430
  27.  *     Univ. of Colorado, Boulder
  28.  *     Boulder, CO 80309
  29.  * 
  30.  *     grunwald@colorado.edu
  31.  *     
  32.  */ 
  33.  
  34. /* This is everything that's in a TeXPage */
  35.  
  36. #include "xtex.h"
  37.  
  38. typedef struct TeXPageStackStruct TeXPageStack;
  39.  
  40. struct TeXPageStackStruct
  41. {
  42.     int physicalPageNumber;
  43.     TeXPageStack *next;
  44. };
  45.  
  46.  
  47. #define IS_VALID_PAGE(X) ( X && X -> popUpPage )
  48.  
  49. typedef struct TeXPageStruct
  50. {
  51.   int pageNumber;
  52.   int logicalPageNumber;
  53.  
  54.   TeXPageStack *pageStack;
  55.  
  56.   char * pageData;
  57.   int userMag;
  58.   Bool active;
  59.   Bool realized;
  60. #define MAXPAGENUMBERBUFFER 10
  61.   char pageNumberBuffer[MAXPAGENUMBERBUFFER];
  62.  
  63.   /* action entered numbers */
  64.  
  65.   Bool inputNumberValid;
  66.   Bool inputNumberMinus;
  67.   int inputNumber;
  68.  
  69.   /* if you add any widgets, change page.c::TeXPageLocate */
  70.  
  71.   Widget popUpPage;
  72.   Widget dviPageBox;
  73.   Widget singleDviPage;
  74.   Widget dviPageMenu;
  75.   Widget viewPort;
  76.   Widget buttonBox;
  77.   Widget forewardButton;
  78.   Widget backwardButton;
  79.   Widget markButton;
  80.   Widget dupButton;
  81.   struct TeXPageStruct *tied;
  82.   struct TeXPageStruct *tiedTo;
  83.   Widget tieButton;
  84.   Widget largeButton;
  85.   Widget smallButton;
  86.   Widget quitButton;
  87.   Widget pageNumberText;
  88.   Widget gotoButton;
  89.   Widget reopenButton;
  90.  
  91.   /* these are pulled out of the ViewPort widget */
  92.   Widget vertBar;
  93.   Widget horizBar;
  94.   Bool vertInit;
  95.   Bool horizInit;
  96.  
  97. } TeXPage;
  98.  
  99. extern int TeXPages;
  100. #define MAX_TEX_PAGES 10
  101. extern TeXPage *TheTeXPages [ MAX_TEX_PAGES ];
  102.  
  103. #ifdef _STDC_
  104.  extern void TeXPageBuild();
  105.  extern void TeXPageCloseFile();
  106.  extern void TeXPageSlamPages();
  107.  extern void TeXPageOpenFile();
  108.  extern TeXPage *TeXPageLocate();
  109.  extern void TeXPageRef(TeXPage *, int);
  110.  extern void TeXPageDeref(TeXPage *);
  111.  extern void TeXPageRealize( TeXPage *);
  112.  
  113.  extern void TeXPageInstallActions();
  114. #else
  115.  extern void TeXPageBuild();
  116.  extern void TeXPageCloseFile();
  117.  extern void TeXPageSlamPages();
  118.  extern void TeXPageOpenFile();
  119.  extern TeXPage *TeXPageLocate();
  120.  extern void TeXPageRef();
  121.  extern void TeXPageDeref();
  122.  
  123.  extern void TeXPageInstallActions();
  124. #endif
  125.