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