TMainDisplayWindow.hxx
Go to the documentation of this file.00001 #ifndef _WaveformDisplayWindowRUNWINDOW_H_
00002 #define _WaveformDisplayWindowRUNWINDOW_H_
00003
00004 #include <TGClient.h>
00005 #include <TCanvas.h>
00006 #include <TGButton.h>
00007 #include <TGFrame.h>
00008 #include <TRootEmbeddedCanvas.h>
00009 #include <TGObject.h>
00010 #include <TGTab.h>
00011 #include <TGNumberEntry.h>
00012 #include <TGLabel.h>
00013 #include <TFile.h>
00014 #include <TApplication.h>
00015
00016
00017
00018 class TMainDisplayWindow {
00019
00020 private:
00021
00022
00023 TGMainFrame *fMain;
00024 TGTab *fTab;
00025
00026
00027 TGFrame *fFrame;
00028 TGHorizontalFrame *fHframe;
00029
00030
00031
00032 bool fIsOffline;
00033
00034 bool fProcessingPaused;
00035
00036
00037 TGTextButton *fSavePadButton;
00038 TGTextButton *fSaveCanvasButton;
00039
00040
00041 TGTextButton *fNextButton;
00042
00043
00044 TGTextButton *fResetButton;
00045
00046
00047 TGTextButton *fQuitButton;
00048
00049
00050 TGTextButton *fPauseButton;
00051
00052
00053 TGNumberEntry *fNumberSkipEventButton;
00054
00055
00056
00057
00058
00059 TGTab* GetTab(std::pair<int,int> tabindex);
00060
00061
00062
00063 std::string GetTabName(TGTab *tab, int index = -1);
00064
00065
00066
00067
00068 int GetNumberSubTabs(int i);
00069
00070
00071 TRootEmbeddedCanvas* GetEmbeddedCanvas(const char *name);
00072
00073 public:
00074
00075 TGTextButton* GetResetButton(){ return fResetButton;}
00076
00077 TGTextButton* GetNextButton(){ return fNextButton;}
00078
00079 TGTextButton* GetQuitButton(){ return fQuitButton;}
00080
00081 TGNumberEntry* GetSkipEventButton(){ return fNumberSkipEventButton;}
00082
00083 TMainDisplayWindow(const TGWindow *p,UInt_t w,UInt_t h, bool isOffline);
00084 virtual ~TMainDisplayWindow();
00085
00086
00087
00088 void SavePadButtonAction();
00089
00090
00091 void SaveCanvasButtonAction();
00092
00093
00094 void PauseResumeButtonAction();
00095
00096
00097 bool IsDisplayPaused(){
00098 return fProcessingPaused;
00099 }
00100
00101 std::pair<int,int> AddSingleTab(std::string name, TGTab * tab= 0, int mainTabIndex = -1);
00102
00103 std::pair<int,int> AddCanvas(std::string subtabname, std::string tabname=std::string(""));
00104
00105
00106
00107 void BuildWindow();
00108
00109 void ResetSize();
00110
00111
00112
00113 TCanvas* GetCanvas(const char *name);
00114
00115
00116
00117 TRootEmbeddedCanvas* GetCurrentEmbeddedCanvas();
00118
00119
00120 TGCompositeFrame* GetCurrentCompositeFrame();
00121
00122
00123 TGCompositeFrame* GetCompositeFrame(std::pair<int,int> index);
00124
00125
00126 std::pair<int,int> GetCurrentTabIndex();
00127
00128
00129 std::string GetCurrentTabName();
00130
00131
00132
00133 TGTab* GetSubTab(int index);
00134
00135
00136 TGMainFrame* GetMain(){return fMain;};
00137 TGTab* GetTab(){return fTab;};
00138
00139
00140
00141 ClassDef(TMainDisplayWindow,1)
00142 };
00143
00144
00145 #endif