#include <HelpMenu.h>
Public Member Functions | |
| HelpMenu (TGMenuBar *menubar, TGMainFrame *mf) | |
| virtual | ~HelpMenu () |
| void | HandleMenu (int menu) |
Private Member Functions | |
| RQ_OBJECT ("evdb::HelpMenu") | |
| int | Contents () |
| int | ReleaseNotes () |
| int | About () |
| int | NoImpl (const char *m) |
Private Attributes | |
| TGMainFrame * | fMainFrame |
| TGPopupMenu * | fHelpMenu |
| TGLayoutHints * | fLayout |
|
||||||||||||
|
Definition at line 31 of file HelpMenu.cxx. References fHelpMenu, fLayout, kM_HELP_ABOUT, kM_HELP_CONTENTS, and kM_HELP_RELEASENOTES.
00031 : 00032 fMainFrame(mf) 00033 { 00034 //====================================================================== 00035 // Build the help menu 00036 //====================================================================== 00037 fHelpMenu = new TGPopupMenu(gClient->GetRoot()); 00038 fLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0); 00039 00040 // Create the list of functions. Associate each which a command code 00041 fHelpMenu->AddEntry("&Contents", kM_HELP_CONTENTS); 00042 fHelpMenu->AddEntry("&Release Notes", kM_HELP_RELEASENOTES); 00043 fHelpMenu->AddSeparator(); 00044 fHelpMenu->AddEntry("&About", kM_HELP_ABOUT); 00045 00046 fHelpMenu->Connect("Activated(Int_t)", 00047 "evdb::HelpMenu",this,"HandleMenu(int)"); 00048 00049 // Attach the menu to the menu bar 00050 menubar->AddPopup("&Help",fHelpMenu,fLayout); 00051 } |
|
|
Definition at line 55 of file HelpMenu.cxx. References fHelpMenu, and fLayout.
00056 {
00057 //======================================================================
00058 // Delete the help menu
00059 //======================================================================
00060 if (fLayout) { delete fLayout; fLayout = 0; }
00061 if (fHelpMenu) { delete fHelpMenu; fHelpMenu = 0; }
00062 }
|
|
|
Definition at line 105 of file HelpMenu.cxx. References fMainFrame. Referenced by HandleMenu().
00106 {
00107 //======================================================================
00108 // Pop open a window containing information about versions of things
00109 // used in the event display.
00110 //======================================================================
00111 std::string about;
00112
00113 about = "MIPP Event Display\n\n";
00114
00115 about += " Version: ";
00116 about += "$Id: HelpMenu.cxx,v 1.1 2007/02/09 04:44:13 fmwk Exp $";
00117 about += "\n";
00118
00119 about += " ";
00120 about += gSystem->GetBuildArch();
00121 about += "\n";
00122
00123 about += " ";
00124 about += gSystem->GetBuildNode();
00125 about += "\n";
00126
00127 about += " Based on ROOT version: ";
00128 about += gROOT->GetVersion();
00129 about += "\n";
00130
00131 new TGMsgBox(evdb::TopWindow(), fMainFrame,
00132 "Release notes",about.c_str(),kMBIconExclamation);
00133 return 0;
00134 }
|
|
|
Definition at line 81 of file HelpMenu.cxx. References NoImpl(). Referenced by HandleMenu().
00082 {
00083 //======================================================================
00084 // Start a help browser
00085 //======================================================================
00086 this->NoImpl("Contents");
00087 return 0;
00088 }
|
|
|
Definition at line 66 of file HelpMenu.cxx. References About(), Contents(), kM_HELP_ABOUT, kM_HELP_CONTENTS, kM_HELP_RELEASENOTES, NoImpl(), and ReleaseNotes().
00067 {
00068 //======================================================================
00069 // Take care of menu events
00070 //======================================================================
00071 switch(menu) {
00072 case kM_HELP_CONTENTS: this->Contents(); break;
00073 case kM_HELP_RELEASENOTES: this->ReleaseNotes(); break;
00074 case kM_HELP_ABOUT: this->About(); break;
00075 default: this->NoImpl("??"); break;
00076 }
00077 }
|
|
|
Definition at line 138 of file HelpMenu.cxx. References fMainFrame. Referenced by Contents(), and HandleMenu().
00139 {
00140 std::string s;
00141 s = "Sorry action '"; s += method; s+= "' is not implemented.\n";
00142 // Why isn't this a memory leak? Dunno, but its seems the TG classes
00143 // are all managed by TGClient which takes care of deletion
00144 new TGMsgBox(evdb::TopWindow(), fMainFrame,
00145 "No implementation",s.c_str(),kMBIconExclamation);
00146 return 0;
00147 }
|
|
|
Definition at line 92 of file HelpMenu.cxx. Referenced by HandleMenu().
00093 {
00094 //======================================================================
00095 // Print information about this release of the event display
00096 //======================================================================
00097 const char* releaseNotes = "This is a pre-release version of event display";
00098 new TGMsgBox(evdb::TopWindow(), evdb::TopWindow(),
00099 "Release notes",releaseNotes,kMBIconExclamation);
00100 return 0;
00101 }
|
|
|
|
|
|
Definition at line 36 of file HelpMenu.h. Referenced by HelpMenu(), and ~HelpMenu(). |
|
|
Definition at line 37 of file HelpMenu.h. Referenced by HelpMenu(), and ~HelpMenu(). |
|
|
Definition at line 35 of file HelpMenu.h. |
1.3.5