// // Copyright 2001 Perforce Software. All rights reserved. // // This file is part of Perforce - the FAST SCM System. // // p4wJobSpecPane: // Displays output of jobspec -o #include <p4wp4.h> #include "p4wStrBuf.h" #include "p4wHtml.h" #include "p4wPane.h" #include "p4wJobSpecPane.h" p4wJobSpecPane::p4wJobSpecPane( p4wView & ParentView, p4wRequest & Request ) : p4wSpecPane( ParentView, Request, 0 ) { } p4wJobSpecPane::~p4wJobSpecPane() { } void p4wJobSpecPane::Begin() { // // Begin the pane with a short title p4wHtml htm; p4wURL urlMaker; StrBuf grayIcon; StrBuf clearIcon; // // Used to generate line & vertical white space urlMaker.ConstructURL( grayIcon, "/grayPixelIcon", AC_ICON, NULL ); urlMaker.ConstructURL( clearIcon, "/clearpixelIcon", AC_ICON, NULL ); htm.comment( "BEGIN SPEC PANE" ); if (fRequest.GetScreenChunks() & SCRN_TITLE) { // // Generate title with line underneath htm.beginTRow(); htm.beginCol(); htm.beginSpan( "title" ); htm << "View Field Descriptions:"; htm.endSpan(); htm.endCol(); htm.endTRow(); htm.beginTRow(); htm.beginCol( "top" ); htm.icon( grayIcon.Text(), "1", "100%", "", 1, "0", "0" ); htm.endCol(); htm.endTRow(); // // Some vertical white space htm.beginTRow(); htm.beginCol(); htm.icon( clearIcon.Text(), "15", "0", "", 1 ); htm.endCol(); htm.endTRow(); } htm.beginTRow(); htm.beginCol(); htm.beginTable( "0" ); fRequest << htm; } int p4wJobSpecPane::IgnoreField( const char * field ) { // // No fields are ignored. return 0; } int p4wJobSpecPane::CustomField( const char * field, StrDict * varList, int len, SpecElem *sein ) { // // Use <PRE> for any text fields in order to preserve // original spacing without wrapping SpecElem *se; Error e; p4wHtml htm; se = fSpec->Find( StrRef( field ), &e ); if( !se->IsText() ) return 0; StrPtr * val = varList->GetVar( StrRef( field ) ); StrBuf tag; tag << field << ":"; htm.beginTRow(); htm.beginCol( "top" ); htm.text( tag.Text(), "b" ); htm.endCol(); htm.beginCol(); htm.beginUnformatted(); htm.text( p4wStrBuf().EscapeHTML( *val, Unicode() ).Text() ); htm.endUnformatted(); htm.endCol(); htm.endTRow(); fRequest << htm; // // We're done with this custom field. return 1; }
# | 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 |