00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifdef __CLDAQ_ROOT_USE
00020 #include <TGWindow.h>
00021 #include "TRecordDisplayMenuBar.hh"
00022 #include "TRecordDisplay.hh"
00023 #include "TRecordDisplayPreference.hh"
00024
00025 TRecordDisplayMenuBar::TRecordDisplayMenuBar( TRecordDisplay* d )
00026 : TRecordDisplayComponent( d ),
00027 TGMenuBar( theRecordDisplay, 0, 0 ),
00028 theMenuFile( 0 ),
00029 theMenuCtrl( 0 ),
00030 theMenuEdit( 0 ),
00031 theMenuView( 0 )
00032 {
00033 Build();
00034 }
00035
00036 TRecordDisplayMenuBar::~TRecordDisplayMenuBar()
00037 {
00038 delete theMenuFile;
00039 delete theMenuCtrl;
00040 delete theMenuEdit;
00041 delete theMenuView;
00042 }
00043
00044 Tvoid TRecordDisplayMenuBar::Build()
00045 {
00046 TRecordDisplay* p = theRecordDisplay;
00047 TGLayoutHints* pL = p -> GetPreference() -> GetPopupMenuLayoutHint();
00048 TGLayoutHints* mL = p -> GetPreference() -> GetMenuBarLayoutHint();
00049 const TGWindow* w = gClient -> GetRoot();
00050
00051 theMenuFile = new TGPopupMenu( w );
00052 theMenuCtrl = new TGPopupMenu( w );
00053 theMenuEdit = new TGPopupMenu( w );
00054 theMenuView = new TGPopupMenu( w );
00055
00056 theMenuFile -> AddLabel("Under Construction...");
00057 theMenuFile -> AddSeparator();
00058 theMenuFile -> AddEntry("&Open...", p->MENU_FILE_OPEN);
00059 theMenuFile -> AddEntry("&Browse...", p->MENU_FILE_BROWSE);
00060 theMenuFile -> AddSeparator();
00061 theMenuFile -> AddEntry("&Save", p->MENU_FILE_SAVE);
00062 theMenuFile -> AddEntry("Save As...", p->MENU_FILE_SAVEAS);
00063 theMenuFile -> AddSeparator();
00064 theMenuFile -> AddEntry("&Print", p->MENU_FILE_PRINT);
00065 theMenuFile -> AddEntry("Print As...", p->MENU_FILE_PRINTAS);
00066 theMenuFile -> AddSeparator();
00067 theMenuFile -> AddEntry("&Quit", p->MENU_FILE_QUIT);
00068 theMenuFile -> Associate( theRecordDisplay );
00069
00070 theMenuCtrl -> AddLabel("Under Construction...");
00071 theMenuCtrl -> AddSeparator();
00072 theMenuCtrl -> AddEntry("&Start", p->MENU_CTRL_START);
00073 theMenuCtrl -> AddEntry("&Pause", p->MENU_CTRL_PAUSE);
00074 theMenuCtrl -> AddEntry("&Update", p->MENU_CTRL_UPDATE);
00075 theMenuCtrl -> AddEntry("&Stop", p->MENU_CTRL_STOP);
00076 theMenuCtrl -> Associate( theRecordDisplay );
00077
00078 theMenuEdit -> AddLabel("Under Construction...");
00079 theMenuEdit -> AddSeparator();
00080 theMenuEdit -> AddEntry("&Edit", p->MENU_EDIT_EDIT);
00081 theMenuEdit -> AddEntry("&Undo", p->MENU_EDIT_UNDO);
00082 theMenuEdit -> AddEntry("&Clear", p->MENU_EDIT_CLEAR);
00083 theMenuEdit -> AddEntry("&Initialize", p->MENU_EDIT_INITIALIZE);
00084 theMenuEdit -> AddEntry("&Prefereces...", p->MENU_EDIT_PREFERENCES);
00085 theMenuEdit -> Associate( theRecordDisplay );
00086
00087 theMenuView->AddLabel("Under Construction...");
00088 theMenuView->AddSeparator();
00089 theMenuView->AddEntry("Full &Screen", p->MENU_VIEW_FULL_SCREEN);
00090 theMenuView->AddEntry("&Iconify", p->MENU_VIEW_ICONIFY);
00091 theMenuView->AddEntry("&Color List", p->MENU_VIEW_COLOR_LIST);
00092 theMenuView->AddEntry("&Font List", p->MENU_VIEW_FONT_LIST);
00093 theMenuView->AddEntry("&Marker List", p->MENU_VIEW_MARKER_LIST);
00094 theMenuView->AddEntry("&X3D", p->MENU_VIEW_X3D);
00095 theMenuView->AddEntry("&Open GL", p->MENU_VIEW_OPEN_GL);
00096 theMenuView->Associate(theRecordDisplay);
00097
00098 AddPopup("&File", theMenuFile, pL);
00099 AddPopup("&Ctrl", theMenuCtrl, pL);
00100 AddPopup("&Edit", theMenuEdit, pL);
00101 AddPopup("&View", theMenuView, pL);
00102
00103
00104 theRecordDisplay->AddFrame(this,mL);
00105
00106
00107
00108
00109
00110 theFinishBuild = Ttrue;
00111
00112 return;
00113 }
00114 #endif
00115
00116 #ifdef __CLDAQ_ROOT_DLL
00117 ClassImp(TRecordDisplayMenuBar)
00118 #endif