WSE.h

Go to the documentation of this file.
00001 
00002 /*  $Id: WSE.h 355 2005-01-11 22:48:55Z andreradke $    */
00003 
00004 /* Word Solution 2.01 Header File for "C"
00005     1993 by DataPak Software, Inc.   */
00006 
00007 // modifications for TCP/Connect II and PowerPC
00008 // 12/93 by Amanda Walker, InterCon Systems Corporation
00009 // 03/94 AW: fixed structure alignment, made into "universal"-style include file
00010 
00011 
00012 #ifndef WSINTF_H
00013 #define WSINTF_H
00014 
00015 #if defined(powerc) || defined (__powerc)
00016 #pragma options align=mac68k
00017 #endif
00018 typedef struct {
00019         long    top;            /* "top" of rectangle */
00020         long    left;           /* "top" of rectangle */
00021         long    bottom;         /* "top" of rectangle */
00022         long    right;          /* "top" of rectangle */
00023 } LongRect, *LongRPtr;
00024 
00025 typedef struct {
00026         long            Pos;        /* Offset into text where line begins */
00027         short           Length;     /* Length of line */
00028         long            Top;        /* Relative top of line */
00029         short           Height;     /* The line's total height, in pixels */
00030         short           Left;       /* Indent -- always zero by WS */
00031         short           Base;       /* Vertical baseline to draw text */
00032         unsigned short  Flags;      /* Reserved for internal use */
00033         unsigned short  rNum;       /* Reserved for internal use */
00034         short           Width;      /* The line's total width, in pixels */
00035         short           MaxWidth;   /* Maximum width for this line */
00036 } LineRec, LineArray[1];
00037 typedef LineArray *LineAPtr, **LineHandle;  /* Ptrs and Handles to above */
00038 
00039 typedef struct {
00040         UniversalProcPtr    hMeasureText;       /* Text widths measurement proc */
00041         UniversalProcPtr    hDrawText;          /* Text drawing proc */
00042         UniversalProcPtr    hFmtDelete;         /* Pre-delete proc */
00043         UniversalProcPtr    hFontInfo;          /* GetFontInfo */
00044         UniversalProcPtr    hWordBreak;         /* Hyphenate a word */
00045         UniversalProcPtr    hTabWidth;          /* Return width of TAB */
00046         UniversalProcPtr    hTabDraw;           /* Draw Tab */
00047         UniversalProcPtr    hMaxWidth;          /* Return maximum line width */
00048         UniversalProcPtr    hPreCalc;           /* Prepare for line calculation */
00049         UniversalProcPtr    hPostCalc;          /* Finish line calculation */
00050         UniversalProcPtr    hDoneCalc;          /* Thinks it's done with line calc */
00051         UniversalProcPtr    hSmartScroll;       /* CR/backspace scrolling */
00052         UniversalProcPtr    hPt2Line;           /* Find line with point */
00053         UniversalProcPtr    hSelectRgn;         /* Make a selection region */
00054         UniversalProcPtr    hGetBuf;            /* Get a text buffer */
00055         UniversalProcPtr    hNewBuf;            /* Create a new text buffer */
00056         UniversalProcPtr    hDeleteBuf;         /* Delete buffer */
00057         UniversalProcPtr    hPreDraw;           /* Pre-Draw of a line */
00058         UniversalProcPtr    hPostDraw;          /* Called after any drawing */
00059         UniversalProcPtr    hAlterRun;          /* Called before insert or delete */
00060         UniversalProcPtr    hEditCall;          /* Called before & after Cut, Copy, Paste */
00061         UniversalProcPtr    hLineShift;         /* Vertical line shift */
00062         UniversalProcPtr    hBoundsMoved;       /* tBounds moved internally */
00063 } WSHooks, *WSHooksPtr;
00064 
00065 typedef struct {
00066         UniversalProcPtr    hMeasureText;       /* Text widths measurement proc */
00067         UniversalProcPtr    hDrawText;          /* Text drawing proc */
00068         UniversalProcPtr hFmtDelete;            /* Pre-delete proc */
00069         UniversalProcPtr    hFontInfo;          /* GetFontInfo */
00070 } UserStyles, *UserStylesPtr;
00071 
00072 /* The Format Run info */
00073 
00074 typedef struct  {
00075         long            Pos;        /* Offset to text */
00076         UserStylesPtr   UserProcs;  /* Pointer to User Style routines */
00077         short           fReal;      /* Font/Pt Size = REAL if non-zero */
00078         char            fName[32];  /* Font Name */
00079         short           fStyle;     /* Text style */
00080         Fixed           fPoint;     /* Point size (fractional) */
00081         RGBColor        fgColor;    /* Foreground color */
00082         short           Txr;        /* Script Manager info */
00083         Fixed           cExtra;     /* CharExtra value (char spacing) */
00084         short           Leading;    /* +- offset for baseline */
00085         long            UserSpace;  /* Space provided for UserStyles */
00086 } FormatRec, *FormatPtr;
00087 typedef FormatRec FormatArray[1], *FormatAPtr, **FormatHandle;
00088 
00089 typedef struct  {
00090         long    Pos;        /* Offset into text */
00091         long    Buf;        /* Buffer Offset */
00092         long    Line;       /* Offset into Line Array */
00093         short   Caret;      /* "Caret" or left-edge, in pixels */
00094 } tSelectPos;
00095 
00096 /* TEXT BUFFER STUFF */
00097 
00098 typedef struct {
00099         long            TBBegin;    /* Absolute text beginning */
00100         long            TBEnd;      /* Absolute text end */
00101         LineHandle      TBLines;    /* Line array */
00102         long            TBLineBeg;  /* Absolute line beginning */
00103         long            TBLineEnd;  /* Absolute line ending */
00104         long            TBPixBeg;   /* Pixel height beginning */
00105         long            TBPixEnd;   /* Pixel height ending */
00106         unsigned long   TBFlags;    /* Misc. attributes */
00107         Handle          TBHandle;   /* Actual text */
00108         Handle          TBCtl;      /* Control Char Run */
00109         long            TBLev1;     /* Reserved for level 1 */
00110         long            TBLev2;     /* Reserved for level 2 */
00111 } TextBlock, TextArray[1];
00112 typedef TextArray *TextArrayPtr, **TextStuff;
00113 
00114 typedef struct {
00115         TextStuff   tHandle;    /* Handle to text structures */
00116         long        tLength;    /* Total length of text */
00117         diskrect    tRect;      /* Display rectangle */
00118         LongRect    tBounds;    /* Bounds rectangle */
00119         long        tvBase;     /* Original BOUNDS position.v */
00120         long        thBase;     /* Original BOUNDS position.h */
00121         tSelectPos  tBegin;     /* Begin selection */
00122         tSelectPos  tEnd;       /* End Selection */
00123         tSelectPos  tCalc;      /* Next place to recalc */
00124         tSelectPos  tCalcEnd;   /* Place to end recalc */
00125         tSelectPos  tTop;       /* Top visible line in tRect */
00126         FormatHandle tFormat;   /* Format Run */
00127         FormatRec   tFmt;       /* Current Format (of caret position) */
00128         short       tJust;      /* Justification of text */
00129         unsigned long tFlags;   /* Misc. attributes */
00130         short       tArrow;     /* Used internally for arrow keys */
00131         long        tRefCon;    /* For application use */
00132         WSHooksPtr  tProcs;     /* Hooks for a variety of stuff */
00133 } WSRec, *WSPtr, **WSHandle;
00134 
00135 
00136 typedef struct {
00137         short   verb;           /* Tab type. Zero = no tab */
00138         short   pos;            /* Pixel position */
00139         short   leader;         /* Leader char */
00140 } tabEntry, tabArray[1];
00141 typedef tabArray *tabPtr, **tabHandle;
00142 
00143 typedef struct {
00144         short   onTop;          /* Top border enable */
00145         short   onLeft;         /* Left border enable */
00146         short   onBottom;       /* Bottom border enable */
00147         short   onRight;        /* Right border enable */
00148         diskrect    spacing;        /* Pixel widths for borders */
00149         short   penPat;         /* pen pattern index for borders */
00150         Fixed   penSize;        /* Pen size for border (fractional) */
00151         short   strike;         /* Single, double, etc. */
00152 } borderInfo;
00153 
00154 typedef struct {
00155         long    rBegin;         /* Where it begins in text */
00156         short   left;           /* Left indent */
00157         short   right;          /* Right indent */
00158         short   indent;         /* 1st line indent */
00159         short   just;           /* Justification */
00160         tabEntry tabs[18];      /* Tabs stops*/
00161         borderInfo  border;     /* par border */
00162         short   flags;          /* Internal use attributes */
00163         Fixed   spacing;        /* Line spacing */
00164         short   spaceType;      /* Type of spacing */
00165         long    refCon;         /* For user */
00166 } rulerRecord, *rulerPtr, **rulerHandle;
00167 
00168 typedef struct {
00169         Fixed   rIncrement;     /* Pixels per increment */
00170         short   rNumIncs;       /* Number of increments per "inch" unit */
00171         short   rUnitNum;       /* Number symbol per unit */
00172         short   rHeight;        /* Height of ruler on screen */
00173         short   rBase1;         /* Height of first baseline */
00174         short   rBase2;         /* Height of second baseline */
00175         short   rZero;          /* What constitutes zeroth pixel */
00176         long    rFlags;         /* Special flags -- used internally */
00177         rulerRecord  rCurRuler; /* Currently displaying ruler info */
00178 } rulerInfo,*rulerInfoPtr,**rulerInfoHandle;
00179 
00180 #endif

Generated on Wed May 31 18:20:04 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6