メインページ   モジュール   名前空間一覧   クラス階層   アルファベット順一覧   構成   ファイル一覧   構成メンバ   ファイルメンバ   関連ページ    

TRecordDisplayMenuBar.cc

解説を見る。
00001 // ============================================================================
00002 //  $Id: TRecordDisplayMenuBar.cc,v 1.2 2004/03/07 10:30:27 goiwai Exp $
00003 //  $Name: CLDAQ-1-14-03 $
00004 //  $Log: TRecordDisplayMenuBar.cc,v $
00005 //  Revision 1.2  2004/03/07 10:30:27  goiwai
00006 //  ROOTに組みこむためのおまじないマクロを埋めこみました。
00007 //  全てにおいて完全に動作するわけではありません。
00008 //
00009 //  Revision 1.1  2004/03/01 02:36:25  goiwai
00010 //  RecordDisplay用のクラス群を置きました.
00011 //  お蔵入りになってたものに手直しを加えたものですが,
00012 //  まだ不充分な点も在ります.徐々に修正していきたいと思います.
00013 //  DataRecordオブジェクトを表示するためのツール群なのでRecordDisplayと呼
00014 //  んでいます,多分にオフライン要素が強いです.
00015 //  オンラインよりにしたものを後でEventDisplay(Eventを表示)としてコミット
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   //theParentFrame -> MapSubwindows();
00107   //theParentFrame -> Layout();
00108   //theParentFrame -> MapWindow();
00109 
00110   theFinishBuild = Ttrue;
00111 
00112   return;
00113 }
00114 #endif
00115 
00116 #ifdef __CLDAQ_ROOT_DLL
00117     ClassImp(TRecordDisplayMenuBar)
00118 #endif


CLDAQ - a Class Library for DataAcQuisition (Version 1.14.3)
Go IWAI -- goiwai at users.sourceforge.jp