00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifdef __CLDAQ_ROOT_USE
00020 #ifndef CLDAQ__TRECORDDISPLAY_HH
00021 #define CLDAQ__TRECORDDISPLAY_HH
00022
00023 #include <TGFrame.h>
00024 #include "Tglobals.h"
00025 #include "TRecordDisplayComponent.hh"
00026
00027 class TGMainFrame;
00028 class TRecordDisplayPreference;
00029 class TRecordAssociationTable;
00030 class TH1D;
00031 class TRootEmbeddedCanvas;
00032 class TApplication;
00033 class TRecordDisplayCanvas;
00034 class TRecordDisplayTab;
00035 class TDirectory;
00036 class TRecordDisplayMenuBar;
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070 class TRecordDisplay
00071 : public TRecordDisplayComponent, public TGMainFrame
00072 {
00073
00074 public:
00075 enum {
00076 MENU_FILE_OPEN,
00077 MENU_FILE_BROWSE,
00078 MENU_FILE_SAVE,
00079 MENU_FILE_SAVEAS,
00080 MENU_FILE_PRINT,
00081 MENU_FILE_PRINTAS,
00082 MENU_FILE_QUIT,
00083
00084 MENU_CTRL_START,
00085 MENU_CTRL_PAUSE,
00086 MENU_CTRL_UPDATE,
00087 MENU_CTRL_STOP,
00088
00089 MENU_EDIT_EDIT,
00090 MENU_EDIT_UNDO,
00091 MENU_EDIT_CLEAR,
00092 MENU_EDIT_INITIALIZE,
00093 MENU_EDIT_PREFERENCES,
00094
00095 MENU_VIEW_FULL_SCREEN,
00096 MENU_VIEW_ICONIFY,
00097 MENU_VIEW_COLOR_LIST,
00098 MENU_VIEW_FONT_LIST,
00099 MENU_VIEW_MARKER_LIST,
00100 MENU_VIEW_X3D,
00101 MENU_VIEW_OPEN_GL,
00102
00103 N_MESSAGE_ID
00104 };
00105
00106 private:
00107 static TApplication* theApplication;
00108
00109 private:
00110 TRecordDisplayPreference* thePreference;
00111 TRecordAssociationTable* theAssociationTable;
00112 Tint theNumberOfRecords;
00113 Tbool theAutoBuild;
00114 TRecordDisplayTab* theTab;
00115 TRecordDisplayMenuBar* theMenu;
00116
00117 public:
00118 TRecordDisplay();
00119 TRecordDisplay( const Tstring& filename, TRecordAssociationTable* as = 0 );
00120 TRecordDisplay( TRecordDisplayPreference* pre, const Tstring& filename, TRecordAssociationTable* as = 0 );
00121 TRecordDisplay( TRecordDisplayPreference* pre, TRecordAssociationTable* as = 0 );
00122 ~TRecordDisplay();
00123
00124 public:
00125
00126 Tvoid Open();
00127 Tvoid Browse();
00128 Tvoid Save();
00129 Tvoid SaveAs();
00130 Tvoid Print();
00131 Tvoid PrintAs();
00132 Tvoid Quit();
00133
00134
00135 Tvoid Start();
00136 Tvoid Start( const Tstring& filename );
00137 Tvoid Pause();
00138 Tvoid Update();
00139 Tvoid Stop();
00140
00141
00142 Tvoid Edit();
00143 Tvoid Undo();
00144 Tvoid Clear();
00145 Tvoid Initialize();
00146 Tvoid Preferences();
00147
00148 public:
00149 Tvoid Associate();
00150 Tvoid AutoBuild();
00151 Tvoid Build();
00152 TDirectory* GetDirectory( Tstring* tags );
00153 Tstring GetHistogramName( Tint id ) const;
00154 Tstring GetCanvasName( Tint id ) const;
00155 Tvoid BuildMenuBar();
00156 Tvoid BuildTabFrame();
00157 TGCompositeFrame* GetFrame( Tstring* tags );
00158
00159 public:
00160 const TRecordDisplayPreference* GetPreference() const;
00161 const TRecordAssociationTable* GetAssociationTable() const;
00162 Tint GetNumberOfRecords() const;
00163 Tbool IsAutoBuild() const;
00164 Tbool ProcessMessage( Tlong msg, Tlong id, Tlong arg );
00165
00166 public:
00167 static TApplication* GetApplication();
00168
00169 #ifdef __CLDAQ_ROOT_DLL
00170 ClassDef(TRecordDisplay,0)
00171 #endif
00172
00173 };
00174
00175 inline TApplication* TRecordDisplay::GetApplication()
00176 {
00177 return theApplication;
00178 }
00179
00180 inline const TRecordDisplayPreference* TRecordDisplay::GetPreference() const
00181 {
00182 return thePreference;
00183 }
00184
00185 inline const TRecordAssociationTable* TRecordDisplay::GetAssociationTable() const
00186 {
00187 return theAssociationTable;
00188 }
00189
00190 inline Tint TRecordDisplay::GetNumberOfRecords() const
00191 {
00192 return theNumberOfRecords;
00193 }
00194
00195 inline Tbool TRecordDisplay::IsAutoBuild() const
00196 {
00197 return theAutoBuild;
00198 }
00199
00200 #endif
00201 #endif