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

  1. // -----
  2. // VDL171.txt
  3. // Copyright 1997 Claris
  4. // -----
  5.  
  6. //---------------------------------
  7. // SiteWind.txt
  8. //---------------------------------
  9.  
  10.  
  11. #include "StdVPref.txt"
  12.  
  13.  
  14.  
  15.  
  16. /************************** LOCALIZED STRING CONSTANTS BEGIN **************************************/
  17. /************************** LOCALIZED STRING CONSTANTS BEGIN **************************************/
  18. /************************** LOCALIZED STRING CONSTANTS BEGIN **************************************/
  19.  
  20.  
  21. //This section contains all localizable string constants for this VDL program. Be sure to 
  22. //include the backslash character at the end of each line of a multi-line string, except for the last line.
  23. //You may also flatten multiline constants into a single line, if you prefer
  24.  
  25. #define kLit1 "Create New Page"
  26. #define kLit2 "Site Download Statistics"
  27. #define kLit3 "Upload"
  28. #define kLit4 "Upload Options"
  29. #define kLit5 "Document Options"
  30. #define kLit6 "Verify Links and References"
  31. #define kLit7 "Local Site Folder:"
  32. #define kLit8 "FTP Upload Location:"
  33. #define kLit9 "Page Count:"
  34. #define kLit10 "Total Size:"
  35. #define kLit11 "Consolidate"
  36.  
  37.  
  38.  
  39. //Localized Fonts
  40. #if Platform_Mac
  41.     #define kStaticTextFont         Font = {Geneva, 10, {Plain}}
  42.     #define kBoldStaticFont         Font = {Geneva, 10, {Bold}}
  43.     #define kHelpFont                 Font = {Geneva,  9, {Italic}}
  44. #else
  45.     #define kStaticTextFont         Font = SystemFont
  46.     #define kBoldStaticFont         Font =  SystemFont
  47. #endif
  48.  
  49.  
  50.  
  51.  
  52. /************************** LOCALIZED STRING CONSTANTS END **************************************/
  53. /************************** LOCALIZED STRING CONSTANTS END **************************************/
  54. /************************** LOCALIZED STRING CONSTANTS END **************************************/
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
  64. /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
  65. /************************** LOCALIZED NUMERICAL CONSTANTS BEGIN **************************************/
  66.  
  67. //This section contains integer constants that are used to format this VDL program.
  68. //These are localizable - they only need to be changed if the localized strings 
  69. //are sufficiently longer than the US strings. Localize the strings first, then the constants.
  70.  
  71.  
  72.  
  73.  
  74.  
  75. /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
  76. /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
  77. /************************** LOCALIZED NUMERICAL CONSTANTS END **************************************/
  78.  
  79.  
  80.  
  81. //No further localizable data past this point
  82.  
  83. /************************** END LOCALIZABLE DATA ***************************************************/
  84. /************************** END LOCALIZABLE DATA ***************************************************/
  85. /************************** END LOCALIZABLE DATA ***************************************************/
  86.  
  87.  
  88. #define kStandardSpace 9    // Standard Minimum Separtion between objects
  89. #define DialogBack stdBackColor
  90.  
  91.  
  92. #if Platform_Mac
  93.     #define ToolSep GenericView("ToolSepView");
  94.     #define SelectorViewStyle MacMode
  95. #else
  96.     #define ToolSep
  97.     #define SelectorViewStyle WinMode
  98. #endif
  99.  
  100.  
  101.  
  102. // Display IDs that indicate which type 
  103. // of data is being displayed File Info or Link Info
  104. #define kFileInfoDisplayID            1
  105. #define kFileLinksDisplayID        2
  106.  
  107. //--- Command Codes ---
  108. #define ccDisabledCommandCode        9999
  109. #define ccNewDoc                        1040
  110. //#define ccNewFolder            ccDisabledCommandCode     //$$$$MR change to 5007
  111. #define ccSiteWindUpload         5003
  112. #define ccUploadOptions          5002
  113. #define ccVerifySiteLinks        5008
  114. #define ccConsolidateSite        3314
  115. #define ccDoSiteStats                5031
  116. #define ccSiteDocOptions            5034
  117. #define ccNewDocFromSite            5035
  118.  
  119. //--- Resource IDs ---
  120. #define kDocumentOptionsIcon                13013
  121. #define kDocumentOptionsIconPressed        13033
  122. #define kDocumentOptionsIconDimmed        13053
  123.  
  124. #define kUploadIcon                            13570
  125. #define kUploadIconPressed                    13571
  126. #define kUploadIconDimmed                    13572
  127.  
  128. #define kUploadOptionsIcon                    14065
  129. #define kUploadOptionsIconPressed        14066
  130. #define kUploadOptionsIconDimmed            14067
  131.  
  132. #define kNewFolderIcon                        16007
  133. #define kNewFolderIconPressed                16008
  134. #define kNewFolderIconDimmed                16009
  135.  
  136. #define kVerifyLinksIcon                    16010
  137. #define kVerifyLinksIconPressed            16011
  138. #define kVerifyLinksIconDimmed            16012
  139.  
  140. #define kNewPageIcon                            16013
  141. #define kNewPageIconPressed                16014
  142. #define kNewPageIconDimmed                    16015
  143.  
  144. #define kConsolidateIcon                    16022
  145. #define kConsolidateIconPressed            16023
  146. #define kConsolidateIconDimmed            16024
  147.  
  148. #define kSiteStatsIcon                        16025
  149. #define kSiteStatsIconPressed                16026
  150. #define kSiteStatsIconDimmed                16027
  151.  
  152.  
  153. //-------------------------------------------------------------------------------------
  154. //        Debug / Try Me Defines:  These are for testing only
  155. //-------------------------------------------------------------------------------------
  156.     
  157. #ifdef TryMe
  158. //    #define WhichView 1
  159.     #define LocalSitePath    "HardDisk:Development:Master Web Site:My Web Site"
  160.     #define FTPSitePath        "http://www.coolsite.com"
  161. #endif
  162.     
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169. //-------------------------------------------------------------------------------------
  170. //    Buttons in the dialog button Bar
  171. //-------------------------------------------------------------------------------------
  172. Define(SiteEditorButtonBarButtons)
  173.     HList(FullyCovered,DialogBack)
  174.     {
  175.         //New Page Button
  176.         ToolSep
  177.  
  178.  
  179.         PictPushButton(ccNewDocFromSite, "None", EH kLit1)
  180.         {
  181.             On(Draw, 'cicn', kNewPageIcon);
  182.             Off(Draw, 'cicn', kNewPageIconPressed);
  183.             DisabledOn(Draw, 'cicn', kNewPageIconDimmed);
  184.             DisabledOff(Draw, 'cicn', kNewPageIconDimmed);
  185.             TrackingOn(Draw, 'cicn', kNewPageIconPressed);
  186.             TrackingOff(Draw, 'cicn', kNewPageIconPressed);
  187.         };
  188.  
  189.         
  190.  
  191.         ToolSep
  192.         Spacer(Width = kStandardSpace, Height = UseParent);
  193.  
  194.         //Document Options Button
  195.         ToolSep        
  196.         PictPushButton(ccSiteDocOptions, "None", EH kLit5)        
  197.         {
  198.             On(Draw, 'cicn', kDocumentOptionsIcon);
  199.             Off(Draw, 'cicn', kDocumentOptionsIconPressed);
  200.             DisabledOn(Draw, 'cicn', kDocumentOptionsIconDimmed);
  201.             DisabledOff(Draw, 'cicn', kDocumentOptionsIconDimmed);
  202.             TrackingOn(Draw, 'cicn', kDocumentOptionsIconPressed);
  203.             TrackingOff(Draw, 'cicn', kDocumentOptionsIconPressed);
  204.         };
  205.  
  206. /*$$$$MR Commented out because IDG determined that this button was confusing
  207.         ToolSep
  208.  
  209.         //Upload Options Button
  210.         PictPushButton( ccUploadOptions, "None",EH kLit4) //Publish Options Button
  211.         {
  212.             On(Draw, 'cicn', kUploadOptionsIcon);
  213.             Off(Draw, 'cicn', kUploadOptionsIconPressed);
  214.             DisabledOn(Draw, 'cicn', kUploadOptionsIconDimmed);
  215.             DisabledOff(Draw, 'cicn', kUploadOptionsIconDimmed);
  216.             TrackingOn(Draw, 'cicn', kUploadOptionsIconPressed);
  217.             TrackingOff(Draw, 'cicn', kUploadOptionsIconPressed);
  218.         };
  219. */
  220.         //New Folder Button
  221.         ToolSep        
  222.         PictPushButton(ccDoSiteStats, "None", EH kLit2) 
  223.         {
  224.             On(Draw, 'cicn',  kSiteStatsIcon);
  225.             Off(Draw, 'cicn', kSiteStatsIconPressed);
  226.             DisabledOn(Draw, 'cicn', kSiteStatsIconDimmed);
  227.             DisabledOff(Draw, 'cicn', kSiteStatsIconDimmed);
  228.             TrackingOn(Draw, 'cicn', kSiteStatsIconPressed);
  229.             TrackingOff(Draw, 'cicn', kSiteStatsIconPressed);
  230.         };
  231.  
  232.         ToolSep
  233.         Spacer(Width = kStandardSpace, Height = UseParent);
  234.         
  235.         //Verify Links Button
  236.         ToolSep
  237.         PictPushButton( ccVerifySiteLinks, "None",EH kLit6) //Verify Links & References Button
  238.         {
  239.             On(Draw, 'cicn', kVerifyLinksIcon);
  240.             Off(Draw, 'cicn', kVerifyLinksIconPressed);
  241.             DisabledOn(Draw, 'cicn', kVerifyLinksIconDimmed);
  242.             DisabledOff(Draw, 'cicn', kVerifyLinksIconDimmed);
  243.             TrackingOn(Draw, 'cicn', kVerifyLinksIconPressed);
  244.             TrackingOff(Draw, 'cicn', kVerifyLinksIconPressed);
  245.         };
  246.     
  247.         //Consolidate Button
  248.         ToolSep
  249.         PictPushButton(ccConsolidateSite, "None", EH kLit11) //Consolidate Button
  250.         {
  251.             On(Draw, 'cicn', kConsolidateIcon);
  252.             Off(Draw, 'cicn', kConsolidateIconPressed);
  253.             DisabledOn(Draw, 'cicn', kConsolidateIconDimmed);
  254.             DisabledOff(Draw, 'cicn', kConsolidateIconDimmed);
  255.             TrackingOn(Draw, 'cicn', kConsolidateIconPressed);
  256.             TrackingOff(Draw, 'cicn', kConsolidateIconPressed);
  257.         };
  258.     
  259.         //Upload Site Button
  260.         ToolSep
  261.         PictPushButton(ccSiteWindUpload,"None",EH kLit3) //Publish Button
  262.         {
  263.             On(Draw, 'cicn', kUploadIcon);
  264.             Off(Draw, 'cicn', kUploadIconPressed);
  265.             DisabledOn(Draw, 'cicn', kUploadIconDimmed);
  266.             DisabledOff(Draw, 'cicn', kUploadIconDimmed);
  267.             TrackingOn(Draw, 'cicn', kUploadIconPressed);
  268.             TrackingOff(Draw, 'cicn', kUploadIconPressed);
  269.         };
  270.  
  271.     }//SiteEditorButtonBarButtons
  272.  
  273.  
  274.  
  275. //-------------------------------------------------------------------------------------
  276. //    Set Up The Upper Tool Bar, Tool Tips
  277. //-------------------------------------------------------------------------------------
  278. Define(UpperToolbar)
  279.     Margin(6,7,0,5,Width = UseParent, DialogBack)
  280.         HList(Width = UseParent,FullyCovered)
  281.         {                
  282.  
  283.                 Call(SiteEditorButtonBarButtons);
  284.                 ToolSep    
  285. //                Spacer(Width = UseParent, Height = UseParent);
  286.  
  287.                 VList(Width = UseParent, Height = UseParent,DialogBack)
  288.                 {
  289.                 Spacer(Height = 5, Width = UseParent);
  290.                 #if Platform_Mac
  291.                     Margin(kStandardSpace + 3,2,0,0,DialogBack)
  292.                     HelpView(Width = UseParent, Alignment = Left, Height = 12, kHelpFont);
  293.                 #endif
  294.                 }
  295.         } // HList
  296.             
  297.  
  298.  
  299.  
  300.  
  301. //-------------------------------------------------------------------------------------
  302. //    Set up the site info text fields
  303. //-------------------------------------------------------------------------------------
  304. Define(SiteInfoFields)
  305.     Margin(6,0,0,5,Width = UseParent, DialogBack)
  306.         VList(Width = UseParent, DialogBack)
  307.         {
  308.             HList(Width = UseParent,FullyCovered)
  309.             {
  310.                 Spacer(Width = 18, Height = UseParent);
  311.                 StaticText(kLit7,kBoldStaticFont,Height = UseParent);
  312.                 Spacer(Width = kStandardSpace, Height = UseParent);
  313.                 StaticText(smgLocalSitePath, kStaticTextFont,Width = 320);
  314.                 Spacer(Width = UseParent, Height = UseParent);
  315.             } // HList
  316.     
  317.             Spacer(Width = 0, Height = 5);
  318.         
  319.             HList(Width = UseParent,FullyCovered)
  320.             {    
  321.                 StaticText(kLit8,kBoldStaticFont,Height = UseParent);
  322.                 Spacer(Width = kStandardSpace, Height = UseParent);
  323.                 StaticText(smgFTPSitePath, kStaticTextFont,Width = 320);
  324.                 Spacer(Width = UseParent, Height = UseParent);
  325.             } // HList
  326.  
  327.         } // VList
  328.  
  329.  
  330. //-------------------------------------------------------------------------------------
  331. //    Set up the selection info text fields
  332. //-------------------------------------------------------------------------------------
  333. Define(SelectionInfoFields)
  334.     Margin(0,0,0,0, DialogBack)
  335.         VList(DialogBack)
  336.         {
  337.             Spacer(Height = 6);
  338.             HList()
  339.             {
  340.                 StaticText(kLit9,kBoldStaticFont,Width = 100,Height = UseParent,Alignment = Right);
  341.                 Spacer(Width = kStandardSpace, Height = UseParent);
  342.                 StaticText(numberOfPages, kStaticTextFont,Width = 40);
  343.                 Spacer(Width = UseParent, Height = UseParent);
  344.             } // HList
  345.     
  346.             Spacer( Height = 2);
  347.         
  348.             HList()
  349.             {    
  350.                 StaticText(kLit10,kBoldStaticFont,Width = 100,Height = UseParent,Alignment = Right);
  351.                 Spacer(Width = kStandardSpace, Height = UseParent);
  352.                 StaticText(totalSize, kStaticTextFont,Width = 40);
  353.                 Spacer(Width = UseParent, Height = UseParent);
  354.             } // HList
  355.  
  356.         } // VList
  357.  
  358.  
  359.  
  360. //-------------------------------------------------------------------------------------
  361. //    Define the Column Header parameters
  362. //-------------------------------------------------------------------------------------
  363. Define(FullFileHeader)
  364.     ColumnHeaderList (    MinColWidth  = 50, 
  365.      
  366.                                 ColLabel0 = "Name",               
  367.                                 ColWidth0 = fileNameWidth,           
  368.                                 DefaultWidth0 = 250, 
  369.                                 
  370.                                 ColLabel1 = "Size",               
  371.                                 ColWidth1 = fileSizeWidth,           
  372.                                 DefaultWidth1 = 50, 
  373.                                 
  374.                                 ColLabel2 = "Create Date",               
  375.                                 ColWidth2 = fileCreateWidth,           
  376.                                 DefaultWidth2 = 70, 
  377.                                 
  378.                                 ColLabel3 = "Last Mod Date",               
  379.                                 ColWidth3 = fileModWidth,           
  380.                                 DefaultWidth3 = 100, 
  381.                                 
  382.                                 SortAttribute = FileSortMode,
  383.  
  384.                                 DialogBack, 
  385.                                 kStaticTextFont, 
  386.                                 Width = UseParent                            
  387.                             );
  388.  
  389.  
  390. //-------------------------------------------------------------------------------------
  391. //    Set up the file browser view
  392. //-------------------------------------------------------------------------------------
  393. Define(FileInfoView)
  394.     VList(Width = UseParent, Height = UseParent)
  395.     {
  396.         Call(FullFileHeader);
  397.     
  398. //        VList(Width = UseParent, Height = UseParent,VScroll,HScroll)
  399.         VList(Width = UseParent, Height = UseParent,NoFrame, ForceOverlap,VScroll,HScroll)
  400.         {
  401.  
  402.             GenericView("SiteFileSelector",
  403.                                 SelectorViewStyle, 
  404.     //                            RootCanFold,
  405.                                 CanEdit, 
  406.                                 SelDomain = "site_window_domain",
  407.                                 BackColor = {0, 0, 0}, 
  408.                                 kStaticTextFont );
  409.         }//VList
  410.     }//VList
  411.  
  412.  
  413. //-------------------------------------------------------------------------------------
  414. //    Set up the site browser tree
  415. //-------------------------------------------------------------------------------------
  416. Define(SiteTreeBrowser)
  417.     Call(FileInfoView);            
  418. //$$$$MR implement this way for now, later use the switch
  419. //            below
  420. /*$$$$MR This switch will be used when we implement the links view
  421.     Switch (WhichView)
  422.     {    
  423.         case 1:
  424.             Call(FileInfoView);
  425.         default:
  426. //            GenericView("LinkInfoTreeProc");
  427.             StaticText("Links Info View");
  428.     }//switch
  429. */
  430.  
  431. //-------------------------------------------------------------------------------------
  432. //    This is the root level VList
  433. //-------------------------------------------------------------------------------------
  434. VList(Width = UseParent, Height = UseParent, DialogBack)
  435. {
  436.     HList(Width = UseParent)
  437.     {
  438.         Call(UpperToolbar);
  439. //        Spacer(Width = 10);
  440.  
  441. //$$$$ No longer going to display the site stat fields
  442. //        Call(SelectionInfoFields);
  443.     }//HList
  444.  
  445.  
  446.     Call(SiteInfoFields);
  447.     
  448.     Call(SiteTreeBrowser);    
  449.  
  450.  
  451. }//VList root
  452.  
  453.  
  454.  
  455.  
  456.