Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
nutools
old
EventDisplayBase
MenuBar.cxx
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
// $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
7
////////////////////////////////////////////////////////////////////////
8
#include <iostream>
9
#include "TGLayout.h"
10
#include "TGMenu.h"
11
12
#include "nutools/EventDisplayBase/MenuBar.h"
13
#include "nutools/EventDisplayBase/FileMenu.h"
14
#include "nutools/EventDisplayBase/EditMenu.h"
15
#include "nutools/EventDisplayBase/WindowMenu.h"
16
#include "nutools/EventDisplayBase/HelpMenu.h"
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
46
MenuBar::~MenuBar
() {
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
53
////////////////////////////////////////////////////////////////////////
evdb::FileMenu
Definition:
FileMenu.h:19
evdb::MenuBar::fFileMenu
FileMenu * fFileMenu
File menu.
Definition:
MenuBar.h:35
evdb::MenuBar::fLayout
TGLayoutHints * fLayout
Layout of menu bar.
Definition:
MenuBar.h:34
evdb::MenuBar::~MenuBar
virtual ~MenuBar()
Definition:
MenuBar.cxx:46
evdb
Manage all things related to colors for the event display.
Definition:
Edge3DDrawer_tool.cc:10
evdb::MenuBar::fMenuBar
TGMenuBar * fMenuBar
Menu bar across top of application.
Definition:
MenuBar.h:33
evdb::EditMenu
The edit pull down menu.
Definition:
EditMenu.h:19
evdb::MenuBar::MenuBar
MenuBar(TGMainFrame *frame)
Definition:
MenuBar.cxx:22
evdb::WindowMenu
Definition:
WindowMenu.h:19
evdb::MenuBar::fWindowMenu
WindowMenu * fWindowMenu
Window menu.
Definition:
MenuBar.h:37
evdb::MenuBar::fHelpMenu
HelpMenu * fHelpMenu
Help menu.
Definition:
MenuBar.h:38
evdb::MenuBar::fEditMenu
EditMenu * fEditMenu
Edit menu.
Definition:
MenuBar.h:36
evdb::HelpMenu
Definition:
HelpMenu.h:18
Generated by
1.8.11