home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / M / MacPerl 4.13 source.sit / Perl Source ƒ / MacPerl / MPEditions.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-27  |  3.0 KB  |  118 lines  |  [TEXT/MPS ]

  1. /*********************************************************************
  2. Project    :    MacPerl            -    Real Perl Application
  3. File        :    MPEditions.h    -
  4. Author    :    Matthias Neeracher
  5.  
  6. A lot of this code is borrowed from 7Edit written by
  7. Apple Developer Support UK
  8.  
  9. Language    :    MPW C
  10.  
  11. $Log: MPEditions.h,v $
  12. Revision 1.1  1994/02/27  23:03:07  neeri
  13. Initial revision
  14.  
  15. Revision 0.2  1993/09/16  00:00:00  neeri
  16. Runtime doesn't support Editions
  17.  
  18. Revision 0.1  1993/05/29  00:00:00  neeri
  19. Compiles correctly
  20.  
  21. *********************************************************************/
  22.  
  23. #include <Types.h>
  24. #include <QuickDraw.h>
  25. #include <Files.h>
  26. #include <Packages.h>
  27. #include <GestaltEqu.h>
  28. #include <Editions.h>
  29. #include <Printing.h>
  30.  
  31. #ifndef __MPEDITIONS__
  32. #define __MPEDITIONS__
  33.  
  34. #ifndef RUNTIME
  35.  
  36. #include "MPGlobals.h"
  37. #include "MPUtils.h"
  38.  
  39. pascal void AddSection(SectHandle newSection, DPtr aDocument);
  40.  
  41. pascal void CreateSection(SectionHandle   EMSection,
  42.                                                   short           sectionID,
  43.                                                   short           theStart,
  44.                                                   short           theEnd,
  45.                                                   DPtr            aDocument,
  46.                                                   RgnHandle       theBorder);
  47.  
  48. pascal void DeleteASection(SectHandle sectToDelete, DPtr theDoc);
  49.  
  50. pascal void AssocAllSections(DPtr theDoc);
  51.  
  52. /*routines for writing out and reading in section resources*/
  53. /*rAliasType and rSectionType resources*/
  54.  
  55. pascal void ReadAllSectionResources(DPtr  aDoc);
  56.  
  57. pascal void ReadSectionRecords(DPtr  aDoc);
  58.  
  59. pascal void ReadASection(SectHandle  aSectHandle);
  60.  
  61. pascal void SaveASection(SectHandle aSection, short count);
  62.  
  63. pascal void SaveSections(DPtr aDocument);
  64.  
  65. /*routines for writing out editions*/
  66.  
  67. pascal void ReadAnEdition(SectionHandle mySectHdl);
  68.  
  69. pascal void WriteAllEditions(DPtr aDocument);
  70.  
  71. pascal void WriteAnEdition(SectionHandle mySectHdl);
  72.  
  73. /*routines for handling the section borders*/
  74.  
  75. pascal SectHandle GetSection(short theStartPos, short theEndPos, DPtr aDoc);
  76.  
  77. pascal void RecalcBorders(DPtr aDoc, Boolean invalidate);
  78.  
  79. pascal void SetSelectionRgn(TEHandle  theTEHandle,
  80.                             short     posStart,
  81.                                                         short     posEnd,
  82.                                                         RgnHandle    *theSelRgn);
  83.  
  84. pascal void ShowSectionBorders(DPtr aDoc);
  85.  
  86. pascal void DoTEPasteSectionRecalc(DPtr theDoc);
  87.  
  88. pascal void DoTEDeleteSectionRecalc(DPtr theDoc);
  89.  
  90. pascal void DoTECutSectionRecalc(DPtr theDoc);
  91.  
  92. pascal void DoTEKeySectionRecalc(DPtr theDoc, char theChar);
  93.  
  94. /*utility routines*/
  95.  
  96. pascal SectHandle GetERefCon(SectionHandle EMSection);
  97.  
  98. pascal void SetERefCon(SectionHandle  EMSection, SectHandle aSectHandle);
  99.  
  100. pascal void DeRegisterAllSections(DPtr aDoc);
  101.  
  102. pascal Handle GetHandleToText(TEHandle aTEHandle, short theStart, short theEnd);
  103.  
  104. /*now the routines for dealing with the user interface issues*/
  105.  
  106. pascal void DoSectionOptions(DPtr theDoc);
  107.  
  108. pascal void DoSubscribe(DPtr theDoc);
  109.  
  110. pascal OSErr GetEditionContainer(DPtr theDoc, FSSpec *theFSSpec);
  111.  
  112. pascal OSErr PublishText(DPtr theDoc, FSSpec *theFSSpec);
  113.  
  114. #endif
  115.  
  116. pascal Boolean KeyOKinSubscriber(char whatKey);
  117.  
  118. #endif