LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
MenuBar.cxx
Go to the documentation of this file.
1 // $Id: MenuBar.cxx,v 1.1.1.1 2010-12-22 16:18:52 p-nusoftart Exp $
3 //
4 // The list of menus running across the top of a display
5 //
6 // messier@indiana.edu
8 #include <iostream>
9 #include "TGLayout.h"
10 #include "TGMenu.h"
11 
17 
18 namespace evdb{
19 
20  //......................................................................
21 
22  MenuBar::MenuBar(TGMainFrame* frame)
23  {
24  int padleft = 0;
25  int padright = 0;
26  int padtop = 1;
27  int padbottom = 1;
28 
29  // Create the menu bar
30  fMenuBar = new TGMenuBar(frame, 1, 1, kHorizontalFrame);
31  fLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX,
32  padleft, padright, padtop, padbottom);
33 
34  // Add the menus to it
35  fFileMenu = new FileMenu (fMenuBar, frame);
36  fEditMenu = new EditMenu (fMenuBar, frame);
37  fWindowMenu = new WindowMenu(fMenuBar, frame);
38  fHelpMenu = new HelpMenu (fMenuBar, frame);
39 
40  // Add the menu bar to the main window frame
41  frame->AddFrame(fMenuBar,fLayout);
42  }
43 
44  //......................................................................
45 
47  if (fHelpMenu) { delete fHelpMenu; fHelpMenu = 0; }
48  if (fWindowMenu) { delete fWindowMenu; fWindowMenu = 0; }
49  if (fEditMenu) { delete fEditMenu; fEditMenu = 0; }
50  if (fFileMenu) { delete fFileMenu; fFileMenu = 0; }
51  }
52 }// namespace
The edit pull down menu.
FileMenu * fFileMenu
File menu.
Definition: MenuBar.h:35
TGLayoutHints * fLayout
Layout of menu bar.
Definition: MenuBar.h:34
virtual ~MenuBar()
Definition: MenuBar.cxx:46
Pull down menu for launching new windows.
Manage all things related to colors for the event display.
TGMenuBar * fMenuBar
Menu bar across top of application.
Definition: MenuBar.h:33
The edit pull down menu.
Definition: EditMenu.h:19
MenuBar(TGMainFrame *frame)
Definition: MenuBar.cxx:22
WindowMenu * fWindowMenu
Window menu.
Definition: MenuBar.h:37
HelpMenu * fHelpMenu
Help menu.
Definition: MenuBar.h:38
The help pull down menu.
The file pull down menu.
EditMenu * fEditMenu
Edit menu.
Definition: MenuBar.h:36