Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:30

0001 #ifndef Fireworks_Core_CmsShowMainFrame_h
0002 #define Fireworks_Core_CmsShowMainFrame_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Core
0006 // Class  :     CmsShowMainFrame
0007 //
0008 /**\class CmsShowMainFrame CmsShowMainFrame.h Fireworks/Core/interface/CmsShowMainFrame.h
0009 
0010    Description: <one line class summary>
0011 
0012    Usage:
0013     <usage>
0014 
0015  */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Thu May 29 18:11:16 CDT 2008
0019 //
0020 
0021 // system include files
0022 #include <TQObject.h>
0023 #include <RQ_OBJECT.h>
0024 #include <vector>
0025 #include <TGFrame.h>
0026 
0027 #ifndef __CINT__
0028 #include <sigc++/sigc++.h>
0029 #include "Fireworks/Core/interface/CSGActionSupervisor.h"
0030 #endif
0031 
0032 // user include files
0033 
0034 // forward declarations
0035 class TGWindow;
0036 class TGTextButton;
0037 class TGPictureButton;
0038 class TGPopupMenu;
0039 class TGStatusBar;
0040 class TTimer;
0041 class CSGAction;
0042 class CSGContinuousAction;
0043 class FWGUIManager;
0044 class TGPopupMenu;
0045 class TGTextEntry;
0046 class TGLabel;
0047 class TGSlider;
0048 class FWIntValueListener;
0049 class FWCustomIconsButton;
0050 class FWNumberEntryField;
0051 
0052 namespace edm {
0053   class EventBase;
0054 }
0055 
0056 class CmsShowMainFrame : public TGMainFrame
0057 #ifndef __CINT__
0058     ,
0059                          public CSGActionSupervisor,
0060                          public sigc::trackable
0061 #endif
0062 {
0063   friend class FWGUIManager;
0064 
0065 public:
0066   CmsShowMainFrame(const TGWindow* p = nullptr, UInt_t w = 1, UInt_t h = 1, FWGUIManager* m = nullptr);
0067   ~CmsShowMainFrame() override;
0068 
0069   // ---------- const member functions ---------------------
0070 
0071   // ---------- static member functions --------------------
0072 
0073   // ---------- member functions ---------------------------
0074   void CloseWindow() override;
0075 
0076   void loadEvent(const edm::EventBase& event);
0077   void enableNavigatorControls();
0078   void quit();
0079   void enableActions(bool enable = true) override;
0080   void enablePrevious(bool enable = true);
0081   void enableNext(bool enable = true);
0082   void enableComplexNavigation(bool enable = true);
0083   bool previousIsEnabled();
0084   bool nextIsEnabled();
0085   void updateStatusBar(const char* status);
0086   void clearStatusBar();
0087   void setPlayDelayGUI(Float_t val, Bool_t sliderChanged);
0088   void HandleMenu(Int_t id) override;
0089   Bool_t HandleKey(Event_t* event) override;
0090   CSGContinuousAction* playEventsAction() const { return m_playEvents; }
0091   CSGContinuousAction* loopAction() const { return m_loopAction; }
0092 
0093   CSGContinuousAction* playEventsBackwardsAction() const { return m_playEventsBack; }
0094 
0095   CSGAction* createNewViewerAction(const std::string& iActionName, bool seaprator);
0096 
0097   void showFWorksInfo();
0098 
0099   void bindCSGActionKeys(const TGMainFrame* f) const;
0100 
0101   void setSummaryViewWeight(float);
0102   float getSummaryViewWeight() const;
0103 
0104   ClassDefOverride(CmsShowMainFrame, 0);
0105 
0106 protected:
0107   FWCustomIconsButton* m_filterEnableBtn;
0108   TGTextButton* m_filterShowGUIBtn;
0109   FWNumberEntryField* m_runEntry;
0110   FWNumberEntryField* m_lumiEntry;
0111   FWNumberEntryField* m_eventEntry;
0112   FWIntValueListener* m_delaySliderListener;
0113 
0114   const TGPicture* m_filterIcons[9];
0115 
0116 private:
0117   CmsShowMainFrame(const CmsShowMainFrame&);                   // stop default
0118   const CmsShowMainFrame& operator=(const CmsShowMainFrame&);  // stop default
0119 
0120   void makeFixedSizeLabel(TGHorizontalFrame* p, const char* txt, UInt_t bgCol, UInt_t txtCol, Int_t width, Int_t height);
0121 
0122   // ---------- member data --------------------------------
0123 
0124   FWGUIManager* m_manager;
0125   Long_t m_tooltipDelay;
0126   TGLabel* m_timeText;
0127   CSGAction* m_nextEvent;
0128   CSGAction* m_previousEvent;
0129   CSGAction* m_goToFirst;
0130   CSGAction* m_goToLast;
0131   CSGAction* m_playDelay;
0132   CSGAction* m_fworksInfo;
0133   CSGContinuousAction* m_playEvents;
0134   CSGContinuousAction* m_playEventsBack;
0135   CSGContinuousAction* m_loopAction;
0136 
0137   TGMainFrame* m_fworksAbout;
0138 
0139   TGSlider* m_delaySlider;
0140   TGLabel* m_delayLabel;
0141 
0142   TGStatusBar* m_statBar;
0143 
0144   TGPopupMenu* m_newViewerMenu;
0145 };
0146 
0147 #endif