home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Apple Shared Library Manager / ASLM Examples / Sample Apps / CPlusSample / Sources / SampleLibrary.r < prev   
Encoding:
Text File  |  1996-11-19  |  1.4 KB  |  57 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        SampleLibrary.r
  3.  
  4.     Contains:    Resources for Shared Library "CPlusSampleLibrary"
  5.  
  6.     Copyright:    © 1993 by Apple Computer, Inc., all rights reserved.
  7.  
  8. */
  9.  
  10.  
  11. INCLUDE "SampleLibrary.RSRC";    /* the library's 'libr', 'libi', and 'code' resources */
  12.  
  13. #include "SysTypes.r"
  14. #include "Types.r"
  15. #include "VersionResource.r"
  16.  
  17. #define    rWindow        128            /* application's window */
  18. #define rStopRect    128            /* rectangle for Stop light */
  19. #define rGoRect        129            /* rectangle for Go light */
  20.  
  21. #define NoItems        0x00000000    /* used for disabling all menu items */
  22.  
  23. #define    mLight        131            /* Light menu */
  24.  
  25. /* this 'RECT' resource is used to define trafficlight's red light dimention */
  26.  
  27. resource 'RECT' (rStopRect, preload, purgeable) {
  28.     {10, 10, 110, 110}
  29. };
  30.  
  31. /* the 'RECT' resource is used to define trafficlight's green light dimention */
  32.  
  33. resource 'RECT' (rGoRect, preload, purgeable) {
  34.     {120, 10, 220, 110}
  35. };
  36.  
  37. /* this menu will be added by the application or library */
  38.  
  39. resource 'MENU' (mLight, preload, locked ) {
  40.     mLight, textMenuProc,
  41.     NoItems,                /* disable everything, program does the enabling */
  42.     enabled, "Traffic",
  43.      {
  44.         "Red Light",
  45.             noicon, nokey, nomark, plain;
  46.         "Green Light",
  47.             noicon, nokey, nomark, plain
  48.     }
  49. };
  50.  
  51. /* this is our trafficlight's window resource; used by sample shared library */
  52.  
  53. resource 'WIND' (rWindow, preload, purgeable) {
  54.     {60, 40, 290, 160},
  55.     noGrowDocProc, visible, noGoAway, 0x0, "Traffic"
  56. };
  57.