Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Fireworks_Core_FWViewBase_h
0002 #define Fireworks_Core_FWViewBase_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Core
0006 // Class  :     FWViewBase
0007 //
0008 /**\class FWViewBase FWViewBase.h Fireworks/Core/interface/FWViewBase.h
0009 
0010    Description: Base class for all View instances
0011 
0012    Usage:
0013     <usage>
0014 
0015  */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Thu Feb 21 14:43:25 EST 2008
0019 //
0020 
0021 // system include files
0022 #include <string>
0023 #include <sigc++/signal.h>
0024 
0025 // user include files
0026 #include "Fireworks/Core/interface/FWConfigurableParameterizable.h"
0027 #include "Fireworks/Core/interface/FWViewType.h"
0028 
0029 #include "Rtypes.h"
0030 
0031 // forward declarations
0032 class TGFrame;
0033 class FWViewContextMenuHandlerBase;
0034 class ViewerParameterGUI;
0035 
0036 class FWViewBase : public FWConfigurableParameterizable {
0037 public:
0038   FWViewBase(FWViewType::EType, unsigned int iVersion = 1);
0039 
0040   // ---------- const member functions ---------------------
0041   const std::string& typeName() const;
0042   FWViewType::EType typeId() const { return m_type.id(); }
0043 
0044   virtual void saveImageTo(const std::string& iName) const = 0;
0045   void promptForSaveImageTo(TGFrame*) const;
0046 
0047   virtual FWViewContextMenuHandlerBase* contextMenuHandler() const;
0048 
0049   virtual void populateController(ViewerParameterGUI&) const {}
0050 
0051   // ---------- static member functions --------------------
0052 
0053   // ---------- member functions ---------------------------
0054   void destroy();
0055 
0056   sigc::signal<void(const FWViewBase*)> beingDestroyed_;
0057   sigc::signal<void(Int_t, Int_t)> openSelectedModelContextMenu_;
0058 
0059 protected:
0060   ~FWViewBase() override;
0061   FWViewType m_type;
0062 
0063 public:
0064   FWViewBase(const FWViewBase&) = delete;  // stop default
0065 
0066   const FWViewBase& operator=(const FWViewBase&) = delete;  // stop default
0067 
0068   // ---------- member data --------------------------------
0069 };
0070 
0071 #endif