home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Documentation / develop / develop Issue 7 / develop 7 code / QuickTime / SimpleInMovies / SimpleInMovies.r < prev    next >
Encoding:
Text File  |  1992-10-15  |  11.7 KB  |  660 lines  |  [TEXT/MPS ]

  1. /*------------------------------------------------------------------------------
  2.  
  3.       Sample.r    -  Resources for SimpleInMovies
  4.  
  5.       Copyright Apple Computer, Inc. 1985-1991
  6.       All rights reserved.
  7.  
  8. ------------------------------------------------------------------------------*/
  9. /* Here we use new system 7 features in the creation of windows */
  10. #ifndef SystemSevenOrLater
  11. #define SystemSevenOrLater 1
  12. #endif
  13. #include "Types.r"
  14. #include "SysTypes.r"
  15.  
  16. /* These define's are used in the MENU resources to disable specific
  17.    menu items. */
  18. #define AllItems    0b1111111111111111111111111111111    /* 31 flags */
  19. #define MenuItem1    0b00001
  20. #define MenuItem2    0b00010
  21. #define MenuItem3    0b00100
  22. #define MenuItem4    0b01000
  23. #define MenuItem5    0b10000
  24. #define MenuItem6    0b100000
  25. #define MenuItem7    0b1000000
  26. #define MenuItem8    0b10000000
  27. #define MenuItem9    0b100000000
  28.  
  29. type 'desa' as 'STR ';
  30. #define    rUserAlert            129        /* error user alert */
  31. #define    rLandscapeAlert        130        /* landscape orientation set user alert */
  32. #define    r32BitQDAlert       131     /* 32-bit QD required alert */
  33. #define    rNOPrGeneralAlert   132     /* the NOPrGeneral alert */
  34.  
  35.  
  36. resource 'SIZE' (-1, purgeable) {
  37.     saveScreen,
  38.     acceptSuspendResumeEvents,
  39.     disableOptionSwitch,
  40.     canBackground,
  41.     multiFinderAware,
  42.     backgroundAndForeground,
  43.     dontGetFrontClicks,
  44.     ignoreChildDiedEvents,
  45.     not32BitCompatible,
  46.     isHighLevelEventAware,
  47.     localAndRemoteHLEvents,
  48.     notStationeryAware,
  49.     dontUseTextEditServices,
  50.     reserved,
  51.     reserved,
  52.     reserved,
  53.     1048576,
  54.     1048576
  55. };
  56.  
  57. resource 'vers' (1) {
  58.     0x01, 0x00, release, 0x00,
  59.     verUs,
  60.     "0.00",
  61.     "0.00, Copyright © 1991 Apple Computer, Inc."
  62. };
  63.  
  64. resource 'desa' (0, purgeable) {
  65.     "Sample Moovie Playing App by Macintosh Developer Technical Support"
  66. };
  67.  
  68. resource 'BNDL' (128, purgeable) {
  69.     'desa',
  70.     0,
  71.     {
  72.     'ICN#', {0, 128},
  73.     'FREF', {0, 128}
  74.     }
  75. };
  76.  
  77. resource 'FREF' (128, purgeable) {
  78.     'APPL',
  79.     0,
  80.     ""
  81. };
  82.  
  83.  
  84.  
  85. resource 'ICN#' (128, purgeable) {
  86.     {    /* array: 2 elements */
  87.         /* [1] */
  88.         $"0000 0000 07FF FFE0 0800 0010 09FF FF90"
  89.         $"0A00 0050 0A00 0050 0AF3 E750 0A88 8850"
  90.         $"0A88 8850 0A88 8650 0A88 8150 0A88 8150"
  91.         $"0AF0 8E50 0A00 0050 0A00 0050 0A00 0050"
  92.         $"09FF FF90 0800 0010 0FFF FFF0 0800 0010"
  93.         $"0800 0010 0800 0010 0800 7F10 0800 0010"
  94.         $"0800 0010 0800 0010 0800 0010 07FF FFE0"
  95.         $"0400 0020 0400 0020 0400 0020 07FF FFE0",
  96.         /* [2] */
  97.         $"0000 0000 07FF FFE0 0FFF FFF0 0FFF FFF0"
  98.         $"0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0"
  99.         $"0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0"
  100.         $"0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0"
  101.         $"0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0"
  102.         $"0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0"
  103.         $"0FFF FFF0 0FFF FFF0 0FFF FFF0 07FF FFE0"
  104.         $"07FF FFE0 07FF FFE0 07FF FFE0 07FF FFE0"
  105.     }
  106. };
  107.  
  108. /* Here we use new system 7 features in the creation of windows */
  109. resource 'WIND' (128, "Sample Window") {
  110.     {40, 0, 240, 200},
  111.     noGrowDocProc,
  112.     invisible,
  113.     goAway,
  114.     0x0,
  115.     "Sample Window",
  116.     staggerParentWindowScreen,
  117. };
  118.  
  119. resource 'DLOG' (128, "About Sample…") {
  120.     {66, 102, 224, 600}, /* normal 400 */
  121.     dBoxProc, visible, noGoAway, 0x0, 128, "",centerParentWindowScreen
  122. };
  123.  
  124. resource 'DITL' (128) {
  125.     {    /* array DITLarray: 9 elements */
  126.         /* [1] */
  127.         {130, 205, 150, 284},
  128.         Button {
  129.             enabled,
  130.             "Continue"
  131.         },
  132.         /* [2] */
  133.         {104, 144, 118, 320},
  134.         StaticText {
  135.             disabled,
  136.             ""
  137.         },
  138.         /* [3] */
  139.         {88, 144, 105, 238},
  140.         StaticText {
  141.             disabled,
  142.             ""
  143.         },
  144.         /* [4] */
  145.         {8, 32, 26, 273},
  146.         StaticText {
  147.             disabled,
  148.             "Macintosh Programmer's Workshop"
  149.         },
  150.         /* [5] */
  151.         {32, 50, 49, 283},
  152.         StaticText {
  153.             disabled,
  154.             "Sample Movie Loading Application"
  155.         },
  156.         /* [6] */
  157.         {56, 16, 76, 317},
  158.         StaticText {
  159.             enabled,
  160.             "Copyright © 1985-1991 Apple Computer, In"
  161.             "c."
  162.         },
  163.         /* [7] */
  164.         {88, 16, 104, 144},
  165.         StaticText {
  166.             enabled,
  167.             "Source Language:"
  168.         },
  169.         /* [8] */
  170.         {104, 16, 120, 144},
  171.         StaticText {
  172.             enabled,
  173.             "by:"
  174.         },
  175.         /* [9] */
  176.         {5, 334, 155, 484},
  177.         UserItem {
  178.             enabled
  179.         }
  180.     }
  181. };
  182.  
  183. resource 'DLOG' (130) {
  184.     {40, 40, 240, 280},
  185.     altDBoxProc,
  186.     visible,
  187.     goAway,
  188.     0x0,
  189.     131,
  190.     "",
  191.     centerParentWindowScreen
  192. };
  193.  
  194. resource 'DITL' (131) {
  195.     {    /* array DITLarray: 3 elements */
  196.         /* [1] */
  197.         {170, 138, 190, 196},
  198.         Button {
  199.             enabled,
  200.             "OK"
  201.         },
  202.         /* [2] */
  203.         {170, 33, 190, 91},
  204.         Button {
  205.             enabled,
  206.             "No Way!"
  207.         },
  208.         /* [3] */
  209.         {14, 46, 154, 186},
  210.         UserItem {
  211.             enabled
  212.         },
  213.         /* [4] */ {0, 4, 15, 392},
  214.         staticText {
  215.             disabled,
  216.             "Set this frame as movie poster?"
  217.         }
  218.     }
  219. };
  220.  
  221. resource 'DLOG' (250, purgeable) {
  222.     {40, 20, 144, 400},
  223.     dBoxProc,
  224.     visible,
  225.     noGoAway,
  226.     0x0,
  227.     250,
  228.     "",
  229.     noAutoCenter
  230. };
  231. resource 'DITL' (250, purgeable) {
  232.     {
  233.         {71, 315, 91, 367},        Button { enabled, "Save" },
  234.         {0, -1000, 20, 2},        StaticText { disabled, "=S190001,=s190001,=D190003,=d190003,=.190104,1B190004" },
  235.         {71, 80, 91, 162},        Button { enabled, "Don’t Save" },
  236.         {71, 244, 91, 302},        Button { enabled, "Cancel" },
  237.         {11, 78, 61, 366},        StaticText { disabled, "Save changes to the movie “^0” before ^1?" },
  238.         {11, 23, 43, 55},        Icon { disabled, 2 },
  239.     }
  240. };
  241.  
  242.  
  243. resource 'DLOG' (300, purgeable) {
  244.     {0, 0, 216, 350},
  245.     dBoxProc,
  246.     invisible,
  247.     noGoAway,
  248.     0x0,
  249.     300,
  250.     "",
  251.     noAutoCenter
  252. };
  253.  
  254. resource 'DITL' (300, purgeable) {
  255.     {    /* array DITLarray: 13 elements */
  256.         /* [1] */
  257.         {161, 252, 181, 332},
  258.         Button {
  259.             enabled,
  260.             "Save"
  261.         },
  262.         /* [2] */
  263.         {130, 252, 150, 332},
  264.         Button {
  265.             enabled,
  266.             "Cancel"
  267.         },
  268.         /* [3] */
  269.         {0, 0, 0, 0},
  270.         HelpItem {
  271.             disabled,
  272.             HMScanhdlg {
  273.                 -6043
  274.             }
  275.         },
  276.         /* [4] */
  277.         {8, 235, 24, 337},
  278.         UserItem {
  279.             enabled
  280.         },
  281.         /* [5] */
  282.         {32, 252, 52, 332},
  283.         Button {
  284.             enabled,
  285.             "Eject"
  286.         },
  287.         /* [6] */
  288.         {60, 252, 80, 332},
  289.         Button {
  290.             enabled,
  291.             "Desktop"
  292.         },
  293.         /* [7] */
  294.         {29, 12, 127, 230},
  295.         UserItem {
  296.             enabled
  297.         },
  298.         /* [8] */
  299.         {6, 12, 25, 230},
  300.         UserItem {
  301.             enabled
  302.         },
  303.         /* [9] */
  304.         {119, 250, 120, 334},
  305.         Picture {
  306.             disabled,
  307.             11
  308.         },
  309.         /* [10] */
  310.         {157, 15, 173, 227},
  311.         EditText {
  312.             enabled,
  313.             ""
  314.         },
  315.         /* [11] */
  316.         {136, 15, 152, 227},
  317.         StaticText {
  318.             disabled,
  319.             "Save as:"
  320.         },
  321.         /* [12] */
  322.         {88, 252, 108, 332},
  323.         UserItem {
  324.             disabled
  325.         },
  326.         /* [13] */
  327.         {188, 13, 206, 128},
  328.         CheckBox {
  329.             enabled,
  330.             "Flatten Movie"
  331.         }
  332.     }
  333. };
  334.  
  335. data 'DLOG' (450) {
  336.     $"0028 0028 00F0 0118 0001 0100 0100 0000"            /* .(.(............ */
  337.     $"0000 01C2 00"                                       /* ...Ä. */
  338. };
  339.  
  340. resource 'DITL' (450) {
  341.     {    /* array DITLarray: 4 elements */
  342.         /* [1] */
  343.         {28, 44, 43, 192},
  344.         StaticText {
  345.             disabled,
  346.             "Flattening in progress"
  347.         },
  348.         /* [2] */
  349.         {73, 80, 92, 116},
  350.         StaticText {
  351.             enabled,
  352.             "^0"
  353.         },
  354.         /* [3] */
  355.         {130, 89, 150, 147},
  356.         Button {
  357.             enabled,
  358.             "Cancel"
  359.         },
  360.         /* [4] */
  361.         {74, 124, 90, 199},
  362.         StaticText {
  363.             disabled,
  364.             "% Done"
  365.         }
  366.     }
  367. };
  368.  
  369. resource 'MENU' (128, "Apple", preload) {
  370.     128, textMenuProc,
  371.     AllItems & ~MenuItem2,    /* Disable item #2 */
  372.     enabled, apple,
  373.     {
  374.         "About Sample…",
  375.             noicon, nokey, nomark, plain;
  376.         "-",
  377.             noicon, nokey, nomark, plain
  378.     }
  379. };
  380.  
  381. resource 'MENU' (129, "File", preload) {
  382.     129, textMenuProc,
  383.     AllItems & ~MenuItem3 & ~MenuItem4,
  384.     enabled, "File",
  385.     {
  386.         "New Movie",
  387.             noicon, "N", nomark, plain;
  388.         "Open Movie",
  389.             noicon, "O", nomark, plain;
  390.         "Close",
  391.             noicon, "W", nomark,plain;
  392.         "-",
  393.             noicon, nokey, nomark, plain;
  394.         "Save",
  395.             noicon, "S", nomark,plain;
  396.         "Save As …",
  397.             noicon, nokey, nomark,plain;
  398.         "-",
  399.             noicon, nokey, nomark, plain;
  400.         "Print",
  401.             noicon, "P", nomark, plain;
  402.         "Page Setup...",
  403.             noicon, nokey, nomark, plain;
  404.         "-",
  405.             noicon, nokey, nomark, plain;
  406.         "Quit",
  407.             noicon, "Q", nomark, plain
  408.     }
  409. };
  410.  
  411. resource 'MENU' (130, "Edit", preload) {
  412.     130, textMenuProc,
  413.     AllItems & ~( MenuItem2),    /* Disable item #2 */
  414.     enabled, "Edit",
  415.      {
  416.         "Undo",
  417.             noicon, "Z", nomark, plain;
  418.         "-",
  419.             noicon, nokey, nomark, plain;
  420.         "Cut",
  421.             noicon, "X", nomark, plain;
  422.         "Copy",
  423.             noicon, "C", nomark, plain;
  424.         "Paste",
  425.             noicon, "V", nomark, plain;
  426.         "Clear",
  427.             noicon, nokey, nomark, plain;
  428.         "Select All",
  429.             noicon, "A", nomark, plain
  430.     }
  431. };
  432.  
  433. resource 'MENU' (131, "Stuff", preload) {
  434.     131, textMenuProc,
  435.     allEnabled,
  436.     enabled, "Movie Stuff",
  437.     {
  438.         "Stop Movie",
  439.             noicon, "P", nomark, plain;
  440.         "Sound Off",
  441.             noicon, nokey, nomark, plain;
  442.         "Next Frame",
  443.             noicon, "F", nomark, plain;
  444.         "Prev Frame",
  445.             noicon, "B", nomark, plain;
  446.         "Loop the Loop",
  447.             noicon, nokey, nomark, plain;
  448.         "Palindrome",
  449.             noicon, nokey, nomark, plain;
  450.         "Enable Edits",
  451.             noicon, "E", nomark,plain;
  452.     }
  453. };
  454.  
  455. resource 'MENU' (132, "More Stuff", preload) {
  456.     132, textMenuProc,
  457.     allEnabled,
  458.     enabled, "and ...",
  459.     {
  460.         "GetTrack/Movie Picts",
  461.             noicon, nokey, nomark, plain;
  462.         "Set Movie Poster",
  463.             noicon, nokey, nomark, plain;
  464.     }
  465. };
  466.  
  467.  
  468. resource 'DITL' (429, purgeable) {
  469.     {    /* array DITLarray: 2 elements */
  470.         /* [1] */
  471.         {78, 173, 98, 243},
  472.         Button {
  473.             enabled,
  474.             "Away!"
  475.         },
  476.         /* [2] */
  477.         {31, 74, 68, 257},
  478.         StaticText {
  479.             disabled,
  480.             "The Movie Toolbox or the Controller"
  481.             "Component failed to initialize."
  482.         }
  483.     }
  484. };
  485.  
  486. resource 'ALRT' (429, purgeable) {
  487.     {50, 30, 165, 290},
  488.     429,
  489.     {    /* array: 4 elements */
  490.         /* [1] */
  491.         OK, visible, sound3,
  492.         /* [2] */
  493.         OK, visible, sound1,
  494.         /* [3] */
  495.         OK, visible, sound2,
  496.         /* [4] */
  497.         OK, visible, sound3,
  498.     },
  499.         centerParentWindowScreen,
  500. };
  501.  
  502. resource 'STR#' (366, purgeable) {
  503.     {
  504.         "Save File As:",
  505.         "Untitled #",
  506.         "closing",
  507.         "quitting"
  508.     }
  509. };
  510.  
  511. resource 'DITL' (430, purgeable) {
  512.     {    /* array DITLarray: 2 elements */
  513.         /* [1] */
  514.         {78, 173, 98, 343},
  515.         Button {
  516.             enabled,
  517.             "Hasta la vista, Baby!"
  518.         },
  519.         /* [2] */
  520.         {31, 74, 68, 257},
  521.         StaticText {
  522.             disabled,
  523.             "I know Miss Manners wouldn't approve it"
  524.             "but we only run under system 7."
  525.         }
  526.     }
  527. };
  528.  
  529. resource 'ALRT' (430, purgeable) {
  530.     {50, 30, 165, 290},
  531.     430,
  532.     {    /* array: 4 elements */
  533.         /* [1] */
  534.         OK, visible, sound3,
  535.         /* [2] */
  536.         OK, visible, sound1,
  537.         /* [3] */
  538.         OK, visible, sound2,
  539.         /* [4] */
  540.         OK, visible, sound3,
  541.     },
  542.         centerParentWindowScreen,
  543. };
  544.  
  545.  
  546. /* this ALRT and DITL are used as an error screen */
  547.  
  548. resource 'ALRT' (rUserAlert, purgeable) {
  549.     {40, 20, 126, 326},
  550.     rUserAlert,
  551.     { /* array: 4 elements */
  552.         /* [1] */
  553.         OK, visible, silent,
  554.         /* [2] */
  555.         OK, visible, silent,
  556.         /* [3] */
  557.         OK, visible, silent,
  558.         /* [4] */
  559.         OK, visible, silent
  560.     },
  561.         centerParentWindowScreen,
  562. };
  563.  
  564.  
  565. resource 'DITL' (rUserAlert, purgeable) {
  566.     { /* array DITLarray: 3 elements */
  567.         /* [1] */
  568.         {51, 209, 70, 290},
  569.         Button {
  570.             enabled,
  571.             "OK"
  572.         },
  573.         /* [2] */
  574.         {10, 60, 30, 300},
  575.         StaticText {
  576.             disabled,
  577.             "Error occurred"
  578.         },
  579.         /* [3] */
  580.         {8, 8, 40, 40},
  581.         Icon {
  582.             disabled,
  583.             2
  584.         }
  585.     }
  586. };
  587.  
  588.  
  589. /* this ALRT and DITL are used to tell the user that PrGeneral is not available,   */
  590. /* but, you will still be able to print with the current printer...                */
  591.  
  592. resource 'ALRT' (rNOPrGeneralAlert, purgeable) {
  593.     {40, 20, 155, 470},
  594.     rNOPrGeneralAlert,
  595.     { /* array: 4 elements */
  596.         /* [1] */
  597.         OK, visible, silent,
  598.         /* [2] */
  599.         OK, visible, silent,
  600.         /* [3] */
  601.         OK, visible, silent,
  602.         /* [4] */
  603.         OK, visible, silent
  604.     },
  605.         centerParentWindowScreen,
  606. };
  607.  
  608. resource 'DITL' (rNOPrGeneralAlert, purgeable) {
  609.     { /* array DITLarray: 3 elements */
  610.         /* [1] */
  611.         {80, 350, 100, 430},
  612.         Button {
  613.             enabled,
  614.             "OK"
  615.         },
  616.         /* [2] */
  617.         {10, 60, 65, 445},
  618.         StaticText {
  619.             disabled,
  620.             "PrGeneral is NOT available for the current printer.  You will not be able to use the features of PrGeneral, but PrGeneral Play will still print..."
  621.         },
  622.     }
  623. };
  624.  
  625. resource 'ALRT' (131, purgeable) {
  626.     {50, 30, 252, 410},
  627.     500,
  628.     {    /* array: 4 elements */
  629.         /* [1] */
  630.         OK, visible, sound3,
  631.         /* [2] */
  632.         OK, visible, sound1,
  633.         /* [3] */
  634.         OK, visible, sound2,
  635.         /* [4] */
  636.         OK, visible, sound3
  637.     },
  638.     centerParentWindowScreen
  639. };
  640.  
  641. resource 'DITL' (500) {
  642.     {    /* array DITLarray: 2 elements */
  643.         /* [1] */
  644.         {158, 156, 178, 214},
  645.         Button {
  646.             enabled,
  647.             "OK"
  648.         },
  649.         /* [2] */
  650.         {65, 55, 133, 325},
  651.         StaticText {
  652.             disabled,
  653.             "The poster picture for the movie  “^0” c"
  654.             "ould not be created. You may set the pos"
  655.             "ter in the “And ...” menu and try again."
  656.         }
  657.     }
  658. };
  659.  
  660.