//TH-Header //***************************************************************************************** // Copyright (c) 2014 KURANT Project // All rights reserved. // // $FileName : cWorkspaceLibrary // $ProjectName : The Hammer 2.0 // $Authors : wil // $Created : 02.10.2014 19:58 // $Type : LGPL // // Contents: // Contains the logic for handling workspace libraries in The hammer. // The normal string value of the array is set with the .sws files of the library // loaded by the current workspace. // // //***************************************************************************************** //TH-RevisionStart //TH-RevisionEnd Use vWin32fh.pkg Use cWorkspaceHandlerBase.pkg Struct tWSLibrary String sWsFile String sHome String sAppSrc String sBitmap String sData String sDDSrc End_Struct Class cWorkspaceLibrary is a Array Procedure Construct_Object Forward Send Construct_Object Property tWSLibrary[] pWSLibraries End_Procedure // Construct_Object // // A quick PoC for now // Function AppSrcPath Integer iItem Returns String Integer iCount Handle hoWS String sSWS String sVdfVersion String sAppSrcPath Move "" To sAppSrcPath Get Item_Count To iCount If (iItem "" ) Begin If (Right(sAppSrcPath,1)<>";") Append sAppSrcPath ";" Move (sPath+sAppSrcPath) to sPath End Loop Function_Return sPath End_Function // Function LibraryHomeFolders Returns String[] Integer iSize Integer iItem String sPath String sHome sHomePath String[] HomeFolders tWSLibrary[] WSLibraries Get pWSLibraries To WSLibraries Move (ResizeArray(HomeFolders,0)) To HomeFolders Move (SizeOfArray(WSLibraries)) To iSize For iItem From 0 To (iSize-1) Get ParseFolderName WSLibraries[iItem].sWsFile To sPath Move WSLibraries[iItem].sHome To sHome // This is most often a relative path Get ConvertRelativePath of ghoWorkspaceHandlerEx sHome "." sPath To sHomePath Move sHomePath To HomeFolders[iItem] Loop Function_Return HomeFolders End_Function End_Class // cWorkspaceLibrary