home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C++ / Applications / Quotes 1.0 / src / interface.r < prev    next >
Encoding:
Text File  |  1995-12-16  |  6.0 KB  |  387 lines  |  [TEXT/KAHL]

  1. #include <BalloonTypes.r>
  2. #include <Types.r>
  3. #include <SysTypes.r>
  4. #include "interface.h"
  5.  
  6. #define AF_H 220
  7. #define AF_W 300
  8. resource 'DLOG' (DLOG_ABOUT, purgeable) {
  9.     { 0, 0, AF_H, AF_W },
  10.     movableDBoxProc;
  11.     invisible;
  12.     noGoAway;
  13.     0;
  14.     DLOG_ABOUT;
  15.     "About Quotes";
  16. };
  17.  
  18. resource 'DITL' (DLOG_ABOUT, purgeable) {
  19.     {
  20.         { AF_H-10-20, AF_W-10-60, AF_H-10, AF_W-10 };
  21.         Button {
  22.             enabled;
  23.             "OK";
  24.         };
  25.         { 5, 5, AF_H-10-13-20, AF_W-5 };
  26.         StaticText {
  27.             disabled;
  28.             "Quotes\nVersion 1.0d4\n\nWritten by Jeffrey Kraus\n75103.761@compuserve.com\n\nThanks to\nPaula Gunderson\nGene Linkmeyer\nCraig Schanning"
  29.             
  30.             
  31.         };
  32.         { 0, 0, 0, 0 }
  33.         HelpItem {
  34.             disabled;
  35.             HMScanhdlg
  36.             { DLOG_ABOUT };
  37.         };
  38.     }
  39. };
  40.  
  41. resource 'hdlg' (DLOG_ABOUT, purgeable) {
  42.     HelpMgrVersion;
  43.     0;
  44.     hmDefaultOptions;
  45.     0;
  46.     0;
  47.     HMSkipItem {
  48.     }
  49.     {
  50.         HMStringItem {
  51.             { 10, 10 },
  52.             { 0, 0, 0, 0 },
  53.             "To close this dialog box, click this button.";
  54.             "";
  55.             "";
  56.             "";
  57.         }
  58.     }
  59. };
  60.  
  61. resource 'DLOG' (DLOG_GOTO, purgeable) {
  62.     { 0, 0, 105, 190 },
  63.     movableDBoxProc;
  64.     invisible;
  65.     noGoAway;
  66.     0;
  67.     DLOG_GOTO;
  68.     "Go To Quote";
  69. };
  70.  
  71. resource 'DITL' (DLOG_GOTO, purgeable) {
  72.     {
  73.         { 73, 116, 93, 176 };
  74.         Button {
  75.             enabled;
  76.             "Go To";
  77.         };
  78.         { 73, 40, 93, 100 };
  79.         Button {
  80.             enabled;
  81.             "Cancel";
  82.         };
  83.         { 35, 105, 51, 156 }
  84.         EditText {
  85.             disabled;
  86.             "";
  87.         }
  88.         { 35, 15, 49, 100 };
  89.         StaticText {
  90.             disabled;
  91.             "Go to quote:"
  92.         };
  93.         { 10, 15, 24, 162};
  94.         StaticText {
  95.             disabled;
  96.             "There are ^0 quotes.";
  97.         }
  98.         { 0, 0, 0, 0 }
  99.         HelpItem {
  100.             disabled;
  101.             HMScanhdlg
  102.             { DLOG_GOTO };
  103.         };
  104.     }
  105. };
  106.  
  107. resource 'hdlg' (DLOG_GOTO, purgeable) {
  108.     HelpMgrVersion;
  109.     0;
  110.     hmDefaultOptions;
  111.     0;
  112.     0;
  113.     HMSkipItem {
  114.     }
  115.     {
  116.         HMStringItem {
  117.             { 10, 10 },
  118.             { 0, 0, 0, 0 },
  119.             "To view the quote you have specified above, click this button.";
  120.             "";
  121.             "";
  122.             "";
  123.         }
  124.         HMStringItem {
  125.             { 10, 10 },
  126.             { 0, 0, 0, 0 },
  127.             "To close this dialog box without changing the current quote, click this button.";
  128.             "";
  129.             "";
  130.             "";
  131.         }
  132.         HMStringItem {
  133.             { 10, 10 },
  134.             { 0, 0, 0, 0 },
  135.             "";
  136.             "Type the number of the quote to view in the active document here.";
  137.             "";
  138.             "";
  139.         }
  140.     }
  141. };
  142.  
  143. resource 'MBAR' (MENUS_6) {
  144.     {
  145.         MENU_APPLE;
  146.         MENU_FILE;
  147.         MENU_EDIT;
  148.         MENU_QUOTES;
  149.         MENU_SPEECH;
  150.         MENU_FONT;
  151.         MENU_SIZE;
  152.         MENU_WINDOW_6;
  153.     }
  154. };
  155.  
  156. resource 'MBAR' (MENUS_7) {
  157.     {
  158.         MENU_APPLE;
  159.         MENU_FILE;
  160.         MENU_EDIT;
  161.         MENU_QUOTES;
  162.         MENU_SPEECH;
  163.         MENU_FONT;
  164.         MENU_SIZE;
  165.         MENU_WINDOW_7;
  166.     }
  167. };
  168.  
  169. resource 'MENU' (MENU_APPLE) {
  170.     MENU_APPLE;
  171.     textMenuProc;
  172.     allEnabled;
  173.     enabled;
  174.     apple;
  175.     {
  176.         "About Quotes"; noIcon; noKey; noMark; plain;
  177.         "-"; noIcon; noKey; noMark; plain;
  178.     }
  179. };
  180.  
  181. resource 'MENU' (MENU_FILE) {
  182.     MENU_FILE;
  183.     textMenuProc;
  184.     allEnabled;
  185.     enabled;
  186.     "File";
  187.     {
  188.         "Open…"; noIcon; "O"; noMark; plain;
  189.         "Close"; noIcon; "W"; noMark; plain;
  190.         "-"; noIcon; noKey; noMark; plain;
  191.         "Save"; noIcon; "S"; noMark; plain;
  192.         "Save As…"; noIcon; noKey; noMark; plain;
  193.         "-"; noIcon; noKey; noMark; plain;
  194.         "Quit"; noIcon; "Q"; noMark; plain;
  195.     }
  196. };
  197.  
  198. resource 'MENU' (MENU_EDIT) {
  199.     MENU_EDIT;
  200.     textMenuProc;
  201.     allEnabled;
  202.     enabled;
  203.     "Edit";
  204.     {
  205.         "Undo"; noIcon; "Z"; noMark; plain;
  206.         "-"; noIcon; noKey; noMark; plain;
  207.         "Cut"; noIcon; "X"; noMark; plain;
  208.         "Copy"; noIcon; "C"; noMark; plain;
  209.         "Paste"; noIcon; "V"; noMark; plain;
  210.         "Clear"; noIcon; noKey; noMark; plain;
  211.         "-"; noIcon; noKey; noMark; plain;
  212.         "Select All"; noIcon; "A"; noMark; plain;
  213.     }
  214. };
  215.  
  216. resource 'MENU' (MENU_QUOTES) {
  217.     MENU_QUOTES;
  218.     textMenuProc;
  219.     allEnabled;
  220.     enabled;
  221.     "Quotes";
  222.     {
  223.         "First Quote"; noIcon; "1"; noMark; plain;
  224.         "Previous Quote"; noIcon; "2"; noMark; plain;
  225.         "Next Quote"; noIcon, "3"; noMark; plain;
  226.         "Last Quote"; noIcon, "4"; noMark; plain;
  227.         "-"; noIcon; noKey; noMark; plain;
  228.         "Random Quote"; noIcon; "R"; noMark; plain;
  229.         "Go To…"; noIcon; noKey; noMark; plain;
  230.     }
  231. };
  232.  
  233. resource 'MENU' (MENU_SPEECH) {
  234.     MENU_SPEECH;
  235.     textMenuProc;
  236.     allEnabled;
  237.     enabled;
  238.     "Speech";
  239.     {
  240.         "Speak All"; noIcon; "H"; noMark; plain;
  241.         "Stop Speaking"; noIcon; "."; noMark; plain;
  242.         "Voices"; noIcon; hierarchicalMenu; noMark; plain;
  243.     }
  244. };
  245.  
  246. resource 'MENU' (MENU_FONT) {
  247.     MENU_FONT;
  248.     textMenuProc;
  249.     allEnabled;
  250.     enabled;
  251.     "Font";
  252.     {
  253.     }
  254. };
  255.  
  256. resource 'MENU' (MENU_SIZE) {
  257.     MENU_SIZE;
  258.     textMenuProc;
  259.     allEnabled;
  260.     enabled;
  261.     "Size";
  262.     {
  263.         "9 Point"; noIcon; noKey; noMark; plain;
  264.         "10 Point"; noIcon; noKey; noMark; plain;
  265.         "12 Point"; noIcon; noKey; noMark; plain;
  266.         "14 Point"; noIcon; noKey; noMark; plain;
  267.         "18 Point"; noIcon; noKey; noMark; plain;
  268.         "24 Point"; noIcon; noKey; noMark; plain;
  269.         "36 Point"; noIcon; noKey; noMark; plain;
  270.         "48 Point"; noIcon; noKey; noMark; plain;
  271.         "72 Point"; noIcon; noKey; noMark; plain;
  272.     }
  273. };
  274.  
  275. resource 'MENU' (MENU_WINDOW_7) {
  276.     MENU_WINDOW_7;
  277.     textMenuProc;
  278.     allEnabled;
  279.     enabled;
  280.     "Windows";
  281.     {
  282.     }
  283. };
  284.  
  285. resource 'MENU' (MENU_WINDOW_6) {
  286.     MENU_WINDOW_6;
  287.     textMenuProc;
  288.     allEnabled;
  289.     enabled;
  290.     "Windows";
  291.     {
  292.         "Help"; noIcon; noKey; noMark; plain;
  293.         "-"; noIcon; noKey; noMark; plain;
  294.     }
  295. };
  296.  
  297. resource 'MENU' (MENU_VOICES) {
  298.     MENU_VOICES;
  299.     textMenuProc;
  300.     allEnabled;
  301.     enabled;
  302.     "Voices";
  303.     {
  304.     }
  305. };
  306.  
  307. resource 'STR#' (MENU_STRINGS) {
  308.     {
  309.         "Quotes Help";
  310.         "Speak All";
  311.         "Speak Selection";
  312.         "Undo";
  313.         "Undo";
  314.         "Redo";
  315.     }
  316. };
  317.  
  318. resource 'WIND' (WIND_FORTUNE) {
  319.     { 0, 0, 228, 286 },
  320.     documentProc;
  321.     invisible;
  322.     goAway;
  323.     0;
  324.     "";
  325. };
  326.  
  327. resource 'STR ' (ADDRESS)  {
  328.     "75103.761@compuserve.com";
  329. };
  330.  
  331. #define version "1.0d4"
  332. #define copyright version " © Jeffrey Kraus 1995"
  333.  
  334. resource 'vers' (1) {
  335.     1;
  336.     0;
  337.     development;
  338.     4;
  339.     0;
  340.     version;
  341.     copyright;
  342. };
  343.  
  344. type signature as 'STR ';
  345.  
  346. resource signature (0, purgeable) {
  347.     copyright;
  348. };
  349.  
  350. resource 'FREF' (128, purgeable) {
  351.     'APPL';
  352.     0;
  353.     "";
  354. };
  355.  
  356. resource 'FREF' (129, purgeable) {
  357.     'TEXT';
  358.     1;
  359.     ""
  360. };
  361.  
  362. resource 'BNDL' (128, purgeable) {
  363.     signature;
  364.     0;
  365.     {
  366.         'FREF'; { 0; 128; 1; 129; };
  367.         'ICN#'; { 0; 128; 1; 129; };
  368.     }
  369. };
  370.  
  371. resource 'STR ' (-16396, purgeable) {
  372.     "Quotes";
  373. };
  374.  
  375. resource 'hfdr' (kHMHelpID, purgeable) {
  376.     HelpMgrVersion;
  377.     hmDefaultOptions;
  378.     0;
  379.     0;
  380.     {
  381.         HMStringItem
  382.             {
  383.                 "Quotes\n\nUse this application program to view randomly selected quotes from text documents.\n\nUse any text editor to create text documents with quotes.";
  384.             }
  385.     }
  386. };
  387.