// Copyright 1999 (c) by Perforce Software, Inc. All rights reserved. // // p4wMenuPane: // The menu bar pane. #ifndef p4wMenuPane_H #define p4wMenuPane_H // // Includes // #include "p4wAllCommands.h" #include "p4wMenuPaneOpts.h" #include "p4wPane.h" // // Defines // #define NFILEDIROPTS (sizeof(fileDirVal)/sizeof(fileDirVal[0])) #define NFILEFILEOPTS (sizeof(fileFileVal)/sizeof(fileFileVal[0])) #define NCHANGESUBOPTS (sizeof(changeSubVal)/sizeof(changeSubVal[0])) #define NBRANCHSUBOPTS (sizeof(branchSubVal)/sizeof(branchSubVal[0])) #define NLABELSUBOPTS (sizeof(labelSubVal)/sizeof(labelSubVal[0])) #define NCLIENTSSUBOPTS (sizeof(clientsSubVal)/sizeof(clientsSubVal[0])) #define NCLIENTSUBOPTS (sizeof(clientSubVal)/sizeof(clientSubVal[0])) #define NJOBSUBOPTS (sizeof(jobSubVal)/sizeof(jobSubVal[0])) #define NMISCOPTS (sizeof(miscVal)/sizeof(miscVal[0])) // // External classes class StrDict; // // p4wMenuPane class class p4wMenuPane : public p4wPane { public: // // Constructors and destructor. p4wMenuPane( p4wView & ParentView, p4wRequest & Request, char *help ); virtual ~p4wMenuPane(); // // Render functions. virtual void Render( StrDict * varList ); // // Overrides for spec edit panes. virtual void GetAction( StrBuf & actionURL ); // // Returns true if command is verifiably a file browser mode command static int FromFileBrowser( AllCommands cmd ); // // Return menu string that matches command static char * GetMenuItem( AllCommands cmd, int browseOnly ); // Return page title for the specified command static char * GetMenuTitle( AllCommands cmd ); // Generate icons for list/details/thumbnails static void listviewIcons( p4wRequest *fRequest, AllCommands cmd ); // Generate popup menu for diff options static void diffsMenu( p4wRequest *fRequest ); // // Routines to generate a value that represents the menu items to show static int GetOtherUserSubChgMenuShowVals(); static int GetLockedBranchMenuShowVals(); static int GetLockedLabelMenuShowVals(); // // Routines to generate a JS submitted changelist menu static void renderSubChgMenu( p4wRequest *fRequest, const char *user ); // // Routines to generate a JS menu item static void renderSubChgMenuItem( AllCommands ac, p4wRequest *fRequest, int buXc=0 ); static void renderBranchMenuItem( AllCommands ac, p4wRequest *fRequest, int buXc=0 ); static void renderLabelMenuItem( AllCommands ac, p4wRequest *fRequest, int buXc=0 ); static void renderClientMenuItem( AllCommands ac, p4wRequest *fRequest, int buXc=0 ); static void renderJobMenuItem( AllCommands ac, p4wRequest *fRequest, int buXc=0 ); private: // // Generate the tabs for a command type void doTabs( AllCommands ac ); // // Generate the subnavigation pane for a command type void doSubNav( AllCommands ac ); // // Generate the icons on the subnavigation pane void doIcons( AllCommands ac ); // // Return tab value based on type of command TabType getTab( AllCommands ac ); // // Generate the cancel button void doCancelButton(); // // Generate the logout button void doLogoutButton(); // // Generate a location url for the given command type static void redirectUrl( AllCommands ac, StrBuf & newUrl, p4wRequest *fRequest ); // // Generate a thumbnail submenu item static void thumbnailSubmenu( p4wRequest *fRequest, int i, StrBuf & thumbnailAC, StrBuf & reqURL ); // // Generate a diff submenu item static int diffSubmenu( p4wRequest *fRequest, int i, AllCommands ac, const StrPtr *dw, StrBuf & path, StrBufDict & args ); // // Generate an icon static void OutputIcon( p4wRequest *fRequest, const char *iconName, int height, int width ); int fIsReadOnly; StrBuf fHelpText; }; #endif // p4wMenuPane_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/p4wMenuPane.h | |||||
#1 | 8914 | Matt Attaway | Initial add of the P4Web source code |