// // Copyright 2000 Perforce Software. All rights reserved. // // This file is part of Perforce - the FAST SCM System. // // p4wPane: // A pane (element in a view) in the p4w interface. #ifndef p4wPane_H #define p4wPane_H // // Includes #include "p4wRequest.h" #include "p4wView.h" // // External classes class StrDict; // // p4wPane class class p4wPane : public ClientUser { public: // // Class constants public: // // Constructors and destructor. p4wPane( p4wView & ParentView, p4wRequest & Request ); virtual ~p4wPane(); // // Render functions. virtual void SetVarList( StrDict * vl ) {}; virtual void Begin() {}; virtual void Render( StrDict * varList ) {}; virtual void RenderText( char *data ) {}; virtual void RenderBinary( char *data, int len ) {}; virtual void End() {}; // // RenderInfo call usually means we have a protocol error. We'll // provide a method that outputs this error. Child classes // where this is not a mistake must override this. virtual void RenderInfo( char *data, char level ); // // Provide an overridable default error rendering method virtual void RenderError( char *data, int escapeHTML ); virtual void IgnoreError( char *data ) {} // // ClientUser overrides. virtual void Diff( FileSys *f1, FileSys *f2, int doPage, char *df, Error *e ); virtual void OutputError( const char * errBuf ); virtual void HandleError( Error *err ); virtual void InputData( StrBuf * strbuf, Error * e ); virtual void Prompt( const StrPtr &msg, StrBuf &rsp, int noEcho, Error *e ) {} virtual void Message( Error *e ); // // Share fatal error status with the world int FatalError() { return fHadFatalError; }; // // Some other default error rendering methods that can be // called from RenderError void RenderErrorTbl( char *data, int escapeHTML ); void RenderErrorList( char *data, int escapeHTML ); void RenderErrorUList( char *data, int escapeHTML ); void RenderErrorTxt( char * data, int escapeHTML ); // // May choose to ignore most errors void DoHandleError( Error *err, int ignoreMost ); protected: // // OutputDirHeader methods generate a file heading where each component // of the file is a link to the path or file browser. int OutputDirectoryHeader( char *fullPath, int isFileBrowser, int useBigText, int useDepot ); int OutputDirHeaderDepot( char *fullPath, int isFileBrowser, int useBigText ); int OutputDirHeaderWS( char *fullPath, int isFileBrowser, int useBigText ); // // Some common html constructs void OutputIcon( const char *name, int height, int width, const char *alt, int suppressBorder ); void OutputHREF( const char *prefix, const char *path, AllCommands cmd, StrBufDict *cmdArgs, const char *link, const char *suffix, const char *cls=0, const char *title=0, const char *id =0, const char *jshandler =0, const char *jsaction =0 ); // // Has the page content limit in bytes been exceeded on this page int PageLimitExceeded(); // // Reorder the Spec using server's gui hints void ReorderSpec( StrPtr *oldSpec ); // // Generates a line used to underline the previous row void doUnderline(); // // Are we in unicode mode? Needed for outputting text int Unicode() { return fRequest.GetUnicode(); }; // // Obtain a bit field corresponding to which menus to show int GetFileMenuShowVals( StrDict * varList ); // // Our parent view and request. p4wView &fView; p4wRequest &fRequest; // // The current specdef. class Spec *fSpec; // // Is this a spec form? int fIsForm; int fSeenOutputStat; int fHadFatalError; int fPrintedError; int fFirstErrorOnly; // // Have any diffs been found? int fDiffsFound; // // Does path have workspace root in it? int fWRootFound; // // Generate prompts to re-enter incorrect path void PromptRetry( const char *err ); // // Has a password prompt page been constructed? // Also save the text to print out later if needed int fPromptedPW; StrBuf fPasswdErrorPage; private: // // We receive these calls ourself so that we can create the entire // ::Begin, ::Render, ::End sequence. void OutputStat( StrDict * varList ); void OutputText( const char * data, int len ); void OutputBinary( const char *data, int len ); void OutputInfo( char level, const char * data ); void Finished(); // // Handle the password errors appropriately void promptPassword( const char *err, int needsCreate=0 ); // // Has the page content limit been exceeded int fLimitExceeded; }; #endif // p4wPane_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/p4wPane.h | |||||
#1 | 8914 | Matt Attaway | Initial add of the P4Web source code |