#include <EditMenu.h>
Public Member Functions | |
| EditMenu (TGMenuBar *menubar, TGMainFrame *mf) | |
| virtual | ~EditMenu () |
| void | HandleMenu (int menu) |
Private Member Functions | |
| int | Preferences () |
| int | NoImpl (const char *m) |
Private Attributes | |
| TGMainFrame * | fMainFrame |
| Main graphics frame. | |
| TGPopupMenu * | fEditMenu |
| The file menu. | |
| TGLayoutHints * | fLayout |
| How to layout the menu. | |
Definition at line 19 of file EditMenu.h.
|
||||||||||||
|
Definition at line 26 of file EditMenu.cxx. References cfg::Table::ConfigList, fEditMenu, fLayout, gsConfig, and cfg::Table::Instance().
00026 : 00027 fMainFrame(mf) 00028 { 00029 fEditMenu = new TGPopupMenu(gClient->GetRoot()); 00030 fLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0); 00031 00032 // Create the list of functions. Associate each which a command code 00033 00034 int icfg = 0; 00035 cfg::Table::ConfigList& cfglist = cfg::Table::Instance().GetList(); 00036 cfg::Table::ConfigList::iterator itr (cfglist.begin()); 00037 cfg::Table::ConfigList::iterator itrEnd(cfglist.end()); 00038 for (; itr!=itrEnd; ++itr) { 00039 fEditMenu->AddEntry((*itr)->GetName(), icfg); 00040 gsConfig[icfg] = (*itr); 00041 ++icfg; 00042 } 00043 00044 fEditMenu->Connect("Activated(Int_t)", 00045 "evdb::EditMenu",this,"HandleMenu(int)"); 00046 00047 // Attach the menu to the menu bar 00048 menubar->AddPopup("&Edit",fEditMenu,fLayout); 00049 } |
|
|
Definition at line 53 of file EditMenu.cxx. References fEditMenu, and fLayout.
|
|
|
Definition at line 61 of file EditMenu.cxx. References fMainFrame, and gsConfig.
00062 {
00063 new CfgEdit(gsConfig[i], fMainFrame);
00064 }
|
|
|
Definition at line 76 of file EditMenu.cxx. References fMainFrame. Referenced by Preferences().
00077 {
00078 std::string s;
00079 s = "Sorry action '"; s += method; s+= "' is not implemented.\n";
00080 // Why isn't this a memory leak? Dunno, but its seems the TG classes
00081 // are all managed by TGClient which takes care of deletion
00082 new TGMsgBox(evdb::TopWindow(), fMainFrame,
00083 "No implementation",s.c_str(),kMBIconExclamation);
00084 return 0;
00085 }
|
|
|
Definition at line 68 of file EditMenu.cxx. References NoImpl().
00069 {
00070 this->NoImpl("Preferences");
00071 return 0;
00072 }
|
|
|
The file menu.
Definition at line 35 of file EditMenu.h. Referenced by EditMenu(), and ~EditMenu(). |
|
|
How to layout the menu.
Definition at line 36 of file EditMenu.h. Referenced by EditMenu(), and ~EditMenu(). |
|
|
Main graphics frame.
Definition at line 34 of file EditMenu.h. Referenced by HandleMenu(), and NoImpl(). |
1.3.5