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 / MPUtils.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-27  |  2.6 KB  |  110 lines  |  [TEXT/MPS ]

  1. /*********************************************************************
  2. Project    :    MacPerl            -    Real Perl Application
  3. File        :    MPUtils.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: MPUtils.h,v $
  12. Revision 1.1  1994/02/27  23:04:38  neeri
  13. Initial revision
  14.  
  15. Revision 0.4  1993/09/28  00:00:00  neeri
  16. PlotResMiniIcon
  17.  
  18. Revision 0.3  1993/08/17  00:00:00  neeri
  19. DoPrefsDialog
  20.  
  21. Revision 0.2  1993/08/14  00:00:00  neeri
  22. OpenPreferences
  23.  
  24. Revision 0.1  1993/05/29  00:00:00  neeri
  25. Compiles correctly
  26.  
  27. *********************************************************************/
  28.  
  29. #ifndef __MPUTILS__
  30. #define __MPUTILS__
  31.  
  32. #include <Types.h>
  33. #include <QuickDraw.h>
  34. #include <Packages.h>
  35. #include <GestaltEqu.h>
  36. #include <Editions.h>
  37. #include <Printing.h>
  38.  
  39. #ifndef __MPGLOBALS__
  40. #include "MPGlobals.h"
  41. #endif
  42.  
  43. pascal Boolean CheckEnvironment();
  44.  
  45. pascal void ShowError(Str255 theError,
  46.                       long   theErrorCode);
  47.  
  48. pascal Boolean FeatureIsImplemented(OSType theFeature,
  49.                                     short  theTestBit);
  50.  
  51. pascal void GetTempFileName(DPtr   aDoc,
  52.                             Str255 newString);
  53.  
  54. pascal Boolean Ours(WindowPtr aWindow);
  55.  
  56. pascal void SetShortMenus();
  57.  
  58. pascal void SetLongMenus();
  59.  
  60. pascal void SetEditMenu(DPtr theDoc);
  61.  
  62. pascal void AdornDefaultButton(DialogPtr theDialog, short theItem);
  63.  
  64. pascal void DrawDefaultOutline(DialogPtr theDialog, short theItem);
  65.  
  66. pascal void Separator(DialogPtr dlg, short item);
  67.  
  68. pascal void RetrieveText(DialogPtr aDialog,
  69.                                                short     anItem,
  70.                                                Str255    aString);
  71.  
  72. pascal void SetText( DialogPtr aDialog,
  73.                                          short     itemNo,
  74.                                          Str255    theString);
  75.  
  76. pascal void GetRectOfDialogItem(DialogPtr theDialog, short theItem, Rect *theRect);
  77.  
  78. #define LesserOf(A,B)    ((A<B) ? A : B)
  79. #define GreaterOf(A,B)    ((A>B) ? A : B)
  80.  
  81. pascal Boolean DoPageSetup(DPtr theDoc);
  82.  
  83. pascal Boolean CtrlKeyPressed(const EventRecord *theEvent);
  84.  
  85. pascal Boolean OptionKeyPressed(const EventRecord *theEvent);
  86.  
  87. pascal void DoAbout();
  88.  
  89. pascal void RegisterDocument(DPtr doc);
  90.  
  91. pascal void UnregisterDocument(DPtr doc);
  92.  
  93. pascal void SetupWindowMenu();
  94.  
  95. pascal void DoSelectWindow(short item);
  96.  
  97. #ifdef RUNTIME
  98. typedef enum {iconPlain, iconGray, iconHilited} IconMode;
  99.  
  100. pascal void PlotResMiniIcon(short id, Rect * within);
  101. pascal void PlotResICN_(short id, Rect * within, IconMode mode);
  102. pascal void Append_DITL(DialogPtr dialog, short item_list_ID);
  103. pascal void Shorten_DITL(DialogPtr dialog, short shorten);
  104. pascal short Count_DITL(DialogPtr dialog);
  105. #endif
  106.  
  107. pascal Boolean WeirdChar(const EventRecord * ev, short modifiers, char ch);
  108.  
  109. #endif
  110.