home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 8 / Eagles_Nest_Mac_Collection_Disc_8.TOAST / Developer Environments / MacCjr / MacC Jr / Library Folder / C Include Folder / TextEdit.h < prev    next >
Encoding:
Text File  |  1987-01-06  |  2.0 KB  |  72 lines  |  [TEXT/EDIT]

  1. // textEdit.h
  2. // © Copyright 1984 Consulair Corp, All Rights Reserved.
  3. // Portions © Copyright Apple Computer, Inc: 1982, 1983, 1984
  4. //            Stanford University, SUMEX project: 1984
  5. // Requires Macdefs.h Quickdraw.h Window.h
  6.  
  7. #ifndef TextEditLoaded
  8.    
  9.   #ifndef WindowLoaded
  10.     #include "window.h"
  11.     #endif
  12.     #define TextEditLoaded
  13.    
  14. /* add constants for justification */
  15.  
  16.      #define   teJustLeft     0
  17.      #define   teJustCenter   1
  18.      #define   teJustRight   -1
  19.    
  20. //  TextEdit
  21.   
  22.   struct __TE
  23.     {
  24.     Rect    destRect;
  25.     Rect    viewRect;
  26.     Rect    selRect;        //  select rectangle 
  27.     short    lineHeight;        //  current font lineheight 
  28.     short    firstBL;        //  current first baseline offset 
  29.     Point    selPoint;        //  selection point (mouseLoc) 
  30.     short    selStart;
  31.     short    selEnd;
  32.     short    active;            //  nonzero if active 
  33.     long    wordBreak;        //  wordbreak routine 
  34.     long    clikLoop;        //  clickloop routine 
  35.     long    clickTime;        //  time of 1st click 
  36.     short    clickLoc;        //  char location of click 
  37.     long    caretTime;        //  time for next caret blink 
  38.     short    caretState;
  39.     short    just;            //  fill style 
  40.     short    telength;        //  length of text below 
  41.     Handle    hText;            //  handle to actual text 
  42.     short    recalBack;        //  nonzero if recal in backround 
  43.     short    recalLines;        //  line being recaled 
  44.     short    clikStuff;        //  internal clickstuff 
  45.     short    crOnly;            //  -1 if CR line breaks only 
  46.     short    txFont;
  47.     Style    txFace;
  48.     short    txMode;
  49.     short    txSize;
  50.     GrafPtr    inPort;            //  the grafport 
  51.     Ptr        highHook;        //  highlighting hook 
  52.     Ptr        caretHook;
  53.     short    nLines;
  54.     short    lineStarts[1];        //  actual linestarts 
  55.     };
  56.   
  57.   #define TERec struct __TE
  58.   typedef TERec *TEPtr;
  59.   typedef TEPtr *TEHandle;
  60.   
  61. //  Functions returning other than integer 
  62.   
  63.   #define TEGetText (Handle)TEGetText
  64.   #define TENew (TEHandle)TENew
  65.  
  66. // change two fields of the TERec data structure from "corrections.h"
  67.  
  68.      #define  teLength    telength   
  69.      #define  fontAscent  firstBL    
  70.   
  71. #endif
  72.