CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/Fireworks/Core/interface/CmsShowMainFrame.h

Go to the documentation of this file.
00001 #ifndef Fireworks_Core_CmsShowMainFrame_h
00002 #define Fireworks_Core_CmsShowMainFrame_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Core
00006 // Class  :     CmsShowMainFrame
00007 //
00016 //
00017 // Original Author:  Chris Jones
00018 //         Created:  Thu May 29 18:11:16 CDT 2008
00019 // $Id: CmsShowMainFrame.h,v 1.45 2011/07/14 02:21:31 amraktad Exp $
00020 //
00021 
00022 // system include files
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 // user include files
00034 
00035 // forward declarations
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    // ---------- const member functions ---------------------
00068 
00069    // ---------- static member functions --------------------
00070 
00071    // ---------- member functions ---------------------------
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    void setSummaryViewWeight(float);
00106    float getSummaryViewWeight() const;
00107 
00108    ClassDef(CmsShowMainFrame, 0);
00109 
00110 protected:
00111    FWCustomIconsButton* m_filterEnableBtn;
00112    TGTextButton*        m_filterShowGUIBtn;
00113    FWNumberEntryField*  m_runEntry;
00114    FWNumberEntryField*  m_lumiEntry;
00115    FWNumberEntryField*  m_eventEntry;
00116    FWIntValueListener*  m_delaySliderListener;
00117    
00118    const TGPicture*     m_filterIcons[9];
00119 
00120 private:
00121    CmsShowMainFrame(const CmsShowMainFrame&); // stop default
00122    const CmsShowMainFrame& operator=(const CmsShowMainFrame&); // stop default
00123 
00124    void makeFixedSizeLabel(TGHorizontalFrame* p, const char* txt,
00125                            UInt_t bgCol, UInt_t txtCol,
00126                            Int_t  width, Int_t  height);
00127 
00128    // ---------- member data --------------------------------
00129 
00130    FWGUIManager *m_manager;
00131    Long_t m_tooltipDelay;
00132    TGLabel* m_timeText;
00133    CSGAction *m_nextEvent;
00134    CSGAction *m_previousEvent;
00135    CSGAction *m_goToFirst;
00136    CSGAction *m_goToLast;
00137    CSGAction *m_playDelay;
00138    CSGAction *m_fworksInfo;
00139    CSGContinuousAction *m_playEvents;
00140    CSGContinuousAction *m_playEventsBack;
00141    CSGContinuousAction *m_loopAction;
00142    
00143    TGMainFrame* m_fworksAbout;
00144 
00145    TGSlider* m_delaySlider;
00146    TGLabel*  m_delayLabel;
00147 
00148    TGStatusBar* m_statBar;
00149 
00150    TGPopupMenu *m_newViewerMenu;
00151 };
00152 
00153 
00154 #endif