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

  1. // -----
  2. // VDL161.txt
  3. // Copyright 1996 Claris
  4. // -----
  5.  
  6. // Link palette
  7.  
  8. #include "StdVPref.txt"
  9.  
  10.  
  11. /************************** LOCALIZED STRING CONSTANTS BEGIN **************************************/
  12. /************************** LOCALIZED STRING CONSTANTS BEGIN **************************************/
  13. /************************** LOCALIZED STRING CONSTANTS BEGIN **************************************/
  14. //This section contains all localizable string constants for this VDL program. Be sure to 
  15. //include the backslash character at the end of each line of a multi-line string, except for the last line.
  16. //You may also flatten multiline constants into a single line, if you prefer
  17. #define kLit1 "Local link:"
  18. #define kLit2 "file.html"
  19. #define kLit3 "External link:"
  20. #define kLit4 "http://server/dir/file.html"
  21. #define kLit5 "Link to anchor:"
  22. #define kLit6 "http://.../file.html#anchorName"
  23. #define kLit7 "Anchor in same file:"
  24. #define kLit8 "#anchorName"
  25. #define kLit9 "FTP link:"
  26. #define kLit10 "ftp://server/dir/file.txt"
  27. #define kLit11 "Mail link:"
  28. #define kLit12 "mailto:userName@host"
  29. #define kLit13 "Target Frame specifies the name of a Frame or window in"\
  30.                     " which this link's URL will be displayed.  Some special"\
  31.                     " values can be used:"
  32.                         
  33. #define kLit14 "_blank"
  34. #define kLit15 "Display in a new window."
  35. #define kLit16 "_self"
  36. #define kLit17 "Display in the same frame as the link."
  37. #define kLit18 "_parent"
  38. #define kLit19 "Display in the next enclosing frame."
  39. #define kLit20 "_top"
  40. #define kLit21 "Display in the outermost frame."
  41. #define kLit22 "&URL:"
  42. #define kLit23 "&Browse Files..."
  43. #define kLit24 "&Remove Link"
  44. #define kLit25 "Show &Examples"
  45. #define kLit26 "Hide &Examples"
  46. #define kLit27 "&Target Frame:"
  47. #define kLit28 "Extra &HTML:"
  48.  
  49. #define kLit73 "Use this window to set parameters for a selected link."
  50.  
  51. //Localized Fonts
  52. #if Platform_Mac
  53.     #define StaticFont         Font = {Geneva, 10, {Bold}}
  54.     #define EditFont           Font = {Geneva, 10, {Plain}}
  55.     #define PopupFont          Font = {Geneva, 10, {Plain}}
  56.     #define StdLabelFont     LabelFont = {Geneva, 10, {Bold}}
  57.     #define URLSampleFont     Font = {Geneva, 10, {Plain}}
  58.     #define ButtonFont        Font = {Geneva, 10, {Plain}}
  59. #else
  60.     #define StaticFont         Font = SystemFont
  61.     #define EditFont           Font = SystemFont
  62.     #define PopupFont          Font = SystemFont
  63.     #define StdLabelFont     LabelFont = SystemFont
  64.     #define URLSampleFont     Font = SystemFont
  65.     #define ButtonFont        Font = SystemFont
  66. #endif
  67. /************************** LOCALIZED STRING CONSTANTS END **************************************/
  68. /************************** LOCALIZED STRING CONSTANTS END **************************************/
  69. /************************** LOCALIZED STRING CONSTANTS END **************************************/
  70. /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
  71. /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
  72. /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
  73. //This section contains integer constants that are used to format this VDL program.
  74. //These are localizable - they only need to be changed if the localized strings 
  75. //are sufficiently longer than the US strings. Localize the strings first, then the constants.
  76. //Width of the first column of text in the upper half of the window
  77. #define kFirstColUpperWidth     110
  78. //Width of the first column of text in the lower half of the window
  79. #define kFirstColLowerWidth     70
  80. //Text to the left of the URL examples first column, and the target frame text. 
  81. #define kSampleTextLeftMargin 30
  82. #if Platform_Mac
  83.     //Constant used to derive the width of the palette
  84.     #define kBasicLinkPaletteWidth 340
  85.     
  86.     //Width of the "Target Frame:" and "Extra HTML" labels in the lower half of the window
  87.     #define kLabelWidth                86
  88.     #define kBrowseButtonWidth     105
  89.     #define kRemoveLinkButtonWidth 105
  90.     #define kHideShowExButtonWidth 105
  91. #else // !Platform_Mac
  92.     //Constant used to derive the width of the palette
  93.     #define kBasicLinkPaletteWidth 545
  94.     
  95.     //Pixels to subtract from the palette width to make the string kLit13 wordwrap correctly.
  96.     #define kTargetTextAdjustment 85
  97.     
  98.     //Width of the "Target Frame:" and "Extra HTML" labels in the lower half of the window
  99.     #define kLabelWidth                106
  100. #endif // else !Platform_Mac
  101. /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
  102. /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
  103. /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
  104. //No further localizable data past this point
  105. /************************** END LOCALIZABLE DATA ***************************************************/
  106. /************************** END LOCALIZABLE DATA ***************************************************/
  107. /************************** END LOCALIZABLE DATA ***************************************************/
  108.  
  109. #define LinkBack stdBackColor
  110.  
  111. Define(URLExamples)
  112.     VList(LinkBack)
  113.         {
  114.         HList()
  115.             {
  116.             StaticText( kLit1, Width = kFirstColUpperWidth, URLSampleFont);
  117.             StaticText( kLit2, URLSampleFont);
  118.             }
  119.         
  120.         HList()
  121.             {
  122.             StaticText( kLit3, Width = kFirstColUpperWidth, URLSampleFont);
  123.             StaticText( kLit4, URLSampleFont);
  124.             }
  125.         
  126.         HList()
  127.             {
  128.             StaticText( kLit5, Width = kFirstColUpperWidth, URLSampleFont);
  129.             StaticText( kLit6, URLSampleFont);
  130.             }
  131.         
  132.         HList()
  133.             {
  134.             StaticText( kLit7, Width = kFirstColUpperWidth, URLSampleFont);
  135.             StaticText( kLit8, URLSampleFont);
  136.             }
  137.         
  138.         HList()
  139.             {
  140.             StaticText( kLit9, Width = kFirstColUpperWidth, URLSampleFont);
  141.             StaticText( kLit10, URLSampleFont);
  142.             }
  143.         
  144.         HList()
  145.             {
  146.             StaticText( kLit11, Width = kFirstColUpperWidth, URLSampleFont);
  147.             StaticText( kLit12, URLSampleFont);
  148.             }
  149.         
  150.         } // URLExamples
  151. Define(TargetExamples)
  152.     VList(LinkBack)
  153.         {
  154.         #if Platform_Mac
  155.         StaticText( kLit13,
  156.                     Width = kBasicLinkPaletteWidth, URLSampleFont );
  157.         #else
  158.         StaticText( kLit13,
  159.                     Width = kBasicLinkPaletteWidth - kTargetTextAdjustment, URLSampleFont );
  160.         #endif
  161.         Spacer(Width=0,Height=4);
  162.         
  163.         HList()
  164.             {
  165.             Spacer(Width=kSampleTextLeftMargin,Height=0);
  166.             StaticText( kLit14, Width = kFirstColLowerWidth, URLSampleFont);
  167.             StaticText( kLit15, URLSampleFont);
  168.             }
  169.         
  170.         HList()
  171.             {
  172.             Spacer(Width=kSampleTextLeftMargin,Height=0);
  173.             StaticText( kLit16, Width = kFirstColLowerWidth, URLSampleFont);
  174.             StaticText( kLit17, URLSampleFont);
  175.             }
  176.         
  177.         HList()
  178.             {
  179.             Spacer(Width=kSampleTextLeftMargin,Height=0);
  180.             StaticText( kLit18, Width = kFirstColLowerWidth, URLSampleFont);
  181.             StaticText( kLit19, URLSampleFont);
  182.             }
  183.         
  184.         HList()
  185.             {
  186.             Spacer(Width=kSampleTextLeftMargin,Height=0);
  187.             StaticText( kLit20, Width = kFirstColLowerWidth, URLSampleFont);
  188.             StaticText( kLit21, URLSampleFont);
  189.             }
  190.         
  191.         } // TargetExamples
  192.         
  193. Define(MoreLinkChoices)
  194.     VList(Width = UseParent, LinkBack)
  195.         {
  196.         EditText( target, FilterProc = "SetLinkTarget",
  197.                      Label = kLit27, LabelAlignment = Right, LabelWidth = kLabelWidth,
  198.                       Width = UseParent, DropOnReturn, DropOnEnter, NoSmartQuotes,
  199.                       EditFont, StdLabelFont,
  200.                       NoSmartEdits, BackColor = {65535, 65535, 65535} );
  201.         Spacer(Height = 5);
  202.         
  203.         EditText( extraParams, FilterProc = "SetLinkExtras",
  204.                      Label = kLit28, LabelAlignment = Right, LabelWidth = kLabelWidth,
  205.                       Width = UseParent, DropOnReturn, DropOnEnter, NoSmartQuotes,
  206.                       EditFont, StdLabelFont,
  207.                       NoSmartEdits, BackColor = {65535, 65535, 65535} );
  208.         
  209.         Switch(showURLExamples)
  210.             {
  211.             case 0:
  212.                 Spacer(Width = 0, Height = 0);
  213.             
  214.             case 1:
  215.                 Margin(5,5,0,0, Width = UseParent)
  216.                     Call(TargetExamples);
  217.             }
  218.         
  219.         } // MoreLinkChoices
  220.  
  221. Define(BasicURLUpper)
  222.     VList(LinkBack, Width = kBasicLinkPaletteWidth)
  223.     {
  224.         Switch(canURL, LinkBack)
  225.         {
  226.             case 0:
  227.                 //HList(Width = UseParent)
  228.                 //    {
  229.                 //    Spacer(Width = 5, Height = 0);
  230.                 //    Margin(0,0,0,0)
  231.                 //        #if Platform_Mac
  232.                 //            VList(Width = UseParent, Height = 16)
  233.                 //                GenericView("DisabledURL");
  234.                 //        #else
  235.                 //            VList(Width = UseParent, Height = 19)
  236.                 //                GenericView("DisabledURL");
  237.                 //        #endif
  238.                 //    Spacer(Width = 5, Height = 0);
  239.                 //    GenericView("LinkShortcut");
  240.                 //    }
  241.             
  242.             case 1:
  243.                 HList(Width = UseParent)
  244.                 {
  245.                     Spacer(Width = 5, Height = 0);
  246.                     Margin(0,0,0,0)
  247.                         Tag(LinkURL)
  248.                             EditText( url, FilterProc = "SetLinkURL",
  249.                                           Label = kLit22, LabelAlignment = Right,
  250.                                           Width = UseParent, DropOnReturn, DropOnEnter, NoSmartQuotes,
  251.                                           NoSmartEdits, EditFont, StdLabelFont,
  252.                                           BackColor = {65535, 65535, 65535} );
  253.                     Spacer(Width = 5, Height = 0);
  254.                     GenericView("LinkShortcut");
  255.                 }
  256.         } // Switch(canURL) (BasicURLUpper)
  257.             
  258.         Spacer(Height = 5);
  259.             
  260.         HList()
  261.         {
  262.             Spacer(Width = 5, Height = 0);
  263.             PushButton( kLit23, 3015, "None", ButtonFont, 
  264.                         #if Platform_Mac
  265.                         Width = kBrowseButtonWidth,
  266.                         #endif
  267.                         BackColor = {57015, 57015, 57015} ); // ccEditFileLink
  268.             Spacer(Width=10, Height=0);
  269.                 
  270.             PushButton( kLit24, 3010, "None", ButtonFont , 
  271.                         #if Platform_Mac
  272.                         Width = kRemoveLinkButtonWidth,
  273.                         #endif
  274.                         BackColor = {57015, 57015, 57015} ); // ccRemoveLink
  275.             Spacer(Width=10, Height=0);
  276.                 
  277.             Switch(showURLExamples)
  278.             {
  279.                 case 0:
  280.                     #if Platform_Mac
  281.                         PushButton( kLit25, 3110, "None", Width =  kHideShowExButtonWidth, ButtonFont,
  282.                                         BackColor = {57015, 57015, 57015} ); // ccShowHideURLTipsPalette
  283.                     #else
  284.                         PushButton( kLit25, 3110, "None", ButtonFont,
  285.                                         BackColor = {57015, 57015, 57015} ); // ccShowHideURLTipsPalette
  286.                     #endif
  287.                     
  288.                 case 1:
  289.                     #if Platform_Mac
  290.                         PushButton( kLit26, 3110, "None" , Width = kHideShowExButtonWidth, ButtonFont,
  291.                                         BackColor = {57015, 57015, 57015} ); // ccShowHideURLTipsPalette
  292.                     #else
  293.                         PushButton( kLit26, 3110, "None", ButtonFont,
  294.                                         BackColor = {57015, 57015, 57015} ); // ccShowHideURLTipsPalette
  295.                     #endif
  296.             }
  297.         }
  298.     }
  299.     
  300. Margin(5,6,6,6,LinkBack)
  301.     VList(Width = kBasicLinkPaletteWidth )
  302.     {
  303.         Switch(canURL, LinkBack)
  304.         {
  305.             case 0:
  306.                 Margin(5,5,5,10)
  307.                     StaticText( kLit73, UseParWidth, Alignment = Center, EditFont );
  308.             
  309.             case 1:
  310.                 VList()
  311.                 {
  312.                     Call(BasicURLUpper);
  313.     
  314.                     Switch(showURLExamples)
  315.                     {
  316.                         case 0:
  317.                         Spacer(Width = 0, Height = 0);
  318.             
  319.                         case 1:
  320.                             Margin(kSampleTextLeftMargin + 5,5,0,0)
  321.                                 Call(URLExamples);
  322.             
  323.                     }
  324.         
  325.                     Spacer(Height = 3);
  326.         
  327.                     Switch(canURLExtras, Width = UseParent)
  328.                     {
  329.                         case 0:
  330.                             VList(Width = UseParent)
  331.                             {
  332.                                 Spacer(Height = 6);
  333.                                 Spacer(Height = 1, Width = UseParent);
  334.                                 Spacer(Height = 5, Width = 0);
  335.                             }    
  336.  
  337.                         default:
  338.                             VList(Width = UseParent)
  339.                             {
  340.                                 Spacer(Height = 6);
  341.                                 Spacer(Height = 1, Width = UseParent);
  342.                                 Spacer(Height = 5, Width = 0);
  343.                             }
  344.             
  345.                         #if !LITE_VERSION
  346.                         case 1:
  347.                             VList(Width = UseParent)
  348.                             {
  349.                                 HList(Width = UseParent)
  350.                                 {
  351.                                     // CheckBox(moreLinkChoices, "", Width = 16);
  352.                                     PictCheckBox(moreLinkChoices)
  353.                                     {
  354.                                         On(Draw, 'cicn', 1204);
  355.                                         Off(Draw, 'cicn',1203);
  356.                                         DisabledOn(Draw,  'cicn', 1204);
  357.                                         DisabledOff(Draw, 'cicn', 1203);
  358.                                         TrackingOn(Draw,  'cicn', 1206);
  359.                                         TrackingOff(Draw, 'cicn', 1205);
  360.                                     };
  361.                         
  362.                                     VList(Width = UseParent)
  363.                                     {
  364.                                         Spacer(Height = 5);
  365.                                         Spacer(Height = 1, Width = UseParent, BackColor = {25000, 25000, 25000});
  366.                                         Spacer(Height = 6, Width = 0);
  367.                                     }
  368.                                 }
  369.                     
  370.                                 Switch(moreLinkChoices , Width = UseParent)
  371.                                 {
  372.                                     case 0:
  373.                                         Spacer(Width = 0, Height = 0);
  374.                         
  375.                                     case 1:
  376.                                         Call(MoreLinkChoices);
  377.                                 } // Switch(moreLinkChoices)
  378.                             } // VList
  379.                         #endif //!LITE_VERSION
  380.                     } // Switch(canURLExtras)
  381.                 }
  382.         }
  383.         
  384.         #ifdef TryMe
  385.         Spacer(Height = 5, Width = UseParent, BackColor = White);
  386.         VList(BackColor = White, Width = UseParent)
  387.         {
  388.             StaticText("Debugging Utils:");
  389.             CheckBox("canURLExtras", canURLExtras);
  390.             CheckBox("moreLinkChoices", moreLinkChoices);
  391.             CheckBox("showURLExamples", showURLExamples);
  392.             CheckBox("canURL", canURL);    
  393.         }
  394.         #endif
  395.         
  396.     } // VList()
  397.