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

  1. // -----
  2. // vdl157.txt
  3. // Copyright 1996 Claris
  4. // -----
  5.  
  6. // Document Statistics
  7.  
  8. #include "StdVPref.txt"
  9.  
  10.  
  11. /************************** LOCALIZED STRING CONSTANTS BEGIN **************************************/
  12. /************************** LOCALIZED STRING CONSTANTS BEGIN **************************************/
  13. /************************** LOCALIZED STRING CONSTANTS BEGIN **************************************/
  14.  
  15. //This section contains all localizable string constants for this VDL program. Be sure to 
  16. //include the backslash character at the end of each line of a multi-line string, except for the last line.
  17. //You may also flatten multiline constants into a single line, if you prefer
  18.  
  19. #define kLit1 "Document"
  20. #define kLit2 "Character Count: "
  21. #define kLit3 "Word Count: "
  22. #define kLit4 "Total Image Size(K): "
  23. #define kLit5 "Approximate Download Times"
  24. #define kLit6 " Seconds"
  25. //#define kLit7 "Minimum Download Time at 28800: "
  26. #define kLit8 "&Done"
  27. #define kLit9 "Selection"
  28. #define kLit10 "Byte Count: "
  29. #define kLit11 "Document"
  30. #define kLit12 "Selection"
  31. #define kLit13 "14.4 K"
  32. #define kLit14 "28.8 K"
  33. #define kLit15 "33.6 K"
  34. #define kLit16 "56.0 K"
  35. #define kLit17 "ISDN"
  36. #define kLit18 "T1"
  37.  
  38.  
  39. //Localized Fonts
  40. #if Platform_Mac
  41.     #define DisplayFont { Geneva, 10, {Plain} }
  42.     #define kBoldLabelFont { Geneva, 10, {Bold} }
  43.     #define kTabLabelFont         {Geneva, 10, {Plain}}    
  44. #else
  45.     #define DisplayFont SystemFont
  46.     #define kBoldLabelFont SystemFont
  47.     #define kTabLabelFont         SystemFont
  48. #endif
  49.  
  50. /************************** LOCALIZED STRING CONSTANTS END **************************************/
  51. /************************** LOCALIZED STRING CONSTANTS END **************************************/
  52. /************************** LOCALIZED STRING CONSTANTS END **************************************/
  53.  
  54.  
  55.  
  56. /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
  57. /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
  58. /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
  59.  
  60. //This section contains integer constants that are used to format this VDL program.
  61. //These are localizable - they only need to be changed if the localized strings 
  62. //are sufficiently longer than the US strings. Localize the strings first, then the constants.
  63.  
  64. #if Platform_Mac
  65.     //Width of the labels
  66.     #define kLabelWidth 100    
  67.     #define kDownLoadLableWidth 80
  68.     
  69.     //Width of the displayed values
  70.     #define kValueWidth 80
  71.     
  72.     //Width of the OK Button
  73.     #define kOKButtonWidth 70
  74.     
  75.     #define kValueSeparation 30
  76. #else
  77.  
  78.     //Width of the labels
  79.     #define kLabelWidth 110
  80.     #define kDownLoadLableWidth 80
  81.     
  82.     //Width of the displayed values
  83.     #define kValueWidth 100
  84.     
  85.     //Width of the OK Button
  86.     #define kOKButtonWidth 100
  87.  
  88.     #define kValueSeparation 30
  89.  
  90. #endif
  91.  
  92. /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
  93. /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
  94. /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
  95.  
  96. //No further localizable data past this point
  97.  
  98. /************************** END LOCALIZABLE DATA ***************************************************/
  99. /************************** END LOCALIZABLE DATA ***************************************************/
  100. /************************** END LOCALIZABLE DATA ***************************************************/
  101.  
  102.  
  103. //    DO NOT TOUCH
  104. //    WORK IN PROGRESS
  105. //    - Russ [08.17.97]
  106. //#if Platform_Mac
  107. //    #define dlogBack BackColor = {65535, 65535, 65535}
  108. //#else
  109.     #define dlogBack BackColor = Dialog
  110. //#endif
  111.  
  112.  
  113. Define(SelectionStats)
  114.     VList(TabDialogBack)
  115.     {
  116.         Switch (docEncoding)
  117.         {
  118.             case 0:
  119.                 VList()
  120.                 {
  121.                     HList()
  122.                     {
  123.                         StaticText( kLit2, Width = kLabelWidth, Font = DisplayFont, Alignment = Right );
  124.                         StaticText(selChars, Font = DisplayFont, Width = kValueWidth );
  125.                     }
  126.                     Spacer(Height = 5, Width = 0);
  127.                     HList()
  128.                     {
  129.                         StaticText( kLit3, Width = kLabelWidth, Font = DisplayFont , Alignment = Right);
  130.                         StaticText(selWords, Font = DisplayFont , Width = kValueWidth);
  131.                     }
  132.                 }
  133.             
  134.             default:
  135.                 HList()
  136.                 {
  137.                     StaticText(kLit10, Width = kLabelWidth, Font = DisplayFont, Alignment = Right);
  138.                     StaticText(selChars, Font = DisplayFont, Width = kValueWidth );
  139.                 }
  140.             
  141.         } // Switch (docEncoding)
  142.     
  143.         Spacer(Height = 5, Width = 0);
  144.         HList()
  145.         {
  146.             StaticText( kLit4, Width = kLabelWidth, Font = DisplayFont, Alignment = Right );
  147.             StaticText(selImageSize, Font = DisplayFont, Width = kValueWidth );
  148.         }
  149.  
  150.         Spacer(Height = 12, Width = 0);
  151.         
  152.         //---- DownLoad Times ----
  153.         Label(kLit5, Single,Font = kBoldLabelFont)
  154.             Margin(5,5,5,5)
  155.                 VList()
  156.                 {
  157.                     
  158.                     HList()
  159.                     {
  160.                         StaticText( kLit13, Width = kDownLoadLableWidth, Font = DisplayFont, Alignment = Right );
  161.                         Spacer(Width = kValueSeparation);
  162.                         StaticText(sel14_4Download,Font = DisplayFont);
  163.                     }//HList
  164.  
  165.                     HList()
  166.                     {
  167.                         StaticText( kLit14, Width = kDownLoadLableWidth, Font = DisplayFont, Alignment = Right );
  168.                         Spacer(Width = kValueSeparation);
  169.                         StaticText(sel28_8Download, Font = DisplayFont);
  170.                     }//HList
  171.  
  172.                     HList()
  173.                     {
  174.                         StaticText( kLit15, Width = kDownLoadLableWidth, Font = DisplayFont, Alignment = Right );
  175.                         Spacer(Width = kValueSeparation);
  176.                         StaticText(sel33_6Download, Font = DisplayFont);
  177.                     }//HList
  178.  
  179.                     HList()
  180.                     {
  181.                         StaticText( kLit16, Width = kDownLoadLableWidth, Font = DisplayFont, Alignment = Right );
  182.                         Spacer(Width = kValueSeparation);
  183.                         StaticText(sel56_0Download, Font = DisplayFont);
  184.                     }//HList
  185.  
  186.                     HList()
  187.                     {
  188.                         StaticText( kLit17, Width = kDownLoadLableWidth, Font = DisplayFont, Alignment = Right );
  189.                         Spacer(Width = kValueSeparation);
  190.                         StaticText(selISDNDownload, Font = DisplayFont);
  191.                     }//HList
  192.  
  193.                     HList()
  194.                     {
  195.                         StaticText( kLit18, Width = kDownLoadLableWidth, Font = DisplayFont, Alignment = Right );
  196.                         Spacer(Width = kValueSeparation);
  197.                         StaticText(selT1Download, Font = DisplayFont);
  198.                     }//HList
  199.  
  200.                 }//VList
  201.     }//VList
  202.  
  203. Define(DocumentStats)
  204.     VList(TabDialogBack)
  205.     {
  206.             
  207.         Switch (docEncoding)
  208.         {
  209.             case 0:
  210.                 VList()
  211.                 {
  212.                     HList()
  213.                     {
  214.                         StaticText( kLit2, Width = kLabelWidth, Font = DisplayFont, Alignment = Right );
  215.                         StaticText(docChars, Font = DisplayFont, Width = kValueWidth );
  216.                     }
  217.                     Spacer(Height = 5, Width = 0);
  218.                     HList()
  219.                     {
  220.                         StaticText( kLit3, Width = kLabelWidth, Font = DisplayFont , Alignment = Right);
  221.                         StaticText(docWords, Font = DisplayFont , Width = kValueWidth);
  222.                     }
  223.                 }
  224.             
  225.             default:
  226.                 HList()
  227.                 {
  228.                     StaticText(kLit10, Width = kLabelWidth, Font = DisplayFont, Alignment = Right);
  229.                     StaticText(docChars, Font = DisplayFont, Width = kValueWidth );
  230.                 }
  231.             
  232.         } // Switch (docEncoding)
  233.     
  234.         Spacer(Height = 5, Width = 0);
  235.         HList()
  236.         {
  237.             StaticText( kLit4, Width = kLabelWidth, Font = DisplayFont, Alignment = Right );
  238.             StaticText(docImageSize, Font = DisplayFont, Width = kValueWidth );
  239.         }
  240.  
  241.         Spacer(Height = 12, Width = 0);
  242.         
  243.         //---- DownLoad Times ----
  244.         Label(kLit5, Single,Font = kBoldLabelFont)
  245.             Margin(5,5,5,5)
  246.                 VList()
  247.                 {
  248.                     
  249.                     HList()
  250.                     {
  251.                         StaticText( kLit13, Width = kDownLoadLableWidth, Font = DisplayFont, Alignment = Right );
  252.                         Spacer(Width = kValueSeparation);
  253.                         StaticText(doc14_4Download, Font = DisplayFont);
  254.                     }//HList
  255.  
  256.                     HList()
  257.                     {
  258.                         StaticText( kLit14, Width = kDownLoadLableWidth, Font = DisplayFont, Alignment = Right );
  259.                         Spacer(Width = kValueSeparation);
  260.                         StaticText(doc28_8Download, Font = DisplayFont);
  261.                     }//HList
  262.  
  263.                     HList()
  264.                     {
  265.                         StaticText( kLit15, Width = kDownLoadLableWidth, Font = DisplayFont, Alignment = Right );
  266.                         Spacer(Width = kValueSeparation);
  267.                         StaticText(doc33_6Download, Font = DisplayFont);
  268.                     }//HList
  269.  
  270.                     HList()
  271.                     {
  272.                         StaticText( kLit16, Width = kDownLoadLableWidth, Font = DisplayFont, Alignment = Right );
  273.                         Spacer(Width = kValueSeparation);
  274.                         StaticText(doc56_0Download, Font = DisplayFont);
  275.                     }//HList
  276.  
  277.                     HList()
  278.                     {
  279.                         StaticText( kLit17, Width = kDownLoadLableWidth, Font = DisplayFont, Alignment = Right );
  280.                         Spacer(Width = kValueSeparation);
  281.                         StaticText(docISDNDownload, Font = DisplayFont);
  282.                     }//HList
  283.  
  284.                     HList()
  285.                     {
  286.                         StaticText( kLit18, Width = kDownLoadLableWidth, Font = DisplayFont, Alignment = Right );
  287.                         Spacer(Width = kValueSeparation);
  288.                         StaticText(docT1Download, Font = DisplayFont);
  289.                     }//HList
  290.  
  291.                 }//VList
  292.         
  293.  
  294.     }//VList
  295.  
  296.  
  297. //---- Tab Main ----
  298. Define(MainList)
  299.     Margin(12,12,12,12)
  300.     VList(TabDialogBack)
  301.     {
  302.     
  303.         Switch (mode)
  304.         {
  305.             case 0:
  306.             default:
  307.                 Margin(0,0,0,0)
  308.                     Call(DocumentStats);
  309.                     
  310.             case 1:
  311.                 Margin(0,0,0,0, Height = UseParent)
  312.                     Call(SelectionStats);
  313.                     
  314.         }//Switch
  315.     }//VList
  316.  
  317.  
  318. //---- Main -----
  319. Margin(10, 10, 10, 10, TabDialogBack)
  320. VList()
  321. {
  322.  
  323.     TabControl(mode, NoUndo,Font = kTabLabelFont)
  324.     {
  325.         Tab(kLit11, 0);     // Document
  326.         Tab(kLit12, 1);     // Selection
  327.         
  328.         Subview:    
  329.             Call(MainList);
  330.     }; //Layout
  331.  
  332.     Spacer(Height = 16, Width = 0);
  333.  
  334.     HList(Width = UseParent)
  335.     {
  336.         Spacer(Width = UseParent, Height = 0);        
  337.         DefaultButton(kLit8, 1071, "None", Width = kOKButtonWidth);
  338.     }
  339.  
  340.  
  341.  
  342. }//VList
  343.  
  344.