// Copyright 1999 (c) by Perforce Software, Inc. All rights reserved. // // p4wHelpView: // The help view. // ------------------------------------- // Includes // #include <stdlib.h> #include <string.h> #include <p4wp4.h> #include "p4wStrBuf.h" #include "p4wHtml.h" #include "p4wView.h" #include "p4wMenuPane.h" #include "p4wHelpView.h" #include "p4wHelp.h" // // ------------------------------------- // Constructors and destructor. // p4wHelpView::p4wHelpView(p4wRequest & Request) : p4wView(Request) { initHelp(); // // Set the short and the long versions of the title fShortTitle.Set( "Help" ); fFullTitle.Set( "Help" ); } p4wHelpView::~p4wHelpView() { } // ------------------------------------- // Control item render functions. void p4wHelpView::RenderContent() { // // Generate help content by outputting help text p4wHtml htm; htm.comment( "BEGIN HELP CONTENT" ); htm.beginTRow(); htm.beginCol(); htm.beginTable( "0", "100%", "0", "0" ); htm.beginTRow(); htm.beginCol(); htm.text( fHelpText.Text() ); htm.endCol(); htm.endTRow(); htm.endTable(); htm.endCol(); htm.endTRow(); htm.comment( "END HELP CONTENT" ); fRequest << htm; } void p4wHelpView::initHelp(void) { // // Get the help text associated with the help type // from the URL const char *helpText = p4wHelpView::GetHelpText( &fRequest.GetURL() ); p4wHtml htm; StrBuf err; if( !helpText ) { err << "Internal help file missing for: " << fRequest.GetURL(); htm.text( err.Text(), NULL, NULL, "red" ); fHelpText << htm; } else { doHelpURLs( helpText ); } } void p4wHelpView::RenderMenu() { // // Draw the menu bar p4wMenuPane menuPane(*this, fRequest, "roadmap"); menuPane.Render(NULL); } const char * p4wHelpView::GetHelpText(const StrPtr *type) { // // Static method to return help text associated with // help type if( type == NULL ) { return NULL; } else if( *type == "actioncodes" ) { return actioncodesHelp; } else if( *type == "add" ) { return addHelp; } else if( *type == "addselect" ) { return addselectHelp; } else if( *type == "auth" ) { return authHelp; } else if( *type == "bitb" ) { return bitbHelp; } else if( *type == "branch" ) { return branchHelp; } else if( *type == "browsemodes" ) { return browsemodesHelp; } else if( *type == "browseonly" ) { return browseonlyHelp; } else if( *type == "client" ) { return clientHelp; } else if( *type == "commands" ) { return commandsHelp; } else if( *type == "controlpanel" ) { return controlpanelHelp; } else if( *type == "defs" ) { return defsHelp; } else if( *type == "delete" ) { return deleteHelp; } else if( *type == "deletespec" ) { return deletespecHelp; } else if( *type == "describe" ) { return describeHelp; } else if( *type == "diffing" ) { return diffingHelp; } else if( *type == "edit" ) { return editHelp; } else if( *type == "editbranch" ) { return editbranchHelp; } else if( *type == "editclient" ) { return editclientHelp; } else if( *type == "editjob" ) { return editjobHelp; } else if( *type == "editlabel" ) { return editlabelHelp; } else if( *type == "editpending" ) { return editpendingHelp; } else if( *type == "edituser" ) { return edituserHelp; } else if( *type == "errors" ) { return errorsHelp; } else if( *type == "filebrowser" ) { return filebrowserHelp; } else if( *type == "filelog" ) { return filelogHelp; } else if( *type == "filetype" ) { return filetypeHelp; } else if( *type == "findfiles" ) { return findfilesHelp; } else if( *type == "help_filetypes" ) { return help_filetypesHelp; } else if( *type == "helper" ) { return helperHelp; } else if( *type == "launcheditor" ) { return launcheditorHelp; } else if( *type == "howto" ) { return howtoHelp; } else if( *type == "integfb" ) { return integfbHelp; } else if( *type == "index" ) { return indexHelp; } else if( *type == "integpb" ) { return integpbHelp; } else if( *type == "integrate" ) { return integrateHelp; } else if( *type == "job" ) { return jobHelp; } else if( *type == "jobfields" ) { return jobfieldsHelp; } else if( *type == "label" ) { return labelHelp; } else if( *type == "lock" ) { return lockHelp; } else if( *type == "pathbrowser" ) { return pathbrowserHelp; } else if( *type == "pendingchangelists" ) { return pendingchangelistsHelp; } else if( *type == "quickstart" ) { return quickstartHelp; } else if( *type == "remove" ) { return removeHelp; } else if( *type == "labelsync" ) { return labelsyncHelp; } else if( *type == "resolve" ) { return resolveHelp; } else if( *type == "result" ) { return resultHelp; } else if( *type == "restrictfiles" ) { return restrictfilesHelp; } else if( *type == "revert" ) { return revertHelp; } else if( *type == "roadmap" ) { return roadmapHelp; } else if( *type == "rss" ) { return rssHelp; } else if( *type == "settings" ) { return settingsHelp; } else if( *type == "serverinfo" ) { return serverinfoHelp; } else if( *type == "submit" ) { return submitHelp; } else if( *type == "submittedchangelists" ) { return submittedchangelistsHelp; } else if( *type == "sync" ) { return syncHelp; } else if( *type == "tips" ) { return tipsHelp; } else if( *type == "thumbnails" ) { return thumbnailsHelp; } else if( *type == "unlock" ) { return unlockHelp; } else if( *type == "user" ) { return userHelp; } else if( *type == "xml" ) { return xmlHelp; } return NULL; } void p4wHelpView::doHelpURLs( const char *help ) { fHelpText.Set( help ); }
# | 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/Views/p4wHelpView.cpp | |||||
#1 | 8914 | Matt Attaway | Initial add of the P4Web source code |