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

  1. // -----
  2. // VDL155.txt = HFindDlg.txt
  3. // Copyright 1996-97 Claris
  4. // -----
  5. // Find Dialog
  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. // Search In files popup menu items - don't need keyboard shortcuts
  17. #define kFrontmostDoc  "Top Page"
  18. #define kAllOpenDocs   "All Open Pages"
  19. #define kFrontSiteSel  "Selected Pages In Top Site"
  20. #define kFrontSiteAll  "All Pages In Top Site"
  21. #if Dialog_Pixels==100
  22. #define kAllSitesSel   "Selected Pages In All Open Sites"
  23. #else
  24. #define kAllSitesSel   "Selected Pages In All Open Sites      "
  25. #endif
  26. #define kAllSitesAll   "All Pages In All Open Sites"
  27.  
  28. // Search In Mode popup menu items - don't need keyboard shortcuts
  29. #define kInEditModeItemText   "In Edit Mode"
  30. #define kInBrowseModeItemText "In Browse Mode"
  31. #define kInHTMLModeItemText   "In HTML Mode"
  32.  
  33. // labels - need keyboard shortcuts
  34. #define kSearchInLabel "Search &In:"
  35. #define kLit15 "&Find:"
  36. #define kLit16 "Change &To:"
  37.  
  38. // check boxes
  39. #define kLit9     "Whole Wo&rd"
  40. #define kLit12 "Case &Sensitive"
  41. #define kLit13 "&Backwards"
  42. #define kLit17 "Search &Backwards"
  43. #define kLit14 "&Wrap Around"
  44. #define kStayOnTop  "Stay On Top"  // (No longer used)
  45. #define kHTMLSearch "In HTML Source"  // (No longer used)
  46.  
  47. // buttons
  48. #define kLit1     "&Change"
  49. #define kLit5     "Change &All"
  50. #define kLit6     "Chan&ge, Find"
  51. #define kLit7     "Find &Next"
  52. #define kLit8     "Find &Prev"
  53.  
  54. // kbd shortcuts used by main menu, which actually aren't in scope
  55. // when the find/change is up...:  F E V I O S T W H(and D B on debug build)
  56.  
  57. //Localizable Fonts
  58. #if Platform_Mac
  59.     #define StaticFont         Font = {Geneva, 10, {Bold}}
  60.     #define EditFont           Font = {Geneva, 10, {Plain}}
  61.     #define kCheckBoxFont    Font = {Geneva, 10, {Bold}}
  62.     #define PopupFont          Font = {Geneva, 10, {Plain}}
  63.     #define StdLabelFont     LabelFont = {Geneva, 10, {Bold}}
  64.     #define ButtonFont        Font = {Geneva, 10, {Plain}}
  65. #else
  66.     #define StaticFont         Font = SystemFont
  67.     #define EditFont           Font = SystemFont
  68.     #define kCheckBoxFont    Font = SystemFont
  69.     #define PopupFont          Font = SystemFont
  70.     #define StdLabelFont     LabelFont = SystemFont
  71.     #define ButtonFont        Font = SystemFont
  72. #endif
  73. /************************** LOCALIZED STRING CONSTANTS END **************************************/
  74. /************************** LOCALIZED STRING CONSTANTS END **************************************/
  75. /************************** LOCALIZED STRING CONSTANTS END **************************************/
  76.  
  77. /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
  78. /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
  79. /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
  80. //This section contains integer constants that are used to format this VDL program.
  81. //These are localizable - they only need to be changed if the localized strings 
  82. //are sufficiently longer than the US strings. Localize the strings first, then the constants.
  83.  
  84. //Widths of the items
  85. #define kSearchInIndent          12
  86. #define kFindLabelWidth          70
  87. #define kOptionsHOffset          kFindLabelWidth+5
  88. #define kRadioButtonWidth        120
  89. #define kCaseSensitiveSlimCheckboxWidth   kSlimCheckboxWidth+15
  90. #define kSearchBackwardsSlimCheckboxWidth kSlimCheckboxWidth-15
  91. #define kCaseSensitiveWideCheckboxWidth   kWideCheckboxWidth+15
  92. #define kSearchBackwardsWideCheckboxWidth kWideCheckboxWidth-15
  93. #define kButtonWidth             90
  94. #define kButtonSpacing           10
  95. #if Platform_Mac
  96. #define kSlimCheckboxWidth       110
  97. #define kWideCheckboxWidth       160
  98. #define kEditTextWidth           208
  99. #define kWidthSearchIn           Default
  100. #else
  101. #define kSlimCheckboxWidth       100
  102. #define kWideCheckboxWidth       130
  103. #define kEditTextWidth           190
  104. #define kWidthSearchIn           60
  105. #endif
  106.  
  107. /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
  108. /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
  109. /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
  110.  
  111. //No further localizable data past this point
  112. /************************** END LOCALIZABLE DATA ***************************************************/
  113. /************************** END LOCALIZABLE DATA ***************************************************/
  114. /************************** END LOCALIZABLE DATA ***************************************************/
  115.  
  116. // command codes - copied from CommandCode.h
  117. #define ccFindButton      1170
  118. #define ccReplace         1167
  119. #define ccReplaceAll      1168
  120. #define ccReplaceThenFind 1169
  121.  
  122. // menu items for Search In popup - from FindDialog.h
  123. #define kInFrontmostDoc  0
  124. #define kInAllOpenDocs   1
  125. #define kInFrontSiteSel  2
  126. #define kInFrontSiteAll  3
  127. #define kInAllSitesSel   4
  128. #define kInAllSitesAll   5
  129.  
  130. // menu items for Search In Mode popup - from FindDialog.h
  131. #define kInEditMode   0  // == kEditVisual (in WidowR.h)
  132. #define kInBrowseMode 1  // == kBrowseMode (in WidowR.h)
  133. #define kInHTMLMode   2  // == kHTMLMode (in WidowR.h)
  134.  
  135.  
  136. DeclareNamedStatement("SearchInFiles")
  137.     HList(stdBackColor)
  138.         {
  139.         Spacer(Width = kSearchInIndent);
  140.         ///Spacer(Width = kOptionsHOffset);
  141.         IntegerPopup(kSearchInLabel, kWidthSearchIn, searchIn, PopupFont, StdLabelFont)
  142.             {
  143.             IntItem(kFrontmostDoc, kInFrontmostDoc);
  144.             IntItem(kAllOpenDocs,  kInAllOpenDocs);
  145.             IntItem(kFrontSiteSel, kInFrontSiteSel);
  146.             IntItem(kFrontSiteAll, kInFrontSiteAll);
  147.             IntItem(kAllSitesSel,  kInAllSitesSel);
  148.             IntItem(kAllSitesAll,  kInAllSitesAll);
  149.             };
  150.         } // HList
  151.  
  152. DeclareNamedStatement("SearchInMode")
  153.     HList(stdBackColor)
  154.         {
  155.         Spacer(Width = 20);
  156.         ///WidowCheckBox(kHTMLSearch, searchInMode, Height = 18, kCheckBoxFont);
  157.         IntegerPopup("", Default, searchInMode, PopupFont, StdLabelFont)
  158.             {
  159.             IntItem(kInEditModeItemText, kInEditMode);
  160.             IntItem(kInBrowseModeItemText, kInBrowseMode);
  161.             IntItem(kInHTMLModeItemText, kInHTMLMode);
  162.             };
  163.         } // HList
  164.  
  165. DeclareNamedStatement("HorizontalOptions")
  166.     HList(Width = UseParent, stdBackColor)
  167.         {
  168.         Switch (docIsRoman)
  169.             {
  170.             case 1:
  171.             default:
  172.                 WidowCheckBox(kLit9, searchStringType, Width = kSlimCheckboxWidth, Height = 18, kCheckBoxFont);
  173.             case 0:
  174.                 Switch (searchIn)
  175.                     {
  176.                     case kInFrontmostDoc:
  177.                         Spacer(Width = kSlimCheckboxWidth, Height = 18);
  178.                     default:
  179.                         WidowCheckBox(kLit9, searchStringType, Width = kSlimCheckboxWidth, Height = 18, kCheckBoxFont);
  180.                     }
  181.             }
  182.         WidowCheckBox(kLit12, caseSensitive, Width = kCaseSensitiveSlimCheckboxWidth, Height = 18, kCheckBoxFont);
  183.         WidowCheckBox(kLit13, searchBackwards, Width = kSearchBackwardsSlimCheckboxWidth, Height = 18, kCheckBoxFont);
  184.         Switch (searchIn)
  185.             {
  186.             default:
  187.                 WidowCheckBox(kLit14, wrapAround, Width = kSlimCheckboxWidth, Height = 18, kCheckBoxFont);
  188.             case kInAllOpenDocs:
  189.                 Spacer(Width = kSlimCheckboxWidth, Height = 18);
  190.             }
  191.         }
  192.  
  193. DeclareNamedStatement("VerticalOptions")
  194.     HList(Width = UseParent, stdBackColor)
  195.         {
  196.         Spacer(Width = kOptionsHOffset);
  197.         VList()
  198.             {
  199.             WidowCheckBox(kLit12, caseSensitive, Width = kCaseSensitiveWideCheckboxWidth, Height = 18, kCheckBoxFont);
  200.             Switch (docIsRoman)
  201.                 {
  202.                 case 1:
  203.                 default:
  204.                     WidowCheckBox(kLit9, searchStringType, Width = kSlimCheckboxWidth, Height = 18, kCheckBoxFont);
  205.                 case 0:
  206.                     Switch (searchIn)
  207.                         {
  208.                         case kInFrontmostDoc:
  209.                             Spacer(Width = kWideCheckboxWidth, Height = 18);
  210.                         default:
  211.                             WidowCheckBox(kLit9, searchStringType, Width = kSlimCheckboxWidth, Height = 18, kCheckBoxFont);
  212.                         }
  213.                 }
  214.             }
  215.         Spacer(Width = 0);
  216.         VList()
  217.             {
  218.             WidowCheckBox(kLit17, searchBackwards, Width = kSearchBackwardsWideCheckboxWidth, Height = 18, kCheckBoxFont);
  219.             Switch (searchIn)
  220.                 {
  221.                 default:
  222.                     WidowCheckBox(kLit14, wrapAround, Width = kWideCheckboxWidth, Height = 18, kCheckBoxFont);
  223.                 case kInAllOpenDocs:
  224.                     Spacer(Width = kWideCheckboxWidth, Height = 18);
  225.                 }
  226.             }
  227.         }
  228.  
  229. DeclareNamedStatement("Buttons")
  230.     HList(stdBackColor)
  231.         {
  232.         Spacer(Width = kButtonSpacing, Height = 0);
  233.         UnframedButton(kLit5, ccReplaceAll, "None", Width = kButtonWidth, ButtonFont);
  234.         Spacer(Width = kButtonSpacing, Height = 0);
  235.         UnframedButton(kLit1, ccReplace, "None", Width = kButtonWidth, ButtonFont);
  236.         Spacer(Width = kButtonSpacing, Height = 0);
  237.         UnframedButton(kLit6, ccReplaceThenFind, "None", Width = kButtonWidth, ButtonFont);
  238.         Spacer(Width = kButtonSpacing, Height = 0);
  239.         Switch (searchBackwards)
  240.             {
  241.             default:
  242.             case 0:
  243.                 DefaultButton(kLit7, ccFindButton, "None" , Width = kButtonWidth, ButtonFont);
  244.             case 1:
  245.                 DefaultButton(kLit8, ccFindButton, "None" , Width = kButtonWidth, ButtonFont);
  246.             }
  247.         Spacer(Width = kButtonSpacing, Height = 0);
  248.         } // HList(stdBackColor)
  249.  
  250. DeclareNamedStatement("HorizontalFindChange")
  251.     HList(stdBackColor, Width = UseParent)
  252.         {
  253.         VList()
  254.             {
  255.             StaticText(kLit15, StaticFont);
  256.             EditText( FindText, Width = kEditTextWidth,
  257.                          /*DropOnReturn, DropOnEnter, */ 
  258.                          EditFont, StdLabelFont,
  259.                          FlushImmediately, NoSmartQuotes, NoSmartEdits, 
  260.                          BackColor = White);
  261.             }
  262.         
  263.         Spacer(Width = 15, Height = 0);
  264.         VList(ReplaceText)
  265.             {
  266.             StaticText(kLit16, StaticFont);
  267.             EditText( ReplaceText, Width = kEditTextWidth,
  268.                         FlushImmediately, NoSmartQuotes, NoSmartEdits, 
  269.                        EditFont, StdLabelFont,
  270.                         BackColor = White);
  271.             }
  272.         Spacer(Width = 5, Height = 0);
  273.         }
  274.  
  275. DeclareNamedStatement("VerticalFindChange")
  276.     VList(stdBackColor, Width = UseParent)
  277.         {
  278.         HList(Width = UseParent)
  279.             {
  280.             EditText( FindText, 
  281.                          Label = kLit15, LabelAlignment = Right, LabelWidth =  kFindLabelWidth, 
  282.                          FlushImmediately, NoSmartQuotes, NoSmartEdits, 
  283.                         EditFont, StdLabelFont,
  284.                          BackColor = White);
  285.             Spacer(Width = 5, Height = 0);
  286.             }    
  287.         Spacer(Width = 0, Height = 5);
  288.         HList(Width = UseParent)
  289.             {
  290.             EditText( ReplaceText, 
  291.                          Label = kLit16, LabelAlignment = Right, LabelWidth =  kFindLabelWidth, 
  292.                          FlushImmediately, NoSmartQuotes, NoSmartEdits, 
  293.                         EditFont, StdLabelFont,
  294.                          BackColor = White);
  295.             Spacer(Width = 5, Height = 0);
  296.             }    
  297.         }
  298.  
  299. Define(Divider)
  300.     Margin(6,0,3,0, Width = UseParent, stdBackColor)
  301.         VList(Width = UseParent)
  302.             {
  303.             Spacer(Width = 0, Height = 4, ScaleV);
  304.             Spacer(Height = 1, Width = UseParent, BackColor = {20000,20000,20000});
  305.             Spacer(Height = 1, Width = UseParent, BackColor = {62000, 62000, 62000});
  306.             Spacer(Width = 0, Height = 4, ScaleV);
  307.             }
  308.  
  309. Define(DividerV)
  310.     Margin(0,6,0,3, Height = UseParent, stdBackColor)
  311.         HList(Height = UseParent)
  312.             {
  313.             Spacer(Width = 4, Height = 0, ScaleH);
  314.             Spacer(Width = 1, Height = UseParent, BackColor = {20000,20000,20000});
  315.             Spacer(Width = 1, Height = UseParent, BackColor = {62000, 62000, 62000});
  316.             Spacer(Width = 4, Height = 0, ScaleH);
  317.             }
  318.  
  319.  
  320. Margin(4, 2, 4, 4, stdBackColor)
  321.     HList()
  322.     {
  323.     VList()
  324.     {
  325.     Spacer(Width = 0, Height = 5);
  326.     HList()
  327.         {
  328.         IncludeNamedStatement("SearchInFiles");
  329.         Switch(showStayOnTop)
  330.             {
  331.             default:
  332.             case 0: 
  333.                 Spacer(Width = 0);
  334.             case 1: 
  335.                 HList()
  336.                 {
  337.                 Spacer(Width = 40);
  338.                 WidowCheckBox(kStayOnTop, stayOnTop, Width = 100, Height = 18, kCheckBoxFont);
  339.                 }
  340.             }
  341.         
  342.         Switch(showHTMLSearch)
  343.             {
  344.             default:
  345.             case 0: 
  346.                 Spacer(Width = 0);
  347.             case 1: 
  348.                 IncludeNamedStatement("SearchInMode");
  349.             }
  350.         }
  351.     Spacer(Width = 0, Height = 5);
  352.     
  353.     Switch(horizontalFind)
  354.         {
  355.         default:
  356.         case 0: IncludeNamedStatement("VerticalFindChange");
  357.         case 1: IncludeNamedStatement("HorizontalFindChange");
  358.         }
  359.     
  360.     //Call(Divider);
  361.     Spacer(Width = 0, Height = 10);
  362.     Switch(horizontalFind)
  363.         {
  364.         default:
  365.         case 0: IncludeNamedStatement("VerticalOptions");
  366.         case 1: IncludeNamedStatement("HorizontalOptions");
  367.         }
  368.     
  369.     //Call(Divider);
  370.     Spacer(Width = 0, Height = 10);    
  371.     IncludeNamedStatement("Buttons");
  372.     Spacer(Width = 0, Height = 5);    
  373.     
  374.  
  375.     #ifdef TryMe
  376.     Call(Divider);
  377.     Spacer(Width = 0, Height = 20);
  378.     HList()
  379.         {
  380.         Spacer(Width = 10, Height = 0);
  381.         VList()
  382.             {
  383.             IntegerPopup("Active Window", Default, searchIn)
  384.                 {
  385.                 IntItem("Doc", 0);
  386.                 IntItem("Site", 2);
  387.                 };
  388.             Spacer(Height = 5);
  389.             IntegerPopup("Document", Default, docIsRoman)
  390.                 {
  391.                 IntItem("Non-Roman", 0);
  392.                 IntItem("Roman", 1);
  393.                 };
  394.             Spacer(Height = 5);
  395.             IntegerPopup("Layout", Default, horizontalFind)
  396.                 {
  397.                 IntItem("Vertical", 0);
  398.                 IntItem("Horizontal", 1);
  399.                 };
  400.             Spacer(Height = 5);
  401.             IntegerPopup("Show Stay On Top", Default, showStayOnTop)
  402.                 {
  403.                 IntItem("No", 0);
  404.                 IntItem("Yes", 1);
  405.                 };
  406.             Spacer(Height = 5);
  407.             IntegerPopup("Show In HTML Source", Default, showHTMLSearch)
  408.                 {
  409.                 IntItem("No", 0);
  410.                 IntItem("Yes", 1);
  411.                 };
  412.             }
  413.         }
  414.     #endif
  415.     } // VList
  416.  
  417.     #ifdef TryMe
  418.     Call(DividerV);
  419.     #endif
  420.  
  421.     }// HList
  422.  
  423.