home *** CD-ROM | disk | FTP | other *** search
/ Mac Expert 1995 Winter / Mac Expert - Winter 95.iso / Les fichiers / Utilitaires divers / Divers / AWOL utilities ƒ / HoW Developer’s Kit 1.1ƒ / HoWSample / HoWSample.r < prev    next >
Encoding:
Text File  |  1994-04-01  |  11.2 KB  |  558 lines  |  [TEXT/MPS ]

  1. /* HoWSample.r - resources for Help on Wheels sample application */
  2.  
  3. /* to compile: BuildProgram HoWS */
  4.  
  5. /* - - - - - - - - - - - an AWOL Software Production - - - - - - - - - - - */
  6. /* - - - - - - - - - - - - - (c) 1994 Ross Brown - - - - - - - - - - - - - */
  7. /* - - - - - - - - -  Email:  ab026@freenet.carleton.ca  - - - - - - - - - */
  8.  
  9. #define    SystemSevenOrLater    1
  10. #include    "BalloonTypes.r"
  11. #include    "Types.r"
  12. #include    "SysTypes.r"
  13.  
  14. #include    "HoWSample.r.h"
  15.  
  16. resource 'ALRT' (rAboutAlert, "About HoWSample…", purgeable) {
  17.     {0, 0, 66, 360},
  18.     rAboutAlert,
  19.     {    /* array: 4 elements */
  20.         /* [1] */
  21.         OK, visible, silent,
  22.         /* [2] */
  23.         OK, visible, silent,
  24.         /* [3] */
  25.         OK, visible, silent,
  26.         /* [4] */
  27.         OK, visible, silent
  28.     },
  29.     alertPositionMainScreen
  30. };
  31.  
  32. resource 'DITL' (rAboutAlert, "About HoWSample…", purgeable) {
  33.     {    /* array DITLarray: 3 elements */
  34.         /* [1] */
  35.         {28, 283, 48, 351},
  36.         Button {
  37.             enabled,
  38.             "OK"
  39.         },
  40.         /* [2] */
  41.         {10, 8, 58, 273},
  42.         StaticText {
  43.             disabled,
  44.             "HoWSample version 1.1\n"
  45.             "an AWOL Software Production\n"
  46.             "© 1994 Ross Brown"
  47.             /* Your application must include a copyright notice containing the following text: */
  48.             /* Help interface portion Copyright © 1994 Ross Brown. */
  49.         },
  50.         /* [3] */
  51.         {0, 0, 0, 0},
  52.         HelpItem {
  53.             disabled,
  54.             HMScanhdlg {
  55.                 rAboutAlert
  56.             }
  57.         }
  58.     }
  59. };
  60.  
  61. resource 'hdlg' (rAboutAlert, purgeable) {
  62.     HelpMgrVersion,
  63.     0,
  64.     hmDefaultOptions,
  65.     0,
  66.     0,
  67.     HMSkipItem {
  68.     },
  69.     {
  70.         HMSkipItem {
  71.         },
  72.         HMStringItem {
  73.             {0, 0},
  74.             {0, 0, 0, 0},
  75.             "",
  76.             "Use the Help menu to learn more about HoWSample.  This application offers help via the “Help on Wheels” help server application, as well as Balloon Help™.",
  77.             "",
  78.             ""
  79.         }
  80.     }
  81. };
  82.  
  83. resource 'ALRT' (rGeneralAlert, "General", preload) {
  84.     {0, 0, 130, 368},
  85.     rGeneralAlert,
  86.     {    /* array: 4 elements */
  87.         /* [1] */
  88.         OK, visible, silent,
  89.         /* [2] */
  90.         OK, visible, silent,
  91.         /* [3] */
  92.         OK, visible, silent,
  93.         /* [4] */
  94.         OK, visible, silent
  95.     },
  96.     alertPositionMainScreen
  97. };
  98.  
  99. resource 'DITL' (rGeneralAlert, "General", preload) {
  100.     {    /* array DITLarray: 2 elements */
  101.         /* [1] */
  102.         {100, 299, 120, 358},
  103.         Button {
  104.             enabled,
  105.             "OK"
  106.         },
  107.         /* [2] */
  108.         {7, 74, 87, 358},
  109.         StaticText {
  110.             disabled,
  111.             "^0"
  112.         }
  113.     }
  114. };
  115.  
  116. resource 'DLOG' (rDoNothingDialog, "Do-Nothing", purgeable) {
  117.     {0, 0, 100, 200},
  118.     dBoxProc,
  119.     invisible,
  120.     noGoAway,
  121.     0x0,
  122.     rDoNothingDialog,
  123.     "",
  124.     alertPositionMainScreen
  125. };
  126.  
  127. resource 'dctb' (rDoNothingDialog, "Do-Nothing", purgeable) {
  128.     {    /* array ColorSpec: 0 elements */
  129.     }
  130. };
  131.  
  132. resource 'DITL' (rDoNothingDialog, "Do-Nothing", purgeable) {
  133.     {    /* array DITLarray: 2 elements */
  134.         /* [1] - iDNDSqueak */
  135.         {40, 60, 60, 140},
  136.         Button {
  137.             enabled,
  138.             "Squeak"
  139.         },
  140.         /* [2] */
  141.         {0, 0, 0, 0},
  142.         HelpItem {
  143.             disabled,
  144.             HMScanhdlg {
  145.                 rDoNothingDialog
  146.             }
  147.         }
  148.     }
  149. };
  150.  
  151. resource 'hdlg' (rDoNothingDialog, purgeable) {
  152.     HelpMgrVersion,
  153.     0,
  154.     hmDefaultOptions,
  155.     0,
  156.     0,
  157.     HMSkipItem {
  158.     },
  159.     {
  160.         HMStringItem {
  161.             {0, 0},
  162.             {0, 0, 0, 0},
  163.             "Click here to make an objectionable noise and close the dialog box.",
  164.             "",
  165.             "",
  166.             ""
  167.         }
  168.     }
  169. };
  170.  
  171. type 'HoWS' as 'STR ';
  172.  
  173. resource 'HoWS' (0, purgeable) {
  174.     "HoWSample version 1.1 — an AWOL Software Production © 1994 Ross Brown"
  175. };
  176.  
  177. resource 'vers' (1, purgeable) {
  178.     0x1,
  179.     0x10,
  180.     release,
  181.     0x0,
  182.     verUs,
  183.     "1.1",
  184.     "1.1 — an AWOL Software Production © 1994 Ross Brown"
  185. };
  186.  
  187. resource 'vers' (2, purgeable) {
  188.     0x1,
  189.     0x10,
  190.     release,
  191.     0x0,
  192.     verUS,
  193.     "1.1",
  194.     "AWOL Utilities 1.1"
  195. };
  196.  
  197. type 'Lang' {
  198.     unsigned    integer;                                /* language code */
  199. };
  200.  
  201. resource 'Lang' (128) {
  202.     0                                                    /* langEnglish */
  203. };
  204.  
  205. include "HoWSample Help alias" 'alis' (0) as 'alis' (rHelpFileAlias);
  206.  
  207. resource 'SIZE' (-1) {
  208.     reserved,
  209.     acceptSuspendResumeEvents,
  210.     reserved,
  211.     canBackground,
  212.     doesActivateOnFGSwitch,
  213.     backgroundAndForeground,
  214.     dontGetFrontClicks,
  215.     ignoreAppDiedEvents,
  216.     is32BitCompatible,
  217.     isHighLevelEventAware,
  218.     localAndRemoteHLEvents,
  219.     notStationeryAware,
  220.     dontUseTextEditServices,
  221.     reserved,
  222.     reserved,
  223.     reserved,
  224.     60 * 1024,
  225.     50 * 1024
  226. };
  227.  
  228. resource 'hfdr' (kHMHelpID) {
  229.     HelpMgrVersion,
  230.     hmDefaultOptions,
  231.     0,
  232.     0,
  233.     {
  234.         HMStringItem {
  235.            "This application is a sample client of the “Help on Wheels” help server.  Its help file is a manual describing how to write a help client application."
  236.         }
  237.     }
  238. };
  239.  
  240. resource 'BNDL' (128) {
  241.     'HoWS',
  242.     0,
  243.     {    /* array TypeArray: 2 elements */
  244.         /* [1] */
  245.         'FREF',
  246.         {    /* array IDArray: 2 elements */
  247.             /* [1] */
  248.             0, 128,
  249.             /* [2] */
  250.             1, 129,
  251.         },
  252.         /* [2] */
  253.         'ICN#',
  254.         {    /* array IDArray: 1 elements */
  255.             /* [1] */
  256.             0, rPrincipalIconFamily
  257.         }
  258.     }
  259. };
  260.  
  261. resource 'FREF' (128) {
  262.     'APPL',
  263.     0,
  264.     ""
  265. };
  266.  
  267. resource 'FREF' (129) {
  268.     'pref',
  269.     1,
  270.     ""
  271. };
  272.  
  273. resource 'ICN#' (rPrincipalIconFamily, purgeable) {
  274.     {    /* array: 2 elements */
  275.         /* [1] */
  276.         $"0001 0000 0002 8000 0004 4000 0009 2000"
  277.         $"0010 9000 0022 4800 0045 2400 0088 8200"
  278.         $"0105 0900 0242 0080 0421 0040 0890 8020"
  279.         $"1108 0010 24A5 0008 4242 3F04 9128 4082"
  280.         $"4A90 8041 2441 3022 1221 C814 090E 7F8F"
  281.         $"0492 3007 0221 0007 0140 8007 0080 6007"
  282.         $"0040 1FE7 0020 021F 0010 0407 0008 0800"
  283.         $"0004 1000 0002 2000 0001 4000 0000 80",
  284.         /* [2] */
  285.         $"0001 0000 0003 8000 0007 C000 000F E000"
  286.         $"001F F000 003F F800 007F FC00 00FF FE00"
  287.         $"01FF FF00 03FF FF80 07FF FFC0 0FFF FFE0"
  288.         $"1FFF FFF0 3FFF FFF8 7FFF FFFC FFFF FFFE"
  289.         $"7FFF FFFF 3FFF FFFE 1FFF FFFC 0FFF FFFF"
  290.         $"07FF FFFF 03FF FFFF 01FF FFFF 00FF FFFF"
  291.         $"007F FFFF 003F FE1F 001F FC07 000F F800"
  292.         $"0007 F000 0003 E000 0001 C000 0000 80"
  293.     }
  294. };
  295.  
  296. resource 'MENU' (mApple) {
  297.     mApple,
  298.     textMenuProc,
  299.     allEnabled,
  300.     enabled,
  301.     apple,
  302.     {    /* array: 1 elements */
  303.         /* [1] */
  304.         "About HoWSample…", noIcon, noKey, noMark, plain
  305.     }
  306. };
  307.  
  308. resource 'hmnu' (mApple, purgeable) {
  309.     HelpMgrVersion,
  310.     hmDefaultOptions,
  311.     0,
  312.     0,
  313.     HMSkipItem {
  314.     },
  315.     {
  316.         HMSkipItem {
  317.         },
  318.         HMStringItem {
  319.             "Shows HoWSample credit and version information.",
  320.             "",
  321.             "",
  322.             ""
  323.         }
  324.     }
  325. };
  326.  
  327. resource 'MENU' (mFile) {
  328.     mFile,
  329.     textMenuProc,
  330.     allEnabled,
  331.     enabled,
  332.     "File",
  333.     {    /* array: 1 elements */
  334.         /* [1] - iQuit */
  335.         "Quit", noIcon, "Q", noMark, plain
  336.     }
  337. };
  338.  
  339. resource 'hmnu' (mFile, purgeable) {
  340.     HelpMgrVersion,
  341.     hmDefaultOptions,
  342.     0,
  343.     0,
  344.     HMSkipItem {
  345.     },
  346.     {
  347.         HMStringItem {
  348.             "File menu\n\nUse this menu to quit HoWSample.",
  349.             "",
  350.             "",
  351.             ""
  352.         },
  353.         HMStringItem {
  354.             "Quits HoWSample.",
  355.             "",
  356.             "",
  357.             ""
  358.         }
  359.     }
  360. };
  361.  
  362. resource 'MENU' (mEdit) {
  363.     mEdit,
  364.     textMenuProc,
  365.     0x7FFFFFC0,
  366.     disabled,
  367.     "Edit",
  368.     {    /* array: 6 elements */
  369.         /* [1] - iUndo */
  370.         "Undo", noIcon, "Z", noMark, plain,
  371.         /* [2] */
  372.         "-", noIcon, noKey, noMark, plain,
  373.         /* [3] - iCut */
  374.         "Cut", noIcon, "X", noMark, plain,
  375.         /* [4] - iCopy */
  376.         "Copy", noIcon, "C", noMark, plain,
  377.         /* [5] - iPaste */
  378.         "Paste", noIcon, "V", noMark, plain,
  379.         /* [6] - iClear */
  380.         "Clear", noIcon, noKey, noMark, plain
  381.     }
  382. };
  383.  
  384. resource 'hmnu' (mEdit, purgeable) {
  385.     HelpMgrVersion,
  386.     hmDefaultOptions,
  387.     0,
  388.     0,
  389.     HMSkipItem {
  390.     },
  391.     {
  392.         HMStringItem {
  393.             "Edit menu\n\nUse this menu to work with text.",
  394.             "Edit menu\n\nNot available because HoWSample has no editing functions.",
  395.             "",
  396.             ""
  397.         },
  398.         HMStringItem {
  399.             "",
  400.             "Not available because HoWSample does not allow actions to be undone.",
  401.             "",
  402.             ""
  403.         },
  404.         HMSkipItem {
  405.         },
  406.         HMStringItem {
  407.             "Removes the selected text and places it in the Clipboard.",
  408.             "Removes the selected text and places it in the Clipboard.  Not available because no text is selected.",
  409.             "",
  410.             ""
  411.         },
  412.         HMStringItem {
  413.             "Places a copy of the selected text in the Clipboard.  The selected text remains where it is.",
  414.             "Places a copy of the selected text in the Clipboard.  Not available because no text is selected.",
  415.             "",
  416.             ""
  417.         },
  418.         HMStringItem {
  419.             "Places the contents of the Clipboard at the insertion point, or in place of the current selection.",
  420.             "Places the contents of the Clipboard at the insertion point, or in place of the current selection.  Not available because there is no text in the Clipboard, or because no text is being edited.",
  421.             "",
  422.             ""
  423.         },
  424.         HMStringItem {
  425.             "Removes the selected text without placing it in the Clipboard.",
  426.             "Removes the selected text without placing it in the Clipboard.  Not available because no text is selected.",
  427.             "",
  428.             ""
  429.         }
  430.     }
  431. };
  432.  
  433. resource 'MENU' (mDemo) {
  434.     mDemo,
  435.     textMenuProc,
  436.     allEnabled,
  437.     enabled,
  438.     "Demo",
  439.     {    /* array: 1 elements */
  440.         /* [1] - iDoNothing */
  441.         "Do-Nothing…", noIcon, "D", noMark, plain
  442.     }
  443. };
  444.  
  445. resource 'hmnu' (mDemo, purgeable) {
  446.     HelpMgrVersion,
  447.     hmDefaultOptions,
  448.     0,
  449.     0,
  450.     HMSkipItem {
  451.     },
  452.     {
  453.         HMStringItem {
  454.             "Demo menu\n\nUse this menu for a demonstration of how to attach help information to menus and dialogs.",
  455.             "",
  456.             "",
  457.             ""
  458.         },
  459.         HMStringItem {
  460.             "Does nothing, except bring up the do-nothing dialog.",
  461.             "",
  462.             "",
  463.             ""
  464.         }
  465.     }
  466. };
  467.  
  468. resource 'hmnu' (kHMHelpMenuID, purgeable) {
  469.     HelpMgrVersion,
  470.     hmDefaultOptions,
  471.     0,
  472.     0,
  473.     HMSkipItem {
  474.     },
  475.     {
  476.         HMStringItem {
  477.             "Displays tutorial help for HoWSample using the “Help on Wheels” help server application.",
  478.             "Not available, perhaps because the “HoWSample Help” file is missing or invalid.",
  479.             "",
  480.             ""
  481.         },
  482.         HMSkipItem {
  483.         },
  484.         HMStringItem {
  485.             "Displays help about HoWSample dialogs using the “Help on Wheels” help server application.",
  486.             "Not available, perhaps because the “HoWSample Help” file is missing or invalid.",
  487.             "",
  488.             ""
  489.         },
  490.         HMStringItem {
  491.             "Displays help about HoWSample menus using the “Help on Wheels” help server application.",
  492.             "Not available, perhaps because the “HoWSample Help” file is missing or invalid.",
  493.             "",
  494.             ""
  495.         }
  496.     }
  497. };
  498.  
  499. resource 'MBAR' (rMenuBar, preload) {
  500.     {    /* array MenuArray: 4 elements */
  501.         /* [1] */
  502.         mApple,
  503.         /* [2] */
  504.         mFile,
  505.         /* [3] */
  506.         mEdit,
  507.         /* [4] */
  508.         mDemo
  509.     }
  510. };
  511.  
  512. include "HoWSample.sounds";
  513.  
  514. resource 'STR#' (rMessages, purgeable) {
  515.     {    /* array StringArray: 13 elements */
  516.         /* [1] - iGenericErrorMessage */
  517.         "An internal error has occurred.  Please contact the author as described in “HoWSample Help”, citing error number %d.",
  518.         /* [2] - iHelpNotAvailable */
  519.         "Help is not available.  The “HoWSample Help” file may be missing or invalid.",
  520.         /* [3] - iHoWSampleRequiresAppleEvents */
  521.         "HoWSample requires Apple events.",
  522.         /* [4] - iHoWSampleRequiresFolderManager */
  523.         "HoWSample requires the Folder Manager.",
  524.         /* [5] - iHoWSampleRequiresProcessManager */
  525.         "HoWSample requires the Process Manager.",
  526.         /* [6] - iHoWSampleRequiresAliasManager */
  527.         "HoWSample requires the Alias Manager.",
  528.         /* [7] - iHoWSampleRequiresEnhancedStandardFile */
  529.         "HoWSample requires the enhanced Standard File procedures.",
  530.         /* [8] - iHoWSampleRequiresWaitNextEvent */
  531.         "HoWSample requires the _WaitNextEvent trap.",
  532.         /* [9] - iHoWRegisterFailed */
  533.         "HoWSample failed to register with the help server.",
  534.         /* [10] - iPreferencesFileUnwritable */
  535.         "The preferences file is locked or otherwise unwritable.",
  536.         /* [11] - iHoWSampleRequiresFSSpecCalls */
  537.         "HoWSample requires the FSSpec calls.",
  538.         /* [12] - iHelpFileWrongVersion */
  539.         "The “HoWSample Help” file appears to be the wrong version.  Please delete it or replace it with version “" helpFileVersionString "”.",
  540.         /* [13] - iPreferencesFileUnreadable */
  541.         "The preferences file cannot be opened.",
  542.     }
  543. };
  544.  
  545. resource 'STR#' (rPreloadStrings, preload) {
  546.     {    /* array StringArray: 5 elements */
  547.         /* [1] - iHoWSamplePreferencesFileName */
  548.         "HoWSample Preferences",
  549.         /* [2] - iHoWSampleHelpFileName */
  550.         "HoWSample Help",
  551.         /* [3] - iHelpCommandChar */
  552.         "/",
  553.         /* [4] - iDialogHelpString */
  554.         "Dialog Help",
  555.         /* [5] - iMenuHelpString */
  556.         "Menu Help",
  557.     }
  558. };