CSGContinuousAction

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
#ifndef Fireworks_Core_CSGContinuousAction_h
#define Fireworks_Core_CSGContinuousAction_h
// -*- C++ -*-
//
// Package:     Core
// Class  :     CSGContinuousAction
//
/**\class CSGContinuousAction CSGContinuousAction.h Fireworks/Core/interface/CSGContinuousAction.h

   Description: An action which continues over time (e.g. playing events)

   Usage:
    <usage>

 */
//
// Original Author:  Chris Jones
//         Created:  Tue Jul 29 10:19:42 EDT 2008
//

// system include files
#include <string>

// user include files
#include "Fireworks/Core/interface/CSGAction.h"

// forward declarations

class CSGContinuousAction : public CSGAction {
public:
  CSGContinuousAction(CSGActionSupervisor* sup, const char* name);
  //virtual ~CSGContinuousAction();

  // ---------- const member functions ---------------------
  bool isRunning() const { return m_isRunning; }

  // ---------- static member functions --------------------

  // ---------- member functions ---------------------------
  void createCustomIconsButton(TGCompositeFrame* p,
                               const TGPicture* upPic,
                               const TGPicture* downPic,
                               const TGPicture* disabledPic,
                               const TGPicture* upRunningPic,
                               const TGPicture* downRunningPic,
                               TGLayoutHints* l = nullptr,
                               Int_t id = -1,
                               GContext_t norm = TGButton::GetDefaultGC()(),
                               UInt_t option = 0);
  void stop();

  sigc::signal<void()> started_;
  sigc::signal<void()> stopped_;

  //override
  void globalEnable() override;
  void globalDisable() override;

  void switchMode();

  CSGContinuousAction(const CSGContinuousAction&) = delete;  // stop default

  const CSGContinuousAction& operator=(const CSGContinuousAction&) = delete;  // stop default

private:
  // ---------- member data --------------------------------
  std::string m_imageFileName;
  std::string m_runningImageFileName;
  //const TGPicture* m_runningImage;
  const TGPicture* m_upPic;
  const TGPicture* m_downPic;
  const TGPicture* m_disabledPic;
  const TGPicture* m_runningUpPic;
  const TGPicture* m_runningDownPic;

  FWCustomIconsButton* m_button;

  bool m_isRunning;
};

#endif