home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / MacPerl 5.1.3 / Mac_Perl_513_src / MacPerl5 / MPEditions.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-17  |  3.0 KB  |  120 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. #ifdef EVIL_USELESS_EDITIONS
  29. #include <Editions.h>
  30. #endif
  31. #include <Printing.h>
  32.  
  33. #ifndef __MPEDITIONS__
  34. #define __MPEDITIONS__
  35.  
  36. #include "MPGlobals.h"
  37. #include "MPUtils.h"
  38.  
  39. #ifdef EVIL_USELESS_EDITIONS
  40. pascal void AddSection(SectHandle newSection, DPtr aDocument);
  41.  
  42. pascal void CreateSection(SectionHandle   EMSection,
  43.                                                   short           sectionID,
  44.                                                   short           theStart,
  45.                                                   short           theEnd,
  46.                                                   DPtr            aDocument,
  47.                                                   RgnHandle       theBorder);
  48.  
  49. pascal void DeleteASection(SectHandle sectToDelete, DPtr theDoc);
  50.  
  51. pascal void AssocAllSections(DPtr theDoc);
  52.  
  53. /*routines for writing out and reading in section resources*/
  54. /*rAliasType and rSectionType resources*/
  55.  
  56. pascal void ReadAllSectionResources(DPtr  aDoc);
  57.  
  58. pascal void ReadSectionRecords(DPtr  aDoc);
  59.  
  60. pascal void ReadASection(SectHandle  aSectHandle);
  61.  
  62. pascal void SaveASection(SectHandle aSection, short count);
  63.  
  64. pascal void SaveSections(DPtr aDocument);
  65.  
  66. /*routines for writing out editions*/
  67.  
  68. pascal void ReadAnEdition(SectionHandle mySectHdl);
  69.  
  70. pascal void WriteAllEditions(DPtr aDocument);
  71.  
  72. pascal void WriteAnEdition(SectionHandle mySectHdl);
  73.  
  74. /*routines for handling the section borders*/
  75.  
  76. pascal SectHandle GetSection(short theStartPos, short theEndPos, DPtr aDoc);
  77.  
  78. pascal void RecalcBorders(DPtr aDoc, Boolean invalidate);
  79.  
  80. pascal void SetSelectionRgn(TEHandle  theTEHandle,
  81.                             short     posStart,
  82.                                                         short     posEnd,
  83.                                                         RgnHandle    *theSelRgn);
  84.  
  85. pascal void ShowSectionBorders(DPtr aDoc);
  86.  
  87. pascal void DoTEPasteSectionRecalc(DPtr theDoc);
  88.  
  89. pascal void DoTEDeleteSectionRecalc(DPtr theDoc);
  90.  
  91. pascal void DoTECutSectionRecalc(DPtr theDoc);
  92.  
  93. pascal void DoTEKeySectionRecalc(DPtr theDoc, char theChar);
  94.  
  95. /*utility routines*/
  96.  
  97. pascal SectHandle GetERefCon(SectionHandle EMSection);
  98.  
  99. pascal void SetERefCon(SectionHandle  EMSection, SectHandle aSectHandle);
  100.  
  101. pascal void DeRegisterAllSections(DPtr aDoc);
  102. #endif
  103.  
  104. pascal Handle GetHandleToText(TEHandle aTEHandle, short theStart, short theEnd);
  105.  
  106. #ifdef EVIL_USELESS_EDITIONS
  107. /*now the routines for dealing with the user interface issues*/
  108.  
  109. pascal void DoSectionOptions(DPtr theDoc);
  110.  
  111. pascal void DoSubscribe(DPtr theDoc);
  112.  
  113. pascal OSErr GetEditionContainer(DPtr theDoc, FSSpec *theFSSpec);
  114.  
  115. pascal OSErr PublishText(DPtr theDoc, FSSpec *theFSSpec);
  116. #endif
  117.  
  118. pascal Boolean KeyOKinSubscriber(char whatKey);
  119.  
  120. #endif