// // Copyright 2001 Perforce Software. All rights reserved. // // This file is part of Perforce - the FAST SCM System. // // p4wFilePane: // Draws the Path Browser page #ifndef p4wFilePane_H #define p4wFilePane_H #include "p4wPane.h" enum ShowHideFlags { HIDE_OTHERCLIENT = 1, HIDE_OTHERUSER = 1 << 1, HIDE_OTHERACTION = 1 << 2, HIDE_OTHERCHG = 1 << 3, HIDE_YOURACTION = 1 << 4, HIDE_YOURCHG = 1 << 5, HIDE_TIME = 1 << 6, HIDE_DATE = 1 << 7, HIDE_ACTION = 1 << 8, HIDE_CHG = 1 << 9, HIDE_SIZE = 1 << 10, HIDE_OTHEROPEN = 1 << 11, HIDE_NEWTYPE = 1 << 12, HIDE_TYPE = 1 << 13, HIDE_REV = 1 << 14, }; typedef struct _SHOWHIDECOLS { int mask; char * name; } SHOWHIDECOLS; class p4wFilePane : public p4wPane { public: p4wFilePane( p4wView & ParentView, p4wRequest & Request, AllCommands command ); virtual ~p4wFilePane(); // // Render functions. virtual void Begin(); virtual void Render( StrDict * varList ); virtual void RenderError( char *data, int escapeHTML ); virtual void RenderInfo( char *data, char level ); virtual void IgnoreError( char *data ); virtual void End(); // // ClientUser overrrides virtual void OutputError( const char *data ); virtual void HandleError( Error *err ); // // FileList is the output from a specified command that will be used // in a later fstat command. DepotList is a list of depots which is used // to provide the list of directories available from the root level. // RemoteList is a list of remote and spec depots which get a reduced menu. StrArray FileList; StrArray DepotList; StrArray RemoteList; // // ThumbList is the files we need to generate thumbnails for StrArray ThumbList; public: // // state variables. enum State { currentDirectory, gettingDirectories, gettingWhere, parsingFiles, gettingOpened, gettingThumbs, hasFatalError, done } fState; // // The states have gottne complicated enough // that sometimes we need to override from the outside void SetfState(State i) { fState = i; } private: // // Render elements of the page void RenderIcons( StrDict * varList, int currDir, int isDeleted ); void RenderFileCurrentDir( StrDict * varList, int isDeleted, StrPtr * haveRev, StrPtr * headRev, StrPtr * action, StrPtr * owner, StrPtr * headType, StrPtr * type, AllCommands ac, StrBufDict * cmdArgs ); void RenderEmptyWarning(); void RenderDirsInList(); void RenderSubDirs( const StrPtr *rootDir, int nLevels, StrBuf &clientFile, StrBuf &subDirChain ); void RenderPrevDirs( const StrPtr *rootDir ); void RenderFile( const StrPtr *rootDir, const StrPtr *subDirChain, const StrPtr *clientFile, const StrPtr *haveRev, const StrPtr *headRev, const StrPtr *headType, const StrPtr *type, const StrPtr *owner, AllCommands ac, StrBufDict *cmdArgs, StrDict * varList ); void AddDetails( StrPtr *action, StrPtr *owner, StrDict *varList, p4wHtml & suffix ); void RenderThumbs( StrDict * varList, StrPtr * depotFile, StrPtr * headRev, StrPtr * haveRev, AllCommands ac, StrBufDict * cmdArgs ); void RenderThumbHdr(); void RenderThumbEnd(); // // Utility methods void OutputDirAsUrl( const char *directory ); void OutputDirMenu( const char *directory ); void GetFilePath( const StrPtr *depotFile, const StrPtr *workspace, StrBuf &clientFile ); int GetRootDir( const StrPtr *clientFile, StrBuf &rootDir ); int SetDirsFromDepots(); int NotOpenedByOwner( const StrPtr *owner ); int InRequestDir(StrDict * varList, StrPtr *reqDir); StrBuf *RootRelative(StrBuf * pathFile); int findFilterName(AllCommands ac); void doFilterMessage(StrBuf *msg); void generateGrossShowHideMenu(); void generateFineShowHideMenu(); void generateShowHideMenu(void *ptrSH, int itemsalreadyinmenu=0); void doEndPage(); // DirectoryList is a list of directories, // generated from either dirs or depots. ExcludeList // is a list of depots not mapped to the current // client. Dirlist is a pointer to either DirectoryList, // or DepotList: in either case, it points to the list // of directories to be displayed on the page. StrArray *DirList; StrArray DirectoryList; StrArray ExcludeList; // // Keep list of dirs with the full path specification. // These may be needed if we detect that the calculated offset // to the dir node is bad. This can happen if the path is in // client syntax instead of the expected depot syntax. int fFileOffsetBad; StrArray FullDirList; // // Misc member variables int fCurDir; AllCommands fCommand; int fFullBrowseMode; int fSeenBegin; int fSeenData; int fFileOffset; int fAbortNow; int fSeenThumbs; int fRowctr; int fNoEndNow; int fFileCtr; int fDirCtr; int fShowHideCols; int fstatRun; StrBuf fLastFolder; StrBuf fSubfolders; StrBuf fSubpath; StrBuf fIgnoredError; }; #endif // p4wFilePane_H
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 12234 | Matt Attaway |
Rejigger P4Web project in preparation for official sunsetting The bin directory contains the last official builds of P4Web from the Perforce download site. P4Web is soon to be completely sunsetted; these builds are here for folks who don't want to build their own. To better handle the archived builds the source code has been moved into a separate src directory. |
||
//guest/perforce_software/p4web/Panes/p4wFilePane.h | |||||
#1 | 8914 | Matt Attaway | Initial add of the P4Web source code |