home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 August: Tool Chest / Apple_Developer_Group_August_1996_Tool_Chest.iso / Sample Code / Snippets / Toolbox / AddResMenu7.1 / AddResMenu7.1.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-11  |  2.2 KB  |  75 lines  |  [TEXT/MPS ]

  1.  
  2. #include <Types.h>
  3. #include <memory.h>
  4. #include <Packages.h>
  5. #include <Errors.h>
  6. #include <quickdraw.h>
  7. #include <fonts.h>
  8. #include <dialogs.h>
  9. #include <windows.h>
  10. #include <menus.h>
  11. #include <events.h>
  12. #include <OSEvents.h>
  13. #include <Desk.h>
  14. #include <diskinit.h>
  15. #include <OSUtils.h>
  16. #include <resources.h>
  17. #include <toolutils.h>
  18. #include <AppleEvents.h>
  19. #include <EPPC.h>
  20. #include <GestaltEqu.h>
  21. #include <PPCToolbox.h> 
  22. #include <Processes.h>
  23. #include <Balloons.h>
  24. #include <Aliases.h>
  25. #include <Scrap.h>
  26.  
  27. /* windowControl is the structure attached to every window I create (in the refCon */
  28. /* field) that contains all the information I need to know about the window. */
  29. /* data, procedure pointers for controlling, and anything else gets put in this */
  30. /* struct.  That makes my windows autonomous */
  31. struct windowControl {
  32.     unsigned long windowID;                                 /* master ID number  */
  33.     ProcPtr drawMe;                                         /* content drawing procedure pointer */
  34.     ProcPtr clickMe;                                        /* content click routine */
  35.     ProcPtr closeMe;                                        /* document close procedure pointer */
  36.     ProcPtr sizeMe;                                            /* size procedure */
  37.     AliasHandle fileAliasHandle;                            /* alias for this document */
  38.     Boolean windowDirty;
  39.     Handle generalData;                                        /* cast to whatever you need as you need it */
  40. };
  41. typedef struct windowControl windowControl, *windowCPtr, **windowCHandle;
  42.  
  43. enum {kDocWindowResID = 128,kMyDocumentWindow = 1000};
  44. /* menu enums */
  45. enum {kMBarID = 128};
  46. enum {kAppleMenu = 128,kFileMenu,kEditMenu,kToolsMenu};
  47.  
  48. /* file menu enums */
  49. enum {kNewItem = 1,kOpenItem,kCloseItem,kSaveItem,kSaveAsItem,kFileBlank1,kPageSetupItem,kPrintItem,kFileBlank2,kQuitItem};
  50.  
  51. /* general purpose enums */
  52. enum {kResumeMask=1,kSampHelp=129,kAboutBox=128,kHelpString=128,kBadSystem=130,kNoneOfThatType=132};
  53. enum {kResTypeDialog = 131,kResTypeEditLine=4};
  54. enum {kTestMenuChooseType = 1,kTestMenuDivider};
  55.  
  56. enum {kMinHeight = 200};
  57. enum {kGenStrings = 128,kUnnamedString=1};
  58.  
  59. enum  {
  60.     kEnterKey = 0x03, 
  61.     kTabKey = 9, 
  62.     kReturnKey = 0x0D, 
  63.     kBackSpace = 8, 
  64.     kEscKey = 0x1B, 
  65.     kLeftArrow = 0x1C, 
  66.     kRightArrow, 
  67.     kUpArrow,
  68.     kDownArrow, 
  69.     kDeleteKey = 0x7F
  70. };
  71.  
  72.  
  73.  
  74.  
  75.