home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 May / macformat-024.iso / Shareware City / Developers / BoxMaker++ / BoxMaker++ ƒ / boxmaker constants.h next >
Encoding:
Text File  |  1995-01-20  |  1.9 KB  |  54 lines  |  [TEXT/KAHL]

  1. //
  2. // kForeSleepValue or kBackSleepValue are passed to WaitNextEvent as the numTicks
  3. // parameter. They determine how 'friendly' the dropbox is to other applications.
  4. //
  5. // kFirstSleepInterval, kForeSleepInterval and kBackSleepInterval are used during
  6. // directory traversal (i.e. during the handling of ODOC events)
  7. // They are the minimum intervals (in ticks) between successive calls of
  8. // WaitNextEvent during such a traversal.
  9. // kFirstSleepInterval determines the number of ticks to wait before the first
  10. // call of WaitNextEvent during a directory traversal. The idea here is to never
  11. // call WaitNextEvent during 'short' traversals to obtain maximum speed, and to call
  12. // it every now and then during 'longer' traversals for added user-friendliness.
  13. //
  14. // We have two values for both of these parameters, one to use when we are the
  15. // foreground process, one to use when we are not the foreground process.
  16. //
  17. // If no directory traversal is in progress WaitNextEvent is simply called as
  18. // often as possible in an attempt to give as much time to other apps as is
  19. // possible.
  20. //
  21. // Note: if your 'OpenDoc' member function takes a long time to process individual
  22. // files it probably is a good idea to call 'TimeForTea' every now and then
  23. // during the processing. See 'boxmaker.h' for details.
  24. //
  25. #define kForeSleepValue        10
  26. #define kBackSleepValue        60
  27.  
  28. #define kFirstSleepInterval    60
  29. #define kForeSleepInterval    60
  30. #define kBackSleepInterval    12
  31. //
  32. // miscellaneous constants
  33. // (must be usable for both C++ and Rez sources, so no 'enums' are used)
  34. //
  35. #define kMBarID                128
  36.  
  37. #define kAppleMenuID        128
  38. #define kFileMenuID            129
  39.  
  40. #define kSelectFileItem          1
  41. #define kPrefsItem              2
  42. #define kQuitItem              4
  43.  
  44. #define kErrorAlertID        200
  45. #define kAboutAlertID        256
  46. #define kSettingsDialogID    128
  47. //
  48. // STR# resource related:
  49. //
  50. #define kErrStringID        128
  51.  
  52. #define kCantRunErr              1
  53. #define kAEVTErr              2
  54.