File indexing completed on 2023-03-17 11:01:09
0001 #ifndef Fireworks_Core_CSGContinuousAction_h
0002 #define Fireworks_Core_CSGContinuousAction_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include <string>
0023
0024
0025 #include "Fireworks/Core/interface/CSGAction.h"
0026
0027
0028
0029 class CSGContinuousAction : public CSGAction {
0030 public:
0031 CSGContinuousAction(CSGActionSupervisor* sup, const char* name);
0032
0033
0034
0035 bool isRunning() const { return m_isRunning; }
0036
0037
0038
0039
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
0056 void globalEnable() override;
0057 void globalDisable() override;
0058
0059 void switchMode();
0060
0061 CSGContinuousAction(const CSGContinuousAction&) = delete;
0062
0063 const CSGContinuousAction& operator=(const CSGContinuousAction&) = delete;
0064
0065 private:
0066
0067 std::string m_imageFileName;
0068 std::string m_runningImageFileName;
0069
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