home *** CD-ROM | disk | FTP | other *** search
- /*********************************************************************
- Project : MacPerl - Real Perl Application
- File : MPEditions.h -
- Author : Matthias Neeracher
-
- A lot of this code is borrowed from 7Edit written by
- Apple Developer Support UK
-
- Language : MPW C
-
- $Log: MPEditions.h,v $
- Revision 1.1 1994/02/27 23:03:07 neeri
- Initial revision
-
- Revision 0.2 1993/09/16 00:00:00 neeri
- Runtime doesn't support Editions
-
- Revision 0.1 1993/05/29 00:00:00 neeri
- Compiles correctly
-
- *********************************************************************/
-
- #include <Types.h>
- #include <QuickDraw.h>
- #include <Files.h>
- #include <Packages.h>
- #include <GestaltEqu.h>
- #include <Editions.h>
- #include <Printing.h>
-
- #ifndef __MPEDITIONS__
- #define __MPEDITIONS__
-
- #ifndef RUNTIME
-
- #include "MPGlobals.h"
- #include "MPUtils.h"
-
- pascal void AddSection(SectHandle newSection, DPtr aDocument);
-
- pascal void CreateSection(SectionHandle EMSection,
- short sectionID,
- short theStart,
- short theEnd,
- DPtr aDocument,
- RgnHandle theBorder);
-
- pascal void DeleteASection(SectHandle sectToDelete, DPtr theDoc);
-
- pascal void AssocAllSections(DPtr theDoc);
-
- /*routines for writing out and reading in section resources*/
- /*rAliasType and rSectionType resources*/
-
- pascal void ReadAllSectionResources(DPtr aDoc);
-
- pascal void ReadSectionRecords(DPtr aDoc);
-
- pascal void ReadASection(SectHandle aSectHandle);
-
- pascal void SaveASection(SectHandle aSection, short count);
-
- pascal void SaveSections(DPtr aDocument);
-
- /*routines for writing out editions*/
-
- pascal void ReadAnEdition(SectionHandle mySectHdl);
-
- pascal void WriteAllEditions(DPtr aDocument);
-
- pascal void WriteAnEdition(SectionHandle mySectHdl);
-
- /*routines for handling the section borders*/
-
- pascal SectHandle GetSection(short theStartPos, short theEndPos, DPtr aDoc);
-
- pascal void RecalcBorders(DPtr aDoc, Boolean invalidate);
-
- pascal void SetSelectionRgn(TEHandle theTEHandle,
- short posStart,
- short posEnd,
- RgnHandle *theSelRgn);
-
- pascal void ShowSectionBorders(DPtr aDoc);
-
- pascal void DoTEPasteSectionRecalc(DPtr theDoc);
-
- pascal void DoTEDeleteSectionRecalc(DPtr theDoc);
-
- pascal void DoTECutSectionRecalc(DPtr theDoc);
-
- pascal void DoTEKeySectionRecalc(DPtr theDoc, char theChar);
-
- /*utility routines*/
-
- pascal SectHandle GetERefCon(SectionHandle EMSection);
-
- pascal void SetERefCon(SectionHandle EMSection, SectHandle aSectHandle);
-
- pascal void DeRegisterAllSections(DPtr aDoc);
-
- pascal Handle GetHandleToText(TEHandle aTEHandle, short theStart, short theEnd);
-
- /*now the routines for dealing with the user interface issues*/
-
- pascal void DoSectionOptions(DPtr theDoc);
-
- pascal void DoSubscribe(DPtr theDoc);
-
- pascal OSErr GetEditionContainer(DPtr theDoc, FSSpec *theFSSpec);
-
- pascal OSErr PublishText(DPtr theDoc, FSSpec *theFSSpec);
-
- #endif
-
- pascal Boolean KeyOKinSubscriber(char whatKey);
-
- #endif