home *** CD-ROM | disk | FTP | other *** search
- /*********************************************************************
- Project : MacPerl - Real Perl Application
- File : MPUtils.h -
- Author : Matthias Neeracher
-
- A lot of this code is borrowed from 7Edit written by
- Apple Developer Support UK
-
- Language : MPW C
-
- $Log: MPUtils.h,v $
- Revision 1.1 1994/02/27 23:04:38 neeri
- Initial revision
-
- Revision 0.4 1993/09/28 00:00:00 neeri
- PlotResMiniIcon
-
- Revision 0.3 1993/08/17 00:00:00 neeri
- DoPrefsDialog
-
- Revision 0.2 1993/08/14 00:00:00 neeri
- OpenPreferences
-
- Revision 0.1 1993/05/29 00:00:00 neeri
- Compiles correctly
-
- *********************************************************************/
-
- #ifndef __MPUTILS__
- #define __MPUTILS__
-
- #include <Types.h>
- #include <QuickDraw.h>
- #include <Packages.h>
- #include <GestaltEqu.h>
- #include <Editions.h>
- #include <Printing.h>
-
- #ifndef __MPGLOBALS__
- #include "MPGlobals.h"
- #endif
-
- pascal Boolean CheckEnvironment();
-
- pascal void ShowError(Str255 theError,
- long theErrorCode);
-
- pascal Boolean FeatureIsImplemented(OSType theFeature,
- short theTestBit);
-
- pascal void GetTempFileName(DPtr aDoc,
- Str255 newString);
-
- pascal Boolean Ours(WindowPtr aWindow);
-
- pascal void SetShortMenus();
-
- pascal void SetLongMenus();
-
- pascal void SetEditMenu(DPtr theDoc);
-
- pascal void AdornDefaultButton(DialogPtr theDialog, short theItem);
-
- pascal void DrawDefaultOutline(DialogPtr theDialog, short theItem);
-
- pascal void Separator(DialogPtr dlg, short item);
-
- pascal void RetrieveText(DialogPtr aDialog,
- short anItem,
- Str255 aString);
-
- pascal void SetText( DialogPtr aDialog,
- short itemNo,
- Str255 theString);
-
- pascal void GetRectOfDialogItem(DialogPtr theDialog, short theItem, Rect *theRect);
-
- #define LesserOf(A,B) ((A<B) ? A : B)
- #define GreaterOf(A,B) ((A>B) ? A : B)
-
- pascal Boolean DoPageSetup(DPtr theDoc);
-
- pascal Boolean CtrlKeyPressed(const EventRecord *theEvent);
-
- pascal Boolean OptionKeyPressed(const EventRecord *theEvent);
-
- pascal void DoAbout();
-
- pascal void RegisterDocument(DPtr doc);
-
- pascal void UnregisterDocument(DPtr doc);
-
- pascal void SetupWindowMenu();
-
- pascal void DoSelectWindow(short item);
-
- #ifdef RUNTIME
- typedef enum {iconPlain, iconGray, iconHilited} IconMode;
-
- pascal void PlotResMiniIcon(short id, Rect * within);
- pascal void PlotResICN_(short id, Rect * within, IconMode mode);
- pascal void Append_DITL(DialogPtr dialog, short item_list_ID);
- pascal void Shorten_DITL(DialogPtr dialog, short shorten);
- pascal short Count_DITL(DialogPtr dialog);
- #endif
-
- pascal Boolean WeirdChar(const EventRecord * ev, short modifiers, char ch);
-
- #endif
-