//AB/ Project Documentation project //AB/ Object oIDE_Project is a View_Project //AB/ Set ProjectName to "Documentation project" //AB/ Set ProjectFileName to "SelectDoc.VW" //AB/ Set GenerateFileName to "NONAME4" // Project Object Structure // oSelect is a dbView // oOutput is a cFormattedOuptut // oDocModule is a cDocModule // oScope is a cWinStack // oOpen is a OpenDialog // oSource is a Form // oRead is a Button // oDoc is a cWinListView // oRtf is a Button // oHtm is a Button // Register all objects Register_Object oDoc Register_Object oDocModule Register_Object oHtm Register_Object oOpen Register_Object oOutput Register_Object oRead Register_Object oRtf Register_Object oScope Register_Object oSelect Register_Object oSource //AB-StoreTopStart Use cWinFileSystem.pkg Use cStatusPanel.pkg Use cWinStack.pkg Use cFormattedOutput.pkg /DOC_CSS_TABLE_IMAGE h1 { font-family:Tahoma,Arial,sans-serif; letter-spacing:1pt; font-weight: bold; font-size:18pt; color: navy; border-bottom:1pt solid navy; width:80%; } h2 { color: #B00720; font-family:Tahoma,Arial,sans-serif; font-size: 16pt; font-weight: bold; padding-top: 10pt; padding-Left: 4pt; padding-bottom: 2pt; margin:0pt; } h3 { color: #555555; font-family:Tahoma,Arial,sans-serif; font-size: 14pt; font-weight: bold; padding-top: 10pt; padding-Left: 4pt; padding-bottom: 2pt; margin:0pt; } h4 { color: #555555; font-family:Tahoma,Arial,sans-serif; font-size: 12pt; font-weight: bold; padding-top: 6pt; padding-Left: 4pt; padding-bottom: 2pt; margin:0pt; } h5 { color: #555555; font-family:Tahoma,Arial,sans-serif; font-size: 10pt; font-weight: bold; padding-top: 6pt; padding-Left: 4pt; padding-bottom: 2pt; margin:0pt; } table { font-family: Tahoma,Arial,sans-serif; font-size: 10pt; color:gray; border:'1pt #E6E6E6 solid'; marging:0; padding:0; vertical-align:middle; width:80%; } .ListHeader { font-family: Tahoma,Arial,sans-serif; font-weight:normal; font-size: 10pt; color:#555555; border:'1pt #E6E6E6 solid'; background-color:#EAEAEA; marging:0; padding:0; vertical-align:middle; } .ListData { font-family: Tahoma,Arial,sans-serif; font-weight:normal; font-size: 8pt; color:black; border:'1pt #E6E6E6 solid'; background-color:white; marging:0; padding:0; vertical-align:middle; } p { font-family: Tahoma,Arial,sans-serif; font-weight:normal; font-size: 8pt; color:black; background-color:white; marging:0; padding:0; vertical-align:middle; } B.NOTE { font-family: Tahoma,Arial,sans-serif; color: Navy; } B.TIP { font-family: Tahoma,Arial,sans-serif; color: #FF8000; } P.NOTE { font-family: Tahoma,Arial,sans-serif; font-size: 10.0pt; margin-top: 15pt; margin-bottom: 15pt; background-color:#CCCCCC; border: 1 solid Navy; line-height: 15pt; width: 80%; } P.TIP { font-family: Tahoma,Arial,sans-serif; font-size: 10.0pt; margin-top: 15pt; margin-bottom: 15pt; background-color:#CCCCCC; border: 1 solid #FF8000; line-height: 15pt; width: 80%; } /* //AB-StoreTopEnd //AB-IgnoreStart Use dfClient.pkg Use File_dlg.Pkg Use Windows.pkg Use cWinListView.pkg //AB-IgnoreEnd ACTIVATE_VIEW Activate_oSelect FOR oSelect Object oSelect is a dbView //AB-StoreTopStart String DOC$Global$Type Move "" To DOC$Global$Type // Define C_DOC_COMMENT For ("/"+"/") Define C_DOC_MARK For ("/"+"/DOC/"+"/") Property String psOutput Public "HTM" Object oOutput Is A cFormattedOuptut End_Object Class cDocElement Is An array Procedure Construct_Object Forward Send Construct_Object Property String psType Property String psScope Property Integer phoParent Property Integer piElement End_Procedure Procedure Destroy_Object If (phoParent(Self)) ; Set Value Of (phoParent(Self)) Item (piElement(Self)) To 0 Forward Send Destroy_Object End_Procedure Procedure Set Details String sDetails Set Value Item (Item_Count(Self)) To sDetails End_Procedure Function Details Integer iItem Returns String Function_Return (Value(Self, iItem)) End_Function End_Class Class cDocBranch Is An array Procedure Construct_Object Forward Send Construct_Object Property String psType Property Integer phoParent Property Integer piElement End_Procedure Procedure Destroy_Object If (phoParent(Self)) Set Value Of (phoParent(Self)) Item (piElement(Self)) To 0 Forward Send Destroy_Object End_Procedure Procedure Delete_Data Integer iCount iItem hoItem Get Item_Count To iCount For iItem From 0 To (iCount-1) Get Value Item iItem To hoItem If (hoItem) Begin Send Delete_Data To hoItem Send Destroy To hoItem End Loop Forward Send Delete_Data End_Procedure Procedure Add_Branch Integer hoBranch Set phoParent Of hoBranch To (Object_Id(Self)) Set piElement Of hoBranch To (Item_Count(Self)) Set Value Item (Item_Count(Self)) To hoBranch End_Procedure Function Create_Branch String sType Returns Integer Integer hoBranch Get Create U_cDocBranch To hoBranch Set psType Of hoBranch To sType Set Name Of hoBranch To sType Set phoParent Of hoBranch To (Object_Id(Self)) Set piElement Of hoBranch To (Item_Count(Self)) Set Value Item (Item_Count(Self)) To hoBranch Function_Return hoBranch End_Function Function Create_Element String sType Returns Integer Integer hoBranch Get Create U_cDocElement To hoBranch Set psType Of hoBranch To sType Set Name Of hoBranch To sType Set phoParent Of hoBranch To (Object_Id(Self)) Set piElement Of hoBranch To (Item_Count(Self)) Set Value Item (Item_Count(Self)) To hoBranch Function_Return hoBranch End_Function End_Class Class cDocModule Is An cDocBranch Procedure Construct_Object Forward Send Construct_Object Property String psTitle Property String psType Property String psLocation Property String psCreated Property String psRevised Property String psSize End_Procedure Procedure Delete_Data Forward Send Delete_Data Set psTitle To "" Set psType To "" Set psLocation To "" Set psCreated To "" Set psRevised To "" Set psSize To "" End_Procedure End_Class Integer hoModule Object oDocModule Is A cDocModule Move (Self) To hoModule End_Object Object oScope Is A cWinStack End_Object Property Integer phoDocScope public 0 Property Integer phoFileSystem Procedure Set DocScope Integer hoScope Integer hoPrev Get phoDocScope To hoPrev If (hoPrev) Set Stack_Value Of (oScope(Self)) To hoPrev Set phoDocScope To hoScope End_Procedure Function DocScope Returns Integer Function_Return (phoDocScope(Self)) End_Function Procedure Remove_DocScope Set phoDocScope To (Stack_Value(oScope(Self))) End_Procedure //AB-StoreTopEnd Set Border_Style to Border_Thick Set Maximize_Icon to TRUE Set Label to "Source selection" Set Location to 0 0 Set Size to 234 415 Set piMinSize to 235 415 //AB-DDOStart //AB-DDOEnd Object oOpen is a OpenDialog //AB/ Set Location to 197 4 Set Dialog_Caption to "Select a file" Set Filter_String to "Package|*.pkg|All Files|*.*" //AB-StoreStart //Show_Dialog is a predefined function method in the OpenDialog class //get Show_Dialog to an integer variable to call the OpenDialog // //DoCallOpenDialog is NOT a predefined method in the OpenDialog class //DoCallOpenDialog it is just used an example //you can send DoCallOpenDialog from another object, such as a button // //Procedure DoCallOpenDialog // integer iVoid // get Show_Dialog of OpenDialog1 to iVoid //End_Procedure // DoCallOpenDialog //AB-StoreEnd End_Object // oOpen Object oSource is a Form Set Label to "Select source file" Set Size to 13 285 Set Location to 7 63 Set peAnchors to anLeftRight Set Label_Col_Offset to 2 Set Label_Justification_Mode to jMode_Right Set Prompt_Button_Mode to pb_PromptOn //AB-StoreStart Procedure Prompt Integer iVoid String sFile get Show_Dialog of oOpen to iVoid If (iVoid) Begin Get File_Name of oOpen To sFile If (sFile<>"") Set Value item 0 To sFile End End_Procedure Procedure OnChange Set Enabled_State of oRead To (Value(Self, 0)<>"") End_Procedure //AB-StoreEnd End_Object // oSource Object oRead is a Button //AB-StoreTopStart Set Enabled_State To False //AB-StoreTopEnd Set Label to "Read" Set Size to 13 50 Set Location to 7 355 Set peAnchors to anTopRight //AB-StoreStart Procedure OnClick Send DoReadSource (Value(oSource(Self),0)) End_Procedure // OnClick //AB-StoreEnd End_Object // oRead Object oDoc is a cWinListView //AB-StoreTopStart Set peAnchors To anAll //Object oSmallImages Is a cSmallImageList // Set piMaxImages To 80 // Procedure OnCreate // add the images // Integer iImage // Get AddTransparentImage 'Sysinfo.bmp' clFuchsia To iImage // End_Procedure //End_Object Procedure OnCreate // Set phSmallIL To (Window_Handle(oSmallImages(Self))) Send Clear Send DoInsertColumn "Name" 1 150 LVCFMT_LEFT Send DoInsertColumn "Type" 2 100 LVCFMT_LEFT Send DoInsertColumn "Text" 3 340 LVCFMT_LEFT End_Procedure //AB-StoreTopEnd Set Size to 171 400 Set Location to 25 5 //AB-StoreStart Procedure Clear Send DoDeleteAllItems End_Procedure Procedure DoAddDocItem String sName String sType String sText Integer iRow Get AddListItem sName 0 0 0 0 To iRow Set ItemLabel iRow 1 To sType Set ItemLabel iRow 2 To sText Set ItemSelectState iRow To True End_Procedure //AB-StoreEnd End_Object // oDoc Object oRtf is a Button Set Label to "Generate RTF" Set Size to 14 70 Set Location to 201 335 Set peAnchors to anBottomRight //AB-StoreStart Procedure OnClick Set psOutput To "RTF" Send DoDocGenerate End_Procedure // OnClick //AB-StoreEnd End_Object // oRtf Object oHtm is a Button Set Label to "Generate HTML" Set Size to 14 70 Set Location to 201 255 Set peAnchors to anBottomRight //AB-StoreStart Procedure OnClick Set psOutput To "HTM" Send DoDocGenerate End_Procedure // OnClick //AB-StoreEnd End_Object // oHtm //AB-StoreStart Function IsDocScope String sLine Returns Integer Trim (Uppercase(sLine)) To sLine Move (Left(sLine, 5)) To sLine If ((sLine="CLASS")Or(sLine="OBJEC")) Function_Return (True) Function_Return (False) End_Function Function IsDocScopeEnd String sLine Returns Integer Trim (Uppercase(sLine)) To sLine Move (Left(sLine, 9)) To sLine If ((sLine="END_CLASS")Or(sLine="END_OBJEC")) Function_Return (True) Function_Return (False) End_Function Procedure DoProcessModule Integer hoFS String sLine If (Not(hoFS)) Procedure_Return If (sLine<>"") Send DoProcessLine sLine While (Not(File_Eof(hoFS))) fs.Readln hoFS sLine Trim sLine To sLine If (sLine<>"") Send DoProcessLine sLine Loop End_Procedure Procedure DoCloseElement String sClose If (sClose="COMMAND") Move "#ENDCOMMAND" To sClose If (sClose="FUNCTION") Move "END_FUNCTION" To sClose Integer hoFS String sLine Get phoFileSystem To hoFS If (hoFS=0) Procedure_Return While (Not(File_Eof(hoFS))) fs.Readln hoFS sLine Trim sLine To sLine If (Left(Uppercase(sLine), Length(sClose))=sClose) Procedure_Return Loop End_Procedure Procedure DoProcessLine String sLine Integer hoEle iReset If (Left(sLine, 7)=C_DOC_MARK) Begin Get Create Of hoModule U_cDocElement To hoEle If "PRIVATE" in (Trim(Uppercase(sLine))) Set psScope Of hoEle To "PRIVATE" If "PUBLIC" in (Trim(Uppercase(sLine))) Set psScope Of hoEle To "PUBLIC" Set phoDocScope To hoEle End Else If (Left(sLine, 2)=C_DOC_COMMENT) Begin Get phoDocScope To hoEle If (hoEle=0) Begin Get Create Of hoModule U_cDocElement To hoEle Set phoDocScope To hoEle End Move (Replace(C_DOC_COMMENT, sLine, "")) To sLine Set Details Of hoEle To sLine End Else If (Left(Uppercase(sLine), 4)="USE ") Send DoProcessElement "DEPENDENCE" sLine Else If (Left(Uppercase(sLine), 9)="#INCLUDE ") Send DoProcessElement "DEPENDENCE" sLine Else If (Left(Uppercase(sLine), 6)="CLASS ") Send DoProcessElement "CLASS" sLine Else If (Left(Uppercase(sLine), 7)="OBJECT ") Send DoProcessElement "OBJECT" sLine Else If (Left(Uppercase(sLine), 10)="PROCEDURE ") Send DoProcessElement "PROCEDURE" sLine Else If (Left(Uppercase(sLine), 9)="FUNCTION ") Send DoProcessElement "FUNCTION" sLine Else If (Left(Uppercase(sLine), 9)="PROPERTY ") Send DoProcessElement "PROPERTY" sLine Else If (Left(Uppercase(sLine), 9)="#COMMAND ") Send DoProcessElement "COMMAND" sLine // End of scope reached Move 0 To iReset If (Left(Uppercase(sLine), 8)="END_PROC") Move 1 To iReset Else If (Left(Uppercase(sLine), 8)="END_FUNC") Move 1 To iReset Else If (Left(Uppercase(sLine), 8)="END_CLAS") Move 1 To iReset Else If (Left(Uppercase(sLine), 8)="END_OBJE") Move 1 To iReset If (iReset) Begin Get phoDocScope To hoEle If (hoEle) Begin Send Destroy To hoEle Set phoDocScope To 0 End End // End_Procedure Function Trim_Comments Integer hoBranch String sLine Returns String String sCmt Move sLine To sCmt If C_DOC_COMMENT in sLine Begin Move (Left(sLine, Pos(C_DOC_COMMENT, sLine)-1)) To sLine Move (Replace(sLine, sCmt, "")) To sCmt Move (Replace(C_DOC_COMMENT, sCmt, "")) To sCmt Set Details Of hoBranch To sCmt End Function_Return sLine End_Function Procedure DoProcessElement String sType String sLine If ((sType="PROCEDURE")And(Uppercase(sLine) Contains "CONSTRUCT_OBJECT")) Procedure_Return Integer hoEle String sTmp sDesc If (phoDocScope(Self)=0) Begin Get Create_Element Of hoModule sType To hoEle End Else Begin Get phoDocScope To hoEle Send Add_Branch To hoModule hoEle End Set psType Of hoEle To sType Set Name Of hoEle To sType Get Trim_Comments hoEle sLine To sLine // Move (Left(sLine, Pos(" ", sLine))) To sTmp Move (Replace(sTmp, sLine, "")) To sDesc Trim sDesc To sDesc Set Details Of hoEle To sDesc Send DocItem (sType+' ') sLine Set phoDocScope To 0 If (sType="COMMAND") Send DoCloseElement "COMMAND" If (sType="FUNCTION") Send DoCloseElement "FUNCTION" End_Procedure Procedure DoParseDocTag String sData String sTmp Move (Replace(("DOC"+C_DOC_COMMENT), sData, "")) To sTmp Move sTmp To DOC$Global$Type End_Procedure Procedure DocItem String sName String sText String sType sData sTmp If (Left(sName,3)<>"DOC") Begin Move (Left(sText, Pos(" ", sText))) To sTmp Move (Replace(sTmp, sText, "")) To sData Trim sData To sData End Else Begin Move (Replace(C_DOC_COMMENT, sText, "")) To sData If (Trim(sData)="") Procedure_Return If (Left(sData, 3)="DOC") Begin Send DoParseDocTag sData Procedure_Return End End Send DoAddDocItem To (oDoc(Self)) sName DOC$Global$Type sData End_Procedure Function FileType String sType Returns String Move (Trim(Uppercase(sType))) To sType Move (Replace('.', sType, "")) To sType If (sType="SRC") Function_Return "Program" Else If (sType="PKG") Function_Return "Package" Else If (sType="INC") Function_Return "Source code" Else If (sType="VW") Function_Return "View" Else If (sType="RV") Function_Return "Report View" Else If (sType="SL") Function_Return "Lookup list" Else If (sType="DG") Function_Return "Dialog" Else If (sType="DD") Function_Return "Data Dictionary" Else If (sType="BP") Function_Return "Business process object" Else If (sType="BPO") Function_Return "Business process object" Else If (sType="H") Function_Return "Source header" Else If (sType="UTL") Function_Return "VDFQuery Package" Else If (sType="NUI") Function_Return "VDFQuery Package" Function_Return sType End_Function Procedure DoCollectModuleData Integer hoFS If (Not(hoFS)) Procedure_Return Set psTitle Of hoModule To (File_Title(hoFS)) Set psType Of hoModule To (FileType(Self, File_Extention(hoFS))) Set psLocation Of hoModule To (File_FullPath(hoFS)) Set psCreated Of hoModule To (File_Created(hoFS)) Set psRevised Of hoModule To (File_Wrote(hoFS)) Set psSize Of hoModule To (String(File_Size(hoFS))*"B") // Show collected header data in the list Send DoAddDocItem To (oDoc(Self)) "HEADER" "TITLE" (File_Title(hoFS)) Send DoAddDocItem To (oDoc(Self)) "HEADER" "TYPE" (FileType(Self, File_Extention(hoFS))) Send DoAddDocItem To (oDoc(Self)) "HEADER" "PATH" (File_FullPath(hoFS)) Send DoAddDocItem To (oDoc(Self)) "HEADER" "CREATED" (File_Created(hoFS)) Send DoAddDocItem To (oDoc(Self)) "HEADER" "REVISED" (File_Wrote(hoFS)) Send DoAddDocItem To (oDoc(Self)) "HEADER" "SIZE" (String(File_Size(hoFS))*"B") End_Procedure Procedure DoCollectHeaderData Integer hoFS If (Not(hoFS)) Procedure_Return Handle hoHeader String sLine Get Create_Element Of hoModule "HEADER" To hoHeader While (Not(File_Eof(hoFS))) fs.Readln hoFS sLine Trim sLine To sLine If (sLine<>"") Begin If (Left(sLine, 2)<>C_DOC_COMMENT) Begin Send DoProcessModule hoFS sLine Procedure_Return End Else Begin Move (Replace(C_DOC_COMMENT, sLine, "")) To sLine Send DoAddDocItem To (oDoc(Self)) "HEADER" "NOTES" sLine Set Details Of hoHeader To sLine End End Else Begin Send DoProcessModule hoFS sLine Procedure_Return End Loop End_Procedure Procedure DoReadSource String sSource String sLine FileSystem hoFs Send DoDeleteAllItems To (oDoc(Self)) Send Delete_Data To hoModule If (hoFS) Begin Set phoFileSystem To hoFS fs.Open hoFS sSource If (pbIsOpened(hoFS)) Begin Send DoCollectModuleData hoFS Send DoCollectHeaderData hoFS End fs.Close hoFS End If hoFS Send Destroy To hoFS // Send mStat End_Procedure Function mDocFormatProperty String sEle Returns String String sEType sEName sEDef Move (Uppercase(sEle)) To sEle Move (Replace(" PUBLIC ", sEle, " ")) To sEle Move (Replace(" PRIVATE ", sEle, " ")) To sEle Move (Replaces(" ", sEle, " ")) To sEle // Type Move (Left(sEle, Pos(" ", sEle))) To sEType Move (Trim(Replace(sEType, sEle, ""))) To sEle // Name If " " in sEle Begin Move (Left(sEle, Pos(" ", sEle))) To sEName Move (Trim(Replace(sEName, sEle, ""))) To sEle End Else Begin Move sEle To sEName Move "" To sEle End If (sEle<>"") Move sEle To sEDef Move (Lowercase(sEName)) To sEName Move (Lowercase(sEType)) To sEType If (sEDef<>"") Move (sEName*"--"*sEType*"--"*sEDef) To sEle Else Move (sEName*"--"*sEType) To sEle Function_Return sEle End_Function Function mDocFormatClass String sEle Returns String String sName sClass sTmp // Name Move (Trim(Left(sEle, Pos(" ", sEle)))) To sName Move (Trim(Replace(sName, sEle, ""))) To sEle // Class // "is" Move (Trim(Left(sEle, Pos(" ", sEle)))) To sTmp Move (Trim(Replace(sTmp, sEle, ""))) To sEle // "a/an" Move (Trim(Left(sEle, Pos(" ", sEle)))) To sTmp Move (Trim(Replace(sTmp, sEle, ""))) To sEle // Function_Return (sName*"("+sEle+")") End_Function Function mDocFormatProcedure String sEle Returns String String sName sClass sTmp sSet // Set If (Uppercase(Left(sEle, 3))="SET") Begin Move (Trim(Left(sEle, Pos(" ", sEle)))) To sName Move (Trim(Replace(sName, sEle, ""))) To sEle Move "Set" To sSet End // Function_Return (sEle*"-- Procedure"*sSet) End_Function Function mDocFormatFunction String sEle Returns String Function_Return (sEle*"-- Function") End_Function Procedure DoDocGenerateBranch Integer hoBranch Integer iB iCnt String sLine sTag sEle sType sDesc If (psOutput(Self)="HTM") Move "HTMLTAG" To sTag Else Move "RTFTAG" To sTag Get psType Of hoBranch To sType Get Item_Count Of hoBranch To iCnt If (iCnt) Begin Move (Value(hoBranch, (iCnt-1))) To sEle If (sType="PROPERTY") Get mDocFormatProperty sEle To sEle If (sType="CLASS") Get mDocFormatClass sEle To sEle If (sType="PROCEDURE") Get mDocFormatProcedure sEle To sEle If (sType="FUNCTION") Get mDocFormatFunction sEle To sEle Send mOutputTag To (oOutput(Self)) "TITLE" "HEADER 4" sEle "" End Move "" To sDesc For iB From 0 To (iCnt-2) Get Value Of hoBranch Item iB To sLine Move (sDesc+sLine+"
") To sDesc Loop Send mOutputTag To (oOutput(Self)) "TEXT" "PARAGRAPH" sDesc "" End_Procedure Procedure DoDocGenerateType String sType String sBType sTitle Integer iTop iCnt iH hoBranch Move 0 To iH Get Item_Count Of hoModule To iCnt For iTop From 1 To (iCnt-1) Move (Value(hoModule, iTop)) To hoBranch If hoBranch Begin Get psType Of hoBranch To sBType If (sBType=sType) Begin If (iH=0) Begin If (psOutput(Self)="RTF") Send mOutputTag To (oOutput(Self)) "RTFTAG" "" "{\page}" "" If (sType="DEPENDENCE") Move "Dependencies" To sTitle If (sType="CLASS") Move "Class" To sTitle If (sType="PROPERTY") Move "Properties" To sTitle If (sType="PROCEDURE") Move "Methods" To sTitle If (sType="FUNCTION") Move "Functions" To sTitle If (sType="COMMAND") Move "Supplement commands" To sTitle Send mOutputTag To (oOutput(Self)) "TITLE" "HEADER 3" sTitle "" Move 1 To iH End Send DoDocGenerateBranch hoBranch End End Loop End_Procedure Procedure DoDocGenerateTopics Integer iTop iCnt hoBranch iH hoH hC String sType sTag sVal sHeader Get psOutput To sType If (sType="HTM") Move "HTMLTAG" To sTag Else Move "RTFTAG" To sTag // Send mOutputTag To (oOutput(Self)) "TITLE" "HEADER 2" (psTitle(hoModule)) "" Move (sHeader+"Type:"*(psType(hoModule))+ ; "
Location:"*(psLocation(hoModule))+ ; "
Created on:"*(psCreated(hoModule))+ ; "
Revised on:"*(psRevised(hoModule))+ ; "
File size:"*(psSize(hoModule))+"
") ; To sHeader Send mOutputTag To (oOutput(Self)) "TEXT" "PARAGRAPH" sHeader "" // Header first Move (Value(hoModule, 0)) To hoBranch If (hoBranch) Begin Move "" To sHeader For iTop From 0 To (Item_Count(hoBranch)-1) Get Value Of hoBranch Item iTop To sVal Move (sHeader+sVal+"
") To sHeader Loop Send mOutputTag To (oOutput(Self)) "TEXT" "PARAGRAPH" sHeader "" End // Send DoDocGenerateType "DEPENDENCE" Send DoDocGenerateType "CLASS" Send DoDocGenerateType "PROPERTY" Send DoDocGenerateType "PROCEDURE" Send DoDocGenerateType "FUNCTION" Send DoDocGenerateType "COMMAND" // End_Procedure //Procedure mStat // Integer iCount iItem hoBranch iCmt // String sCmt // Get Item_Count of hoModule To iCount // For iItem from 0 to (iCount-1) // Move (Value(hoModule, iItem)) To hoBranch // Showln iItem ' = ' hoBranch // Showln " " (Name(hoBranch)) // Showln " " (psType(hoBranch)) // Showln " " (psScope(hoBranch)) // Showln " " (Item_Count(hoBranch)) // Showln " " (Value(hoBranch, Item_Count(hoBranch)-1)) // For iCmt From 0 to (Item_Count(hoBranch)-2) // Get Value of hoBranch item iCmt To sCmt // Showln " ---- " sCmt // Loop // Showln // Loop //End_Procedure Procedure DoDocGenerate String sOut sFile sTmp sUser sComp sCss sCssFile DateTime dtNow Integer iOk // Move (CurrentDateTime()) To dtNow Get psOutput To sOut If (ghoStatusPanel) Begin Send Initialize_StatusPanel of ghoStatusPanel "Generation of the documentation..." "" "" Send Start_StatusPanel of ghoStatusPanel End Get Value Of (oSource(Self)) To sFile If (sFile<>"") Begin Move (GetUserName()) To sUser Move (GetComputerName()) To sComp If (sOut="HTM") Begin Move (SWAPathRenameExtension(sFile, ".htm")) To sFile // Set output mode to HTML Set pbOutput Of (oOutput(Self)) To False Move (SWAPathRenameExtension(sFile, ".css")) To sCss If (sCss<>"") Begin Direct_Output sCss Output DOC_CSS_TABLE_IMAGE Close_Output Set psStyleSheet Of (oOutput(Self)) To (SWAPathStripPath(sCss)) Set psCharSet Of (oOutput(Self)) To ("windows-"+String(WindowsLocale(LOCALE_IDEFAULTANSICODEPAGE, 6))) End Send mOutputHeader To (oOutput(Self)) sFile "cWindowsEx Documentation Project" Send mOutputTag To (oOutput(Self)) "TITLE" "HEADER 1" "cWindowsEx Documentation Project" "" Send mOutputTag To (oOutput(Self)) "HTMLTAG" "" ("

User name:"*sUser+"
") "" Send mOutputTag To (oOutput(Self)) "HTMLTAG" "" ("Computer name:"*sComp+"
") "" Send mOutputTag To (oOutput(Self)) "HTMLTAG" "" ("Generated on:"*String(dtNow)+"
") "" Send mOutputTag To (oOutput(Self)) "HTMLTAG" "" ("Generated file:"*sFile+"
") "" Send mOutputTag To (oOutput(Self)) "TEXT" "TIP" "Legal Information" "This file may include confidential information. If you got this file by mistake, please immediately remove it from your system!" Send mOutputTag To (oOutput(Self)) "HTMLTAG" "" "

" "" End Else If (sOut="RTF") Begin Move (SWAPathRenameExtension(sFile, ".rtf")) To sFile // Set output mode to RTF Set pbOutput Of (oOutput(Self)) To True Move sFile To sTmp Move (Replaces("\", sTmp, "?")) To sTmp Move (Replaces("?", sTmp, "\\")) To sTmp Send mOutputHeader To (oOutput(Self)) sFile "" Send mOutputTag To (oOutput(Self)) "TITLE" "HEADER 1" "cWindowsEx Documentation Project" "" Send mOutputTag To (oOutput(Self)) "TEXT" "PARAGRAPH" "" ("User name:"*sUser) Send mOutputTag To (oOutput(Self)) "TEXT" "PARAGRAPH" "" ("Computer name:"*sComp) Send mOutputTag To (oOutput(Self)) "TEXT" "PARAGRAPH" "" ("Generated on:"*String(dtNow)) Send mOutputTag To (oOutput(Self)) "TEXT" "PARAGRAPH" "" ("Generated file:"*sTmp) Send mOutputTag To (oOutput(Self)) "TEXT" "NOTE" "Legal Information" "This file may include confidential information. If you got this file by mistake, please immediately remove it from your system!" Send mOutputTag To (oOutput(Self)) "RTFTAG" "" "" "{\page }" End // Send DoDocGenerateTopics // Send mOutputFooter To (oOutput(Self)) // Get YesNo_Box ("Module description saved to \n\n"*sFile+"\n\nDo you wish to open generated file?") "System Info" MBR_YES To iOk If (iOk=MBR_YES) Send ShellExecute "open" sFile 1 // If (ghoStatusPanel) Send Stop_StatusPanel Of ghoStatusPanel End End_Procedure //AB-StoreEnd End_Object // oSelect //AB-StoreStart //AB-StoreEnd //AB/ End_Object // oIDE_Project