Go to the documentation of this file.00001 #ifndef Fireworks_Core_CmsShowMainFrame_h
00002 #define Fireworks_Core_CmsShowMainFrame_h
00003
00004
00005
00006
00007
00016
00017
00018
00019
00020
00021
00022
00023 #include <TQObject.h>
00024 #include <RQ_OBJECT.h>
00025 #include <vector>
00026 #include <TGFrame.h>
00027
00028 #ifndef __CINT__
00029 #include <sigc++/sigc++.h>
00030 #include "Fireworks/Core/interface/CSGActionSupervisor.h"
00031 #endif
00032
00033
00034
00035
00036 class TGWindow;
00037 class TGTextButton;
00038 class TGPictureButton;
00039 class TGPopupMenu;
00040 class TGStatusBar;
00041 class TTimer;
00042 class CSGAction;
00043 class CSGContinuousAction;
00044 class FWGUIManager;
00045 class TGPopupMenu;
00046 class TGTextEntry;
00047 class TGLabel;
00048 class TGSlider;
00049 class FWIntValueListener;
00050 class FWCustomIconsButton;
00051 class FWNumberEntryField;
00052
00053 namespace edm {
00054 class EventBase;
00055 }
00056
00057 class CmsShowMainFrame : public TGMainFrame
00058 #ifndef __CINT__
00059 , public CSGActionSupervisor, public sigc::trackable
00060 #endif
00061 {
00062 friend class FWGUIManager;
00063 public:
00064 CmsShowMainFrame(const TGWindow *p = 0,UInt_t w = 1,UInt_t h = 1,FWGUIManager *m = 0);
00065 virtual ~CmsShowMainFrame();
00066
00067
00068
00069
00070
00071
00072 virtual void CloseWindow();
00073
00074 void loadEvent(const edm::EventBase& event);
00075 void enableNavigatorControls();
00076 void quit();
00077 virtual void enableActions(bool enable = true);
00078 void enablePrevious(bool enable = true);
00079 void enableNext(bool enable = true);
00080 void enableComplexNavigation(bool enable = true);
00081 bool previousIsEnabled();
00082 bool nextIsEnabled();
00083 void updateStatusBar(const char* status);
00084 void clearStatusBar();
00085 void setPlayDelayGUI(Float_t val, Bool_t sliderChanged);
00086 virtual void HandleMenu(Int_t id);
00087 Bool_t HandleKey(Event_t *event);
00088 CSGContinuousAction* playEventsAction() const {
00089 return m_playEvents;
00090 }
00091 CSGContinuousAction* loopAction() const {
00092 return m_loopAction;
00093 }
00094
00095 CSGContinuousAction* playEventsBackwardsAction() const {
00096 return m_playEventsBack;
00097 }
00098
00099 CSGAction* createNewViewerAction(const std::string& iActionName, bool seaprator);
00100
00101 void showFWorksInfo();
00102
00103 void bindCSGActionKeys(const TGMainFrame* f) const;
00104
00105 ClassDef(CmsShowMainFrame, 0);
00106
00107 protected:
00108 FWCustomIconsButton* m_filterEnableBtn;
00109 TGTextButton* m_filterShowGUIBtn;
00110 FWNumberEntryField* m_runEntry;
00111 FWNumberEntryField* m_lumiEntry;
00112 FWNumberEntryField* m_eventEntry;
00113 FWIntValueListener* m_delaySliderListener;
00114
00115 const TGPicture* m_filterIcons[9];
00116
00117 private:
00118 CmsShowMainFrame(const CmsShowMainFrame&);
00119 const CmsShowMainFrame& operator=(const CmsShowMainFrame&);
00120
00121 void makeFixedSizeLabel(TGHorizontalFrame* p, const char* txt,
00122 UInt_t bgCol, UInt_t txtCol,
00123 Int_t width, Int_t height);
00124
00125
00126
00127 FWGUIManager *m_manager;
00128 Long_t m_tooltipDelay;
00129 TGLabel* m_timeText;
00130 CSGAction *m_nextEvent;
00131 CSGAction *m_previousEvent;
00132 CSGAction *m_goToFirst;
00133 CSGAction *m_goToLast;
00134 CSGAction *m_playDelay;
00135 CSGAction *m_fworksInfo;
00136 CSGContinuousAction *m_playEvents;
00137 CSGContinuousAction *m_playEventsBack;
00138 CSGContinuousAction *m_loopAction;
00139
00140 TGMainFrame* m_fworksAbout;
00141
00142 TGSlider* m_delaySlider;
00143 TGLabel* m_delayLabel;
00144
00145 TGStatusBar* m_statBar;
00146
00147 TGPopupMenu *m_newViewerMenu;
00148 };
00149
00150
00151 #endif