// // Copyright 2003 Perforce Software. All rights reserved. // // This file is part of Perforce - the FAST SCM System. // // p4wSpecPane: // A mix-in class for spec panes. A spec pane either displays the // current spec or generates a form for editting the spec. #ifndef p4wSpecPane_H #define p4wSpecPane_H #include "p4wPane.h" class StrDict; class p4wHtml; class p4wSpecPane : public p4wPane { public: p4wSpecPane( p4wView & ParentView, p4wRequest & Request, int isForm = 0 ); virtual ~p4wSpecPane(); // // Render functions. virtual void SetVarList( StrDict * vl ) { fVarList = vl; } virtual void Begin(); virtual void Render( StrDict * varList ); virtual void RenderError( char *data, int escapeHTML ); virtual void End(); // // Overrides for spec panes. virtual int IgnoreField( const char * field ) = 0; virtual int MakeFieldReadOnly( const char * field ) { return 0; }; virtual int CustomField( const char * field, StrDict * varList, int fLen = 0, SpecElem *se = NULL ) = 0; virtual void CustomAppendToTag(StrBuf tagOut, p4wHtml *htm); virtual void RenderExistsNotNew( StrDict * varList ); // // Override to generate the ACTION value of the form. virtual void GetAction( StrBuf & actionURL ) {}; virtual void SetActionOverride( AllCommands ac ) {}; // // Generate the ACTION value string using passed in ac & // dynamic arg values. void ConstructAction( AllCommands ac, StrBufDict *args, int usePath, StrBuf & actionURL ); protected: void FormatFields( p4wHtml & html, const char *tag, const char *capTop = NULL, const char *fldTop = NULL, const char *colspan = NULL ); // // Form characteristics: max field len, number of table columns int fTextALen; int fNCols; // // Form field characteristics int fIsOpen; int fLeaveOpen; int fIsMiddle; int fIsIndented; private: void renderForm( StrDict * varList ); void renderNoForm( StrDict * varList ); void setSpecParams( int guiHints ); void setFieldParams( int guiHints, int specPos ); StrBuf fTitle; StrDict * fVarList; int fExistsNotNew; }; #endif // p4wSpecPane_H
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 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. |
||
#1 | 8914 | Matt Attaway | Initial add of the P4Web source code |