home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1999 March / CDW0399.iso / Demos / HomePage / data1.cab / Program_Executable_Files / Homepage.exe / 1009 / 167 < prev    next >
Encoding:
Text File  |  1997-12-10  |  8.2 KB  |  267 lines

  1. // -----
  2. // VDL167.txt
  3. // Copyright 1996 Claris
  4. // -----
  5. // About Box and Splash Screen
  6.  
  7. #include "StdVPref.txt"
  8.  
  9. /************************** LOCALIZED STRING CONSTANTS BEGIN **************************************/
  10. /************************** LOCALIZED STRING CONSTANTS BEGIN **************************************/
  11. /************************** LOCALIZED STRING CONSTANTS BEGIN **************************************/
  12. //This section contains all localizable string constants for this VDL program. Be sure to 
  13. //include the backslash character at the end of each line of a multi-line string, except for the last line.
  14. //You may also flatten multiline constants into a single line, if you prefer
  15.  
  16. #define kLit1 "Registered To:"
  17. #define kLit2 "&Info"
  18. #define kLit3 "&Credits"
  19. #define kLit4 "&About"
  20. #define kLit5 "OK"
  21. #define kLit6 "&How To Upgrade"
  22. //Localized Fonts
  23. #if Platform_Mac
  24. #define AboutFont Font = {Geneva, 9, {Plain}}
  25. #else
  26. #define AboutFont Font = {Arial, 8, {Plain}}
  27. #endif
  28.  
  29. /************************** LOCALIZED STRING CONSTANTS END **************************************/
  30. /************************** LOCALIZED STRING CONSTANTS END **************************************/
  31. /************************** LOCALIZED STRING CONSTANTS END **************************************/
  32. /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
  33. /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
  34. /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
  35. //This section contains integer constants that are used to format this VDL program.
  36. //These are localizable - they only need to be changed if the localized strings 
  37. //are sufficiently longer than the US strings. Localize the strings first, then the constants.
  38.  
  39. //Height and width of the views in the middle of the dialog that display the info text,
  40. //the credits, or the about text.
  41. #define kInfoViewWidth     200
  42. #define kInfoViewHeight 165
  43. //Space between the left edge of the window and the left edge of the info views.
  44. #define kInfoViewLeftMargin 90
  45. //Margin between the info view and the crane picture, on the right
  46. #define kInfoViewRightMargin 0
  47. //Widths of all the buttons, when visible. Note that the width of the dialog 
  48. //is computed without checking the button widths. This is so they 
  49. //automatically right-juetify themselves. If you need to make the buttons wider than 
  50. //the dialog is allowing for, increase the kDialogMinWidth constant to add padding 
  51. //to the dialog. Alternately, you can increase the kInfoViewRightMargin constant above
  52. #define kButtonWidth 60
  53. //See comment above. Minimum width of the dialog. Typically not used.
  54. #define kDialogMinWidth 0
  55. //Margin to the left of the "Home Page" logotype
  56. #define kHomePagePictLeftMargin 10
  57. //Space above the top of the crane graphic.
  58. #if !LITE_VERSION
  59. #define kGraphicLeftMargin 0
  60. #define kGraphicTopMargin  40
  61. #else
  62. #define kGraphicLeftMargin 0
  63. #define kGraphicTopMargin  80
  64. #endif
  65. #define kButtonSpacing 10
  66.  
  67. /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
  68. /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
  69. /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
  70.  
  71. //No further localizable data past this point
  72.  
  73. /************************** END LOCALIZABLE DATA ***************************************************/
  74. /************************** END LOCALIZABLE DATA ***************************************************/
  75. /************************** END LOCALIZABLE DATA ***************************************************/
  76.  
  77. #define SplashColor White
  78.  
  79. #define ccSplashInfoCommand        3600
  80. #define ccSplashAboutCommand        3601
  81. #define ccSplashCreditsCommand    3602
  82. #define ccUpgradeInfo            3603
  83. #define ccOK                           1071  // from CommandCode.h
  84.  
  85. #define pictSpace  22
  86.  
  87.  
  88. Define(InfoViews)
  89.     Switch(aboutMode, Height = kInfoViewHeight, Width = kInfoViewWidth, BackColor = SplashColor)
  90.         {
  91.         case 0:  //Info
  92.             VList(Width = UseParent)
  93.                 {
  94.                 #if !LITE_VERSION
  95.                 StaticText(kLit1,Width = UseParent, AboutFont);
  96.                 StaticText(user_name,Width = UseParent, AboutFont);
  97.                 StaticText(user_company, Width = UseParent, AboutFont);
  98.                 StaticText(user_ID,  Width = UseParent, AboutFont);
  99.                 #endif
  100.                 
  101.                 StaticText(infoText,  Width = UseParent, AboutFont);
  102.                 }
  103.         case 1: //about
  104.             StaticText(aboutText, Height = UseParent, Width = UseParent, AboutFont);
  105.             
  106.         case 2: //credits
  107.             GenericView("CreditsView");
  108.         
  109.         default:
  110.             Spacer(Height = 0, Width = 0);
  111.         } //Switch
  112.  
  113. Define(MainView)
  114.     VList()
  115.         {
  116.         Spacer(Height = 0, Width = kDialogMinWidth);
  117.         HList()
  118.             {
  119.             Margin(3,3,0,0)
  120.                 PICT(15000, DontMap);
  121.             Margin(0,24,0,0)
  122.                 #if !LITE_VERSION
  123.                 PICT(15001, DontMap);
  124.                 #else
  125.                 PICT(15011, DontMap);
  126.                 #endif
  127.             }
  128.         HList()
  129.             {
  130.             Switch(doSecretAbout)
  131.                 {
  132.                 case 0:
  133.                     Margin(kInfoViewLeftMargin, 5 , 0, 0)
  134.                         Call(InfoViews);\
  135.                 case 1:
  136.                     Margin(5, 5 , 0, 0)
  137.                         Call(InfoViews);
  138.                 }
  139.             
  140.             Margin(0, 0, 0, 10)
  141.                 #if !LITE_VERSION
  142.                 PICT(15002, DontMap);
  143.                 #else
  144.                 PICT(15012, DontMap);
  145.                 #endif
  146.             }
  147.             
  148.         Switch(showButtons)
  149.             {
  150.             case 1:
  151.                 Spacer(Height = 5, Width = 0);    
  152.             default: 
  153.                 Spacer(Height = 0, Width = 0);
  154.             }
  155.             
  156.         
  157.         Switch (showButtons, Width = UseParent)
  158.             {
  159.             case 1: 
  160.                 HList(Width = UseParent) {
  161.                     Spacer(Height = 0, Width = UseParent);
  162.                     
  163. #if LITE_VERSION
  164.                     PushButton( kLit6, ccUpgradeInfo, "None");
  165.                     Spacer(Height = 0, Width = kButtonSpacing);
  166. #endif //LITE_VERSION
  167. #if Platform_Mac
  168.                     VList() {
  169.                         Spacer( Height = 4 );
  170.                         PushButton( kLit2, ccSplashInfoCommand, "None", Width = kButtonWidth);
  171.                     }
  172.                     Spacer(Height = 0, Width = kButtonSpacing);
  173.                     VList() {
  174.                         Spacer( Height = 4 );
  175.                         PushButton( kLit3, ccSplashCreditsCommand, "None", Width = kButtonWidth);
  176.                     }
  177.                     Spacer(Height = 0, Width = kButtonSpacing);
  178.                     VList() {
  179.                         Spacer( Height = 4 );
  180.                         PushButton( kLit4, ccSplashAboutCommand, "None", Width = kButtonWidth);
  181.                     }
  182. #else /* ! Platform_Mac */
  183.                     PushButton( kLit2, ccSplashInfoCommand, "None", Width = kButtonWidth);
  184.                     Spacer(Height = 0, Width = kButtonSpacing);
  185.                     PushButton( kLit3, ccSplashCreditsCommand, "None", Width = kButtonWidth);
  186.                     Spacer(Height = 0, Width = kButtonSpacing);
  187.                     PushButton( kLit4, ccSplashAboutCommand, "None", Width = kButtonWidth);
  188. #endif /* Platform_Mac */
  189.                     Spacer(Height = 0, Width = kButtonSpacing);
  190.                     DefaultButton( kLit5, ccOK, "None", Width = kButtonWidth);
  191.                 }
  192.                     
  193.             default:
  194.                     HelpView(AboutFont);
  195.             }
  196.         } //MainView
  197.  
  198. Define(Divider)
  199.     Margin(6,0,3,0, Width = UseParent, stdBackColor)
  200.         VList(Width = UseParent)
  201.             {
  202.             Spacer(Width = 0, Height = 4, ScaleV);
  203.             Spacer(Height = 1, Width = UseParent, BackColor = {20000,20000,20000});
  204.             Spacer(Height = 1, Width = UseParent, BackColor = {62000, 62000, 62000});
  205.             Spacer(Width = 0, Height = 4, ScaleV);
  206.             }
  207.  
  208.  
  209. Margin(0, 0, 10, 10, BackColor = SplashColor)
  210.     VList()
  211.         {
  212.         Switch(doSecretAbout)
  213.             {
  214.             case 0:
  215.                 Call(MainView);
  216.             
  217.             case 1:
  218.                 VList()
  219.                     {
  220.                     HList()
  221.                         {
  222.                         Margin(0,         0, 0, 0) PICT(20001, DontMap);
  223.                         Margin(pictSpace, 0, 0, 0) PICT(20002, DontMap);
  224.                         Margin(pictSpace, 0, 0, 0) PICT(20003, DontMap);
  225.                         Margin(pictSpace, 0, 0, 0) PICT(20004, DontMap);
  226.                         Margin(pictSpace, 0, 0, 0) PICT(20005, DontMap);
  227.                         }
  228.                     HList()
  229.                         {
  230.                         VList()
  231.                             {
  232.                             PICT(20006, DontMap);
  233.                             PICT(20007, DontMap);
  234.                             PICT(20008, DontMap);
  235.                             }
  236.                     
  237.                         Call(MainView);
  238.  
  239.                         VList()
  240.                             {
  241.                             PICT(20009, DontMap);
  242.                             PICT(20010, DontMap);
  243.                             PICT(20011, DontMap);
  244.                             }
  245.                         }
  246.                     }
  247.             }
  248.  
  249.         #ifdef TryMe
  250.         Call(Divider);
  251.         Spacer(Width = 0, Height = 20);
  252.         HList()
  253.             {
  254.             Spacer(Width = 10, Height = 0);
  255.             VList()
  256.                 {
  257.                 IntegerPopup("Developers:", Default, doSecretAbout)
  258.                     {
  259.                     IntItem("Show", 1);
  260.                     IntItem("Don't Show", 0);
  261.                     };
  262.                 }
  263.             }
  264.         #endif
  265.  
  266.         }
  267.