Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-14 11:45:01

0001 #ifndef Fireworks_Core_CSGContinuousAction_h
0002 #define Fireworks_Core_CSGContinuousAction_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Core
0006 // Class  :     CSGContinuousAction
0007 //
0008 /**\class CSGContinuousAction CSGContinuousAction.h Fireworks/Core/interface/CSGContinuousAction.h
0009 
0010    Description: An action which continues over time (e.g. playing events)
0011 
0012    Usage:
0013     <usage>
0014 
0015  */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Tue Jul 29 10:19:42 EDT 2008
0019 //
0020 
0021 // system include files
0022 #include <string>
0023 
0024 // user include files
0025 #include "Fireworks/Core/interface/CSGAction.h"
0026 
0027 // forward declarations
0028 
0029 class CSGContinuousAction : public CSGAction {
0030 public:
0031   CSGContinuousAction(CSGActionSupervisor* sup, const char* name);
0032   //virtual ~CSGContinuousAction();
0033 
0034   // ---------- const member functions ---------------------
0035   bool isRunning() const { return m_isRunning; }
0036 
0037   // ---------- static member functions --------------------
0038 
0039   // ---------- member functions ---------------------------
0040   void createCustomIconsButton(TGCompositeFrame* p,
0041                                const TGPicture* upPic,
0042                                const TGPicture* downPic,
0043                                const TGPicture* disabledPic,
0044                                const TGPicture* upRunningPic,
0045                                const TGPicture* downRunningPic,
0046                                TGLayoutHints* l = nullptr,
0047                                Int_t id = -1,
0048                                GContext_t norm = TGButton::GetDefaultGC()(),
0049                                UInt_t option = 0);
0050   void stop();
0051 
0052   sigc::signal<void()> started_;
0053   sigc::signal<void()> stopped_;
0054 
0055   //override
0056   void globalEnable() override;
0057   void globalDisable() override;
0058 
0059   void switchMode();
0060 
0061   CSGContinuousAction(const CSGContinuousAction&) = delete;  // stop default
0062 
0063   const CSGContinuousAction& operator=(const CSGContinuousAction&) = delete;  // stop default
0064 
0065 private:
0066   // ---------- member data --------------------------------
0067   std::string m_imageFileName;
0068   std::string m_runningImageFileName;
0069   //const TGPicture* m_runningImage;
0070   const TGPicture* m_upPic;
0071   const TGPicture* m_downPic;
0072   const TGPicture* m_disabledPic;
0073   const TGPicture* m_runningUpPic;
0074   const TGPicture* m_runningDownPic;
0075 
0076   FWCustomIconsButton* m_button;
0077 
0078   bool m_isRunning;
0079 };
0080 
0081 #endif