home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Utilities / Programming / Snippets 2.4 / Snippets / Snippets.rsrc / TEXT_407_7.txt < prev    next >
Encoding:
Text File  |  1996-01-21  |  6.8 KB  |  293 lines

  1. /**********************************************************************
  2.  
  3.     ArgusAbout.cp
  4.  
  5. ***********************************************************************/
  6.  
  7. /*
  8.     Functions Include:
  9.     
  10.       MyAboutDialog           Standard Argus About Dialog
  11. */
  12.  
  13. /********** Includes */
  14. #include <Dialogs.h>
  15. #include "Fn_Prototypes.h"
  16. #include "ArgusHelp.h"
  17.  
  18. #include "MainWindow.h"    // may need to modify
  19.  
  20. /********** Defines */
  21. #define ABOUT_DLOG     599
  22. #define NIL_PTR        0L
  23. #define ALLOCATE_MEM   0
  24. #define IN_FRONT       (WindowPtr)-1L
  25. #define OK_BUTTON      1
  26. #define HELP_BUTTON    2
  27.  
  28.  
  29. /********** Prototypes */
  30. Boolean MyAboutDialog( void );
  31.  
  32.  
  33. /********** MyAboutDialog */
  34.  
  35. Boolean MyAboutDialog( void )
  36. {
  37.     WindowPtr   docWindow;
  38.     DialogPtr   dialog;
  39.     Boolean     done;
  40.     Boolean     result;
  41.     short       itemHit;
  42.     short       itemType;
  43.     Handle      itemHandle;
  44.     Rect        itemRect;
  45.     EventRecord theEvent;
  46.  
  47.     result = FALSE;
  48.  
  49.     docWindow = FrontWindow();
  50.     if( docWindow != NIL_PTR )
  51.         MyDoDeactivateWindow( docWindow );
  52.  
  53.     dialog = GetNewDialog( ABOUT_DLOG, ALLOCATE_MEM, IN_FRONT );
  54.  
  55.     if( dialog == NIL_PTR )
  56.         return( result );
  57.  
  58.     /* AdjustMenus_(); */
  59.  
  60.     ShowWindow( dialog );
  61.     FnMisc_FrameButton( dialog, OK_BUTTON );
  62.  
  63.     done = FALSE;
  64.     while( done == FALSE )
  65.     {
  66.         ModalDialog( nil, &itemHit );
  67.  
  68.         switch( itemHit )
  69.         {
  70.             case OK_BUTTON:
  71.                 result = TRUE;
  72.                 done = TRUE;
  73.                 break;
  74.             case HELP_BUTTON:
  75.                 DisposeDialog( dialog );
  76.                 MyHelpDialog();
  77.                 done = TRUE;
  78.                 return( result );
  79.                 break;
  80.         }
  81.      }
  82.     DisposDialog( dialog );
  83.     return( result );
  84. }
  85.  
  86.  
  87. /**********************************************************************
  88.  
  89.     ArgusAbout.r
  90.  
  91. ***********************************************************************/
  92.  
  93. #include <Types.r>
  94.  
  95. resource 'DLOG' (599, "About Dialog") {
  96.     {76, 105, 288, 401},
  97.     dBoxProc,
  98.     invisible,
  99.     noGoAway,
  100.     0x0,
  101.     599,
  102.     "About Dialog"
  103. };
  104.  
  105. resource 'DITL' (599, "About Dialog") {
  106.     {    /* array DITLarray: 7 elements */
  107.         /* [1] */
  108.         {182, 226, 202, 286},
  109.         Button {
  110.             enabled,
  111.             "OK"
  112.         },
  113.         /* [2] */
  114.         {149, 226, 169, 286},
  115.         Button {
  116.             enabled,
  117.             "Help"
  118.         },
  119.         /* [3] */
  120.         {124, 14, 202, 179},
  121.         Picture {
  122.             disabled,
  123.             599
  124.         },
  125.         /* [4] */
  126.         {79, 42, 125, 255},
  127.         Picture {
  128.             disabled,
  129.             598
  130.         },
  131.         /* [5] */
  132.         {13, 131, 47, 165},
  133.         Picture {
  134.             disabled,
  135.             597
  136.         },
  137.         /* [6] */
  138.         {53, 73, 69, 224},
  139.         StaticText {
  140.             disabled,
  141.             "Application x.x"
  142.         },
  143.         {0, 0, 0, 0},
  144.         HelpItem {
  145.           disabled,
  146.           HMScanhdlg
  147.           {599}
  148.         }
  149.     }
  150. };
  151.  
  152. resource 'PICT' (599) {
  153.     550,
  154.     {-1, -1, 77, 164},
  155.     $"1101 A000 82A0 008C 0100 0AFF FFFF FF00"
  156.     $"4D00 A407 0000 0000 2200 0100 1C00 00A0"
  157.     $"00A0 A100 A400 020D FC01 000A 0000 0000"
  158.     $"0000 0000 0700 0100 0122 0049 0001 1BB8"
  159.     $"2300 0023 091B 2300 0023 02F9 2300 0023"
  160.     $"1034 2300 0023 E900 2300 0023 FCF2 2300"
  161.     $"0023 000E 2300 0023 E500 2300 00A0 00A3"
  162.     $"0100 0AFF FFFF FF00 4D00 A423 1BB8 2309"
  163.     $"1B23 02F9 2310 3423 E900 23FC F223 000E"
  164.     $"23E5 00A0 00A1 0700 0000 0022 0027 0013"
  165.     $"0000 A000 A0A1 00A4 0002 0FFC 7100 3200"
  166.     $"2200 0100 4900 3700 2500 0E00 2700 1300"
  167.     $"2200 1C00 2500 2B00 4900 3700 4900 2000"
  168.     $"3900 1C00 4900 1C00 4900 0100 2500 0E01"
  169.     $"000A 0000 0000 0000 0000 0700 0100 0122"
  170.     $"0025 000E 0502 2300 0023 09FB 2300 0023"
  171.     $"0F03 2300 0023 0C24 2300 0023 E900 2300"
  172.     $"0023 FCF0 2300 0023 0010 2300 0023 E500"
  173.     $"2300 0023 0DDC 2300 0084 000A 0000 0000"
  174.     $"0000 0000 A000 A301 000A FFFF FFFF 004D"
  175.     $"00A4 8400 0A00 0000 0000 0000 0023 0502"
  176.     $"2309 FB23 0F03 230C 2423 E900 23FC F023"
  177.     $"0010 23E5 0023 0DDC A000 A1A0 008D A100"
  178.     $"9600 0C01 0000 0002 0000 0000 0000 00A1"
  179.     $"009A 0008 FFF9 0000 001B 0000 0100 0A00"
  180.     $"2800 3600 4100 6F2C 0009 0003 0647 656E"
  181.     $"6576 6103 0003 0409 0D00 122E 0004 0000"
  182.     $"0100 2B37 3B04 5247 5553 A000 97A1 0096"
  183.     $"000C 0100 0000 0200 0000 0000 0000 A100"
  184.     $"9A00 08FF FC00 0000 3300 0001 000A 003F"
  185.     $"003A 004C 00A3 0400 0D00 0A2B 040E 1453"
  186.     $"6F66 7477 6172 6520 456E 6769 6E65 6572"
  187.     $"696E 67A0 0097 0100 0AFF FFFF FF00 4D00"
  188.     $"A422 003F 003A 6800 A000 83FF"
  189. };
  190.  
  191. resource 'PICT' (598) {
  192.     202,
  193.     {-1, -1, 45, 212},
  194.     $"1101 A000 82A1 0096 000C 0200 0000 0200"
  195.     $"0000 0000 0000 A100 9A00 0800 0D00 0000"
  196.     $"4D00 0001 000A 0000 0000 002C 00D3 2C00"
  197.     $"0900 0406 4D6F 6E61 636F 0300 040D 0009"
  198.     $"2E00 0400 0001 002B 1C09 1B41 7267 7573"
  199.     $"2053 6F66 7477 6172 6520 456E 6769 6E65"
  200.     $"6572 696E 670D 2B0C 0B17 436F 6D70 7553"
  201.     $"6572 7665 3A20 3733 3734 312C 3234 3135"
  202.     $"0D28 001F 0001 2449 6E74 6572 6E65 743A"
  203.     $"2037 3337 3431 2E32 3431 3540 636F 6D70"
  204.     $"7573 6572 7665 2E63 6F6D 0D2B 4B0B 0A28"
  205.     $"4672 6565 7761 7265 29A0 0097 A000 83FF"
  206. };
  207.  
  208. resource 'PICT' (597) {
  209.     187,
  210.     {-1, -1, 33, 33},
  211.     $"1101 A000 8201 000A FFFF FFFF 0021 0021"
  212.     $"9000 0400 0000 0000 2000 2000 0000 0000"
  213.     $"2000 2000 0000 0000 2000 2000 0100 0100"
  214.     $"0000 0280 0000 0440 0000 0820 0000 1010"
  215.     $"0000 2008 0000 4004 0000 8002 0001 0001"
  216.     $"0002 0000 8004 0000 4008 0000 2010 0000"
  217.     $"1020 0000 0840 003F 0480 0040 8240 0080"
  218.     $"4120 0130 2210 01C8 1408 0E7F 8F04 0230"
  219.     $"0702 0100 0701 0080 0700 8060 0700 401F"
  220.     $"E700 2002 1F00 1004 0700 0808 0000 0410"
  221.     $"0000 0220 0000 0140 0000 0080 00A0 0083"
  222.     $"FF"
  223. };
  224.  
  225.  
  226. /**********************************************************************
  227.  
  228.     ArgusAboutBalloons.r
  229.  
  230. ***********************************************************************/
  231.  
  232. #include <Types.r>
  233. #include <BalloonTypes.r>
  234.  
  235. resource 'hdlg' (599, "About Balloons", purgeable){
  236.   /* Header */
  237.   HelpMgrVersion,
  238.   0,                  /* start help with first item in DITL */
  239.   hmSaveBitsNoWindow, /* hmDefaultOptions or hmSaveBitsNoWindow */
  240.   0,                  /* balloon definition */
  241.   0,                  /* variation code or position code, reference
  242.                          IM: More Macintosh Toolbox p3-10 */
  243.   
  244.   /* Missing Component */
  245.   HMSkipItem {
  246.   },
  247.   
  248.   /* Help */
  249.   {
  250.     /* [1] */
  251.     HMStringREsItem { /* store help messages in STR# 500 */
  252.     { 0, 0 },         /* default tip location is { 0, 0 } */
  253.     { 0, 0, 0, 0 },   /* default alternate rectangle */
  254.     599, 1,           /* OK button */
  255.     0, 0,             /* never dimmed */
  256.     0, 0,             /* never checked */
  257.     0, 0              /* never marked */
  258.     },
  259.     
  260.     /* [2] */
  261.     HMStringREsItem {
  262.     { 0, 0 },
  263.     { 0, 0, 0, 0 },
  264.     599, 2,           /* Help button */
  265.     0, 0,
  266.     0, 0,
  267.     0, 0
  268.     },
  269.     
  270.     /* [3] */
  271.     HMSkipItem {      /* Picture text */
  272.     },
  273.  
  274.     /* [4] */
  275.     HMSkipItem {      /* Application name text */
  276.     },
  277.  
  278.     /* [5] */
  279.     HMSkipItem {      /* Application name text */
  280.     },
  281.   }
  282. };
  283.  
  284. resource 'STR#' (599, "About Dialog Help Strings") {
  285.   {
  286.   /* [1] */
  287.   "To dismiss dialog, click this button.";
  288.   /* [2] */
  289.   "To display help for this application, click this button.";
  290.   }
  291. };
  292.  
  293. // End of File