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

  1. // -----
  2. // VDL151.txt
  3. // Copyright 1996 Claris
  4. // -----
  5.  
  6. // Picture Editor
  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.  
  20. #define kLit1 "Copy this image (drag to insert a copy)"
  21. #define kLit2 "Selection Tool"
  22. #define kLit3 "Rectangular Link Tool"
  23. #define kLit4 "Circular Link Tool"
  24. #define kLit5 "Transparency Tool"
  25. #define kLit6 "Remove Transparency"
  26. #define kLit7 "Link Editor"
  27. #define kLit8 "Move Link To Front"
  28. #define kLit9 "Move Link To Back"
  29. #define kLit10 "Move Link Forward"
  30. #define kLit11 "Move Link Backward"
  31. #define kLit12 "Interlace"
  32. #define kLit13 "Don't Interlace"
  33. #define kLit14 "Default URL:"
  34. #define kLit15 "URL when not in a link"
  35. #define kLit16 "Links:"
  36. #define kLit17 "Show/hide link URLs"
  37. #define kLit18 "Show URLs"
  38. #define kLit19 "Hide URLs"
  39. #define kLit20 "Zoom:"
  40. #define kLit21 "Image zoom"
  41. #define kLit22 "6%"
  42. #define kLit23 "12%"
  43. #define kLit24 "25%"
  44. #define kLit25 "50%"
  45. #define kLit26 "100%"
  46. #define kLit27 "200%"
  47. #define kLit28 "400%"
  48. #define kLit29 "800%"
  49. #define kLit30 "1600%"
  50. #define kLit31 "Save"
  51. #define kLit32 "Create Server Side Image Map"
  52. #define kLit33 "Target Frame:"
  53. #define kLit34 "Extra HTML:"
  54. #define kLit35 "The name of target frame"
  55. #define kLit36 "More HTML in addition to default URL and target frame"
  56.  
  57.  
  58. //Note: the file name will probably not change, but the name of the "Help" folder
  59. //probably will. Note that the translated name MUST be 8 chars or less.
  60. #define kHelpURL "Help/ImageMap.htm"
  61. #define kHelpTitle "&Help"
  62.  
  63. //Localized Fonts
  64.  
  65. #if Platform_Mac
  66.     #define kStaticTextFont         Font = {Geneva, 10, {Plain}}
  67.     #define kBoldStaticFont         Font = {Geneva, 10, {Bold}}
  68.     #define kHelpFont                 Font = {Geneva, 9, {Italic}}
  69.     #define StdLabelFont             LabelFont = {Geneva, 10, {Bold}}
  70. #else
  71.     #define kStaticTextFont         Font = SystemFont
  72.     #define kBoldStaticFont         Font =  SystemFont
  73.     #define StdLabelFont             LabelFont = SystemFont
  74. #endif
  75.  
  76.  
  77. /************************** LOCALIZED STRING CONSTANTS END **************************************/
  78. /************************** LOCALIZED STRING CONSTANTS END **************************************/
  79. /************************** LOCALIZED STRING CONSTANTS END **************************************/
  80.  
  81.  
  82.  
  83. /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
  84. /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
  85. /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
  86.  
  87. //This section contains integer constants that are used to format this VDL program.
  88. //These are localizable - they only need to be changed if the localized strings 
  89. //are sufficiently longer than the US strings. Localize the strings first, then the constants.
  90.  
  91. #if Platform_Win
  92. //Width of the "Links" popup
  93. #define kLinksPopupWidth     165
  94. //Width of the "Zoom" popup
  95. #define kZoomPopupWidth        120
  96. #define kDefaultURLLabelWidth 110        //@ykh 071597
  97. #define kEditTextWidth        240
  98. #else
  99. #define kDefaultURLLabelWidth 94        //@ykh 071597
  100. #define kEditTextWidth        220
  101. #endif
  102.  
  103.  
  104. /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
  105. /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
  106. /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
  107.  
  108. //No further localizable data past this point
  109.  
  110. /************************** END LOCALIZABLE DATA ***************************************************/
  111. /************************** END LOCALIZABLE DATA ***************************************************/
  112. /************************** END LOCALIZABLE DATA ***************************************************/
  113.  
  114. #define kStandardSpace 9
  115.  
  116.  
  117. #if Platform_Mac
  118.     #define ToolSep GenericView("ToolSepView");
  119. #else
  120.     #define ToolSep 
  121. #endif
  122.  
  123. #define DialogBack stdBackColor
  124.  
  125.  
  126. Define(HotspotCreationTools)
  127.     HList(FullyCovered,DialogBack)
  128.         {
  129.         Spacer(Width = kStandardSpace, Height = UseParent);
  130.         ToolSep
  131.         PictRadioButton(3111, 10, EH kLit2) //Arrow
  132.             {
  133.             On(Draw, 'cicn', 10007);
  134.             Off(Draw, 'cicn', 10006);
  135.             DisabledOn(Draw, 'cicn', 10008);
  136.             DisabledOff(Draw, 'cicn', 10008);
  137.             TrackingOn(Draw, 'cicn', 10007);
  138.             TrackingOff(Draw, 'cicn', 10007);
  139.             };
  140.         ToolSep
  141.         PictRadioButton(3111, 0, EH kLit3) //Rect
  142.             {
  143.             On(Draw, 'cicn', 10001);
  144.             Off(Draw, 'cicn', 10000);
  145.             DisabledOn(Draw, 'cicn', 10002);
  146.             DisabledOff(Draw, 'cicn', 10002);
  147.             TrackingOn(Draw, 'cicn', 10001);
  148.             TrackingOff(Draw, 'cicn', 10001);
  149.             };
  150.         ToolSep
  151.         PictRadioButton(3111, 1, EH kLit4) //circle
  152.             {
  153.             On(Draw, 'cicn', 10004);
  154.             Off(Draw, 'cicn', 10003);
  155.             DisabledOn(Draw, 'cicn', 10005);
  156.             DisabledOff(Draw, 'cicn', 10005);
  157.             TrackingOn(Draw, 'cicn', 10004);
  158.             TrackingOff(Draw, 'cicn', 10004);
  159.             };
  160.         }
  161.         
  162. Define(HotspotEditingTools)
  163.     HList(FullyCovered,DialogBack)
  164.         {
  165.         Spacer(Width = kStandardSpace, Height = UseParent);
  166.         ToolSep
  167.         PictPushButton(3109, "None", EH kLit7) // "Insert/Edit Link"
  168.             {
  169.             Enabled (Draw, 'cicn', 13506);
  170.             Disabled(Draw, 'cicn', 13508); 
  171.             Tracking(Draw, 'cicn', 13507);
  172.             };
  173.         ToolSep
  174.         
  175.         Spacer(Height = UseParent, Width = kStandardSpace);
  176.         ToolSep
  177.         PictPushButton(1212, "None", EH kLit8) // ccMoveToFront
  178.             {
  179.             Enabled (Draw, 'cicn', 10070);
  180.             Disabled(Draw, 'cicn', 10072); 
  181.             Tracking(Draw, 'cicn', 10071);
  182.             };
  183.         ToolSep
  184.         PictPushButton(1213, "None", EH kLit9) // ccMoveToBack
  185.             {
  186.             Enabled (Draw, 'cicn', 10080);
  187.             Disabled(Draw, 'cicn', 10082); 
  188.             Tracking(Draw, 'cicn', 10081);
  189.             };
  190.         ToolSep
  191.         PictPushButton(1214, "None", EH kLit10) // ccMoveForward
  192.             {
  193.             Enabled (Draw, 'cicn', 10090);
  194.             Disabled(Draw, 'cicn', 10092); 
  195.             Tracking(Draw, 'cicn', 10091);
  196.             };
  197.         ToolSep
  198.         PictPushButton(1215, "None", EH kLit11) // ccMoveBackward
  199.             {
  200.             Enabled (Draw, 'cicn', 10100);
  201.             Disabled(Draw, 'cicn', 10102); 
  202.             Tracking(Draw, 'cicn', 10101);
  203.             };
  204.         ToolSep
  205.         }
  206.         
  207. Define(UpperToolbar)
  208.     Margin(3,7,0,5,Width = UseParent, DialogBack)
  209.         VList(Width = UseParent, DialogBack)
  210.             {
  211.             HList(Width = UseParent, FullyCovered)
  212.                 {
  213.                 Switch(imageType)
  214.                     {
  215.                     case 999: 
  216.                          Spacer(Height = 0, Width = 0);
  217.                     
  218.                     default:
  219.                         VList(Height = UseParent)
  220.                             {
  221.                             Margin(1,0,0,0)
  222.                                 PictPushButton( 3122, "None", Draggable,
  223.                                                          EH kLit1 )
  224.                                     {
  225.                                     On(Draw, 'cicn', 1006);
  226.                                     Disabled(Draw, 'cicn', 1006);
  227.                                     Tracking(Draw, 'cicn', 1006);
  228.                                     };
  229.                             Spacer(Height = UseParent, Width = UseParent);
  230.                             }
  231.                     } //Switch
  232.                 
  233.  
  234.                 Switch(GIFSettingsOnly)
  235.                     {
  236.                     case 1: 
  237.                         Spacer(Height = UseParent, Width = kStandardSpace);
  238.                             
  239.                     default:
  240.                         Call(HotspotCreationTools);
  241.                     }
  242.                 
  243.                 ToolSep
  244.                 
  245.                 
  246.                 Switch(imageType)
  247.                     {
  248.                     case 0:  /* GIF */
  249.                         HList()
  250.                             {
  251.                             
  252.                             Switch(GIFSettingsOnly)
  253.                                 {
  254.                                 case 1: 
  255.                                     Spacer(Height = 0, Width = 0);
  256.                                     
  257.                                 default:    
  258.                                     HList()
  259.                                         {
  260.                                         PictRadioButton(3111, 11, EH kLit5) //Eyedropper
  261.                                             {
  262.                                             On(Draw, 'cicn', 10010);
  263.                                             Off(Draw, 'cicn', 10009);
  264.                                             DisabledOn(Draw, 'cicn', 10011);
  265.                                             DisabledOff(Draw, 'cicn', 10011);
  266.                                             TrackingOn(Draw, 'cicn', 10010);
  267.                                             TrackingOff(Draw, 'cicn', 10010);
  268.                                             };
  269.                                         ToolSep
  270.                                         Spacer(Height = UseParent, Width = kStandardSpace);
  271.                                         ToolSep
  272.                                         }
  273.                                 }
  274.                                 
  275.                             PictPushButton(3320, "None", EH kLit6) // ccMakeOpaqueImage
  276.                                 {
  277.                                 Enabled (Draw, 'cicn', 10050);
  278.                                 Disabled(Draw, 'cicn', 10052); 
  279.                                 Tracking(Draw, 'cicn', 10051);
  280.                                 };
  281.                             ToolSep
  282.                             }
  283.                     
  284.                     default:
  285.                         Spacer(Height = 0, Width = 0);
  286.                     }
  287.                     
  288.                 Switch(GIFSettingsOnly)
  289.                     {
  290.                     case 1: 
  291.                         Spacer(Height = 0, Width = 0);
  292.                         
  293.                     default:
  294.                         Call(HotspotEditingTools);
  295.                     }
  296.                 
  297.                 Spacer(Height = UseParent, Width = kStandardSpace);
  298.                 
  299.                 Switch(imageType)
  300.                     {
  301.                     case 0:  /* GIF */
  302.                         HList()
  303.                             {
  304.                             ToolSep
  305.                             PictRadioButton( interlace, 1, // ccPictInterlaceCmd
  306.                                                   EH kLit12 )
  307.                                 {
  308.                                 On         (Draw, 'cicn', 10110);
  309.                                 Off        (Draw, 'cicn', 10111);
  310.                                 DisabledOn (Draw, 'cicn', 10112);
  311.                                 DisabledOff(Draw, 'cicn', 10112);
  312.                                 TrackingOn (Draw, 'cicn', 10110);
  313.                                 TrackingOff(Draw, 'cicn', 10110);
  314.                                 };
  315.                             ToolSep
  316.                             PictRadioButton( interlace, 0, // ccPictInterlaceCmd
  317.                                                   EH kLit13 )
  318.                                 {
  319.                                 On         (Draw, 'cicn', 10120);
  320.                                 Off        (Draw, 'cicn', 10121);
  321.                                 DisabledOn (Draw, 'cicn', 10122);
  322.                                 DisabledOff(Draw, 'cicn', 10122);
  323.                                 TrackingOn (Draw, 'cicn', 10120);
  324.                                 TrackingOff(Draw, 'cicn', 10120);
  325.                                 };
  326.                             ToolSep
  327.                             Spacer(Width = kStandardSpace, Height = UseParent);
  328.                             }
  329.                     
  330.                     default:
  331.                         Spacer(Height = 0, Width = 0);
  332.                     }
  333.  
  334.                     
  335.                 
  336.             #if Platform_Mac
  337.                 Spacer(Width = 3, Height = UseParent);
  338.                 Margin(0,8,0,0)
  339.                 HelpView(Width = UseParent, Alignment = Left, Height = 15, kHelpFont);
  340.             #else
  341.                 //@ykh 071697 I tried this to fix the problem on Windows.
  342.                 // Problem is: this rect is not updated.
  343.                 Spacer(Width = UseParent, Height = UseParent);
  344.                 
  345.                 //Margin(0,24,0,0)
  346.                 //HelpView(Width = UseParent, Alignment = Left, Height = 0, kHelpFont);
  347.                             
  348.             #endif
  349.                 
  350.                 } // HList (first row)
  351.             } // VList
  352.             
  353. Define(URLEntry)
  354.     //@ykh 081197 Added target frame and link extra
  355.     VList(Width = UseParent, DialogBack)
  356.         {
  357.         HList(DialogBack, Width = UseParent)
  358.             {
  359.             Margin(4,3,6,0)
  360.                 StaticText(kLit14, Alignment = Right, Width = kDefaultURLLabelWidth, kBoldStaticFont, EH kLit15 );
  361.             
  362.             EditText( defaultURL, FilterProc = "SetImageDefaultURL",
  363.                           Width = kEditTextWidth, DropOnReturn, NoSmartQuotes,    //DropOnEnter causes multiple cmd binding.
  364.                           NoSmartEdits,
  365.                           DontBindNavigationKeys, //@ykh 091797 bug 4622
  366.                           BackColor = {65535, 65535, 65535},
  367.                           EH kLit15 );
  368.                           
  369.             Margin(4, 0, 0, 0)          
  370.                 GenericView("ImageLinkShortcut");
  371.             } // HList (second row)
  372.  
  373.         //@ykh 081197 begin Added target frame and link extra
  374.         Spacer(Height = 3, Width = UseParent);
  375.         
  376.         EditText( defaultTarget, FilterProc = "SetImageDefaultLinkTarget",
  377.                      Label = kLit33, LabelAlignment = Right, LabelWidth = kDefaultURLLabelWidth + 5,
  378.                       Width = kDefaultURLLabelWidth + kEditTextWidth + 10, 
  379.                       DropOnReturn, NoSmartQuotes,    //DropOnEnter causes multiple cmd binding.
  380.                       DontBindNavigationKeys, //@ykh 091797 bug 4622
  381.                       StdLabelFont, 
  382.                       NoSmartEdits, BackColor = {65535, 65535, 65535}, EH kLit35  );
  383.         Spacer(Height = 3, Width = UseParent);
  384.         
  385.         EditText( extraDefParams, FilterProc = "SetImageDefaultLinkExtras",
  386.                      Label = kLit34, LabelAlignment = Right, LabelWidth = kDefaultURLLabelWidth + 5,
  387.                       Width = kDefaultURLLabelWidth + kEditTextWidth + 10, 
  388.                       DropOnReturn, NoSmartQuotes,    //DropOnEnter causes multiple cmd binding.
  389.                       DontBindNavigationKeys, //@ykh 091797 bug 4622
  390.                       StdLabelFont,
  391.                       NoSmartEdits, BackColor = {65535, 65535, 65535}, EH kLit36  );
  392.         //@ykh 081197 end Added target frame and link extra
  393.         }
  394.     
  395.             
  396.             
  397. Define(URLToolbar)
  398.     HList(DialogBack, Width = UseParent)
  399.         {
  400.         Spacer(Width=4, Height=0);
  401.  
  402.         #if Platform_Mac
  403.             Margin(0,1,4,0)
  404.                 StaticText( kLit20, Alignment = Right, Width = kDefaultURLLabelWidth,
  405.                                   kBoldStaticFont);
  406.             IntegerPopup( "", 0, 3121, // ccZoomToCmd
  407.                                  kStaticTextFont,
  408.                                  EH kLit21, DontBind )
  409.         #else
  410.             Spacer(Width=kDefaultURLLabelWidth-30, Height=0);
  411.             IntegerPopup( kLit20, Default, 3121, Width = kZoomPopupWidth, // ccZoomToCmd
  412.                                  EH kLit21, DontBind )
  413.         #endif
  414.             {
  415.             IntItem(kLit22, 5);
  416.             IntItem(kLit23, 10);
  417.             IntItem(kLit24, 25);
  418.             IntItem(kLit25, 50);
  419.             IntItem(kLit26, 100);
  420.             IntItem(kLit27, 200);
  421.             
  422.             #if Platform_Mac
  423.             IntItem(kLit28, 400);
  424.             IntItem(kLit29, 800);
  425.             IntItem(kLit30, 1600);
  426.             #endif
  427.             };
  428.         
  429.         Spacer(Width = 20, Height = 0);
  430.         
  431.         //@ykh 070997 begin Single_Imgmap_Editor_Support
  432.         Switch(GIFSettingsOnly)
  433.         {
  434.             case 1:        //stand alone img editor 
  435.                 Spacer(Height = 0, Width = 0);
  436.                 
  437.             default:    //client map editor
  438.                 HList(DialogBack, Width = UseParent)
  439.                 {
  440.                 #if Platform_Mac
  441.                     Margin(0,1,4,0)
  442.                         StaticText( kLit16, Alignment = Left, Width = 36,
  443.                                           kBoldStaticFont);
  444.                     IntegerPopup( "", 0, 3123, // ccShowURLsCmd
  445.                                          kStaticTextFont,
  446.                                          EH kLit17, DontBind )
  447.                 #else
  448.                     IntegerPopup( kLit16, Default, 3123, Width = kLinksPopupWidth, // ccShowURLsCmd
  449.                                          EH kLit17, DontBind )
  450.                 #endif
  451.                     {
  452.                     IntItem(kLit18,    1);
  453.                     IntItem(kLit19, 0);
  454.                     };
  455.                     //Spacer(Height = 0, Width = 0);
  456.                 }
  457.         }
  458.         //@ykh 070997 end Single_Imgmap_Editor_Support
  459.         
  460.         } // HList (URLToolbar)
  461.  
  462.     
  463.     
  464.     
  465. //VList(Width = UseParent, Height = UseParent, DialogBack)
  466. VList(Width = UseParent, Height = UseParent, DialogBack)
  467.     {
  468.     Call(UpperToolbar);
  469.     Switch(GIFSettingsOnly)
  470.         {
  471.         case 1: 
  472.             Spacer(Height = 0, Width = 0);
  473.             
  474.         default:
  475.             Call(URLEntry);
  476.         }
  477.     
  478.     Spacer(Height = 4, Width = UseParent);
  479.  
  480.     //@ykh 071597 moved it from bottom.
  481.     Call(URLToolbar);
  482.     Spacer(Height = 3, Width = UseParent);
  483.     
  484.     HList(DialogBack, Width = UseParent)
  485.     {    
  486.         //@ykh 070997 begin Single_Imgmap_Editor_Support
  487.         Switch(GIFSettingsOnly)
  488.             {
  489.             case 1:        //stand alone img editor 
  490.                 Spacer(Height = 3, Width = UseParent);
  491.                 
  492.             default:    //client map editor
  493.                 //VList(Height = UseParent)
  494.                 HList(DialogBack, Width = UseParent)
  495.                 {
  496.                     Spacer(Height = UseParent, Width = kDefaultURLLabelWidth + 9);
  497.                     //Margin(0,6,0,0)
  498.                     //HList(DialogBack, Width = UseParent)
  499.                     //{
  500.                         WidowCheckBox(kLit32, saveServerSideMap, kBoldStaticFont, 
  501.                                     Width = 190, Height = 18);
  502.                         Spacer(Height = UseParent, Width = UseParent);
  503.                     //}
  504.                 }
  505.             }
  506.         //@ykh 070997 end Single_Imgmap_Editor_Support
  507.     }
  508.         
  509.     Spacer(Height = 3, Width = UseParent);
  510.  
  511.     #if Platform_Win
  512.     Spacer(Height = 1, Width = UseParent, BackColor = DkGray);
  513.     #endif
  514.     
  515.     Spacer(Height = 1, Width = UseParent, BackColor = Black);
  516.     
  517.     Switch(GIFSettingsOnly)
  518.         {
  519.         case 1:
  520.             GenericView("PictEditorViewProc", DisableHotspots);
  521.     
  522.         default: 
  523.             GenericView("PictEditorViewProc");
  524.         }
  525.         
  526.     //Spacer(Height = UseParent, Width = UseParent, BackColor = {65535, 0,0});
  527.     
  528.     //@ykh 071597 commented out, since we moved URLToolbar up
  529.     //#if Platform_Win
  530.     //Spacer(Height = 1, Width = UseParent, BackColor = Gray);
  531.     //Spacer(Height = 1, Width = UseParent, BackColor = White);
  532.     //Spacer(Height = 1, Width = UseParent, BackColor = DkGray);
  533.     //#else
  534.     //Spacer(Height = 1, Width = UseParent, BackColor = Black);
  535.     //#endif
  536.     
  537.     //@ykh 071597 commented out, since we moved URLToolbar up
  538.     //Spacer(Height = 4, Width = UseParent);
  539.     
  540.     //@ykh 071597 moved it up.
  541.     //Call(URLToolbar);
  542.     //Spacer(Height = 4, Width = UseParent);
  543.     
  544.     
  545.     #ifdef TryMe0
  546.     
  547.         // This is just used during testing.
  548.         Spacer(Height = 10);
  549.         StaticText("Debugging Menu:");
  550.         Spacer(Height = 10);
  551.         IntegerPopup("Image Type:", Default, imageType, Width = 150, NoCombo, kPopupFont)
  552.             {
  553.             IntItem("GIF", 0);
  554.             IntItem("JPEG",1);
  555.             IntItem("QT Movie",2);
  556.             IntItem("Unknown", 3);
  557.             IntItem("Client Side Map", 999);
  558.             };
  559.             
  560.         CheckBox("GIFSettingsOnly", GIFSettingsOnly);
  561.     #endif
  562.     }
  563.  
  564.