home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Text⁄Files / FaceLift / FaceLift Folder / FLMain.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-16  |  1.5 KB  |  76 lines  |  [TEXT/KAHL]

  1. # include    "TransSkel.h"
  2.  
  3. # include    "FLMaca.h"
  4. # include    "FaceLift.h"
  5.  
  6.  
  7. /*
  8.  * Offsets of each field in the map and font lists.  There is one
  9.  * extra value, which is actually the offset of the right edge of
  10.  * the last field.  These offsets are relative to the text area.
  11.  */
  12.  
  13.  
  14. # define    mapFields    8        /* number of fields in mapping */
  15.  
  16.  
  17. static short        mapOffsets[mapFields + 1] =
  18. {
  19.     0,
  20.     12,
  21.     122,
  22.     162,
  23.     218,
  24.     230,
  25.     340,
  26.     380,
  27.     436
  28. };
  29.  
  30.  
  31. static LineList    mapStruct =
  32. {
  33.     nil,                        /* port - filled in later        */
  34.     nil,                        /* control - filled in later     */
  35.     { 150, 5, 246, 440 },        /* text display rect, t, l, b, r */
  36.     0,                            /* max lines (set by InitList)   */
  37.     6,                            /* max visible lines             */
  38.     0,                            /* top visible line              */
  39.     16,                            /* line height                   */
  40.     0,                            /* number of lines               */
  41.     noLine,                        /* current line                  */
  42.     false,                        /* no hiliting                   */
  43.     mapFields,                    /* number of fields/line         */
  44.     mapOffsets,                    /* field offsets                 */
  45.     nil                            /* line array (set by InitList)  */
  46. };
  47.  
  48.  
  49.  
  50. WindowPtr    mapWind;
  51.  
  52. LListPtr        mapList = &mapStruct;
  53. MapSpec        mapSpec[maxMappings];
  54.  
  55. Boolean        mapModified = false;
  56. Boolean        showBadFormats = true;
  57. Boolean        showCurFont = true;
  58.  
  59. int            undoOp = noUndo;
  60. int            undoVal;
  61. int            undoPos;
  62. int            undoFieldType;
  63. MapSpec        undoSpec;
  64.  
  65.  
  66.  
  67. int
  68. main (void)
  69. {
  70.     SkelInit ((SkelInitParamsPtr) nil);
  71.     MapSetup ();
  72.     SetupMenus ();
  73.     SkelEventLoop ();
  74.     SkelCleanup ();
  75. }
  76.