00001 #ifndef Fireworks_Core_FWViewBase_h 00002 #define Fireworks_Core_FWViewBase_h 00003 // -*- C++ -*- 00004 // 00005 // Package: Core 00006 // Class : FWViewBase 00007 // 00016 // 00017 // Original Author: Chris Jones 00018 // Created: Thu Feb 21 14:43:25 EST 2008 00019 // $Id: FWViewBase.h,v 1.14 2010/11/04 22:38:54 amraktad Exp $ 00020 // 00021 00022 // system include files 00023 #include <string> 00024 #include <sigc++/signal.h> 00025 00026 // user include files 00027 #include "Fireworks/Core/interface/FWConfigurableParameterizable.h" 00028 #include "Fireworks/Core/interface/FWViewType.h" 00029 00030 // forward declarations 00031 class TGFrame; 00032 class FWViewContextMenuHandlerBase; 00033 class ViewerParameterGUI; 00034 00035 class FWViewBase : public FWConfigurableParameterizable 00036 { 00037 public: 00038 FWViewBase(FWViewType::EType, unsigned int iVersion = 1); 00039 00040 // ---------- const member functions --------------------- 00041 const std::string& typeName() const; 00042 FWViewType::EType typeId() const { return m_type.id(); } 00043 00044 virtual void saveImageTo(const std::string& iName) const = 0; 00045 void promptForSaveImageTo(TGFrame*) const; 00046 00047 virtual FWViewContextMenuHandlerBase* contextMenuHandler() const; 00048 00049 virtual void populateController(ViewerParameterGUI&) const {} 00050 00051 // ---------- static member functions -------------------- 00052 00053 // ---------- member functions --------------------------- 00054 void destroy(); 00055 00056 sigc::signal<void,const FWViewBase*> beingDestroyed_; 00057 sigc::signal<void,Int_t,Int_t> openSelectedModelContextMenu_; 00058 00059 protected: 00060 virtual ~FWViewBase(); 00061 FWViewType m_type; 00062 00063 private: 00064 FWViewBase(const FWViewBase&); // stop default 00065 00066 const FWViewBase& operator=(const FWViewBase&); // stop default 00067 00068 // ---------- member data -------------------------------- 00069 00070 }; 00071 00072 00073 #endif