00001 #ifndef Fireworks_Core_CmsShowViewPopup_h 00002 #define Fireworks_Core_CmsShowViewPopup_h 00003 // -*- C++ -*- 00004 // 00005 // Package: Core 00006 // Class : CmsShowViewPopup 00007 // 00016 // 00017 // Original Author: 00018 // Created: Wed Jun 25 15:15:12 EDT 2008 00019 // $Id: CmsShowViewPopup.h,v 1.23 2013/04/05 21:06:57 amraktad Exp $ 00020 // 00021 00022 // system include files 00023 #include <vector> 00024 #ifndef __CINT__ 00025 #include <boost/shared_ptr.hpp> 00026 #include <sigc++/sigc++.h> 00027 #endif 00028 #include "TGFrame.h" 00029 00030 // user include files 00031 #include "Fireworks/Core/interface/FWParameterSetterEditorBase.h" 00032 00033 // forward declarations 00034 class TGLabel; 00035 class TGTextButton; 00036 class TGButton; 00037 class TGFrame; 00038 class TGTab; 00039 class TGCompositeFrame; 00040 class TEveWindow; 00041 00042 class FWParameterBase; 00043 class FWParameterSetterBase; 00044 class FWViewBase; 00045 class FWColorManager; 00046 class FWDialogBuilder; 00047 00048 /* Helper class to organise parameters in view controller */ 00049 00050 class ViewerParameterGUI : public TGCompositeFrame, 00051 public FWParameterSetterEditorBase 00052 { 00053 public: 00054 ViewerParameterGUI(const TGFrame*); 00055 virtual ~ViewerParameterGUI(){} 00056 00057 ViewerParameterGUI& requestTab(const char*); 00058 ViewerParameterGUI& addParam(const FWParameterBase*); 00059 ViewerParameterGUI& separator(); 00060 void reset(); 00061 void populateComplete(); 00062 00063 TGCompositeFrame* getTabContainer(); 00064 void addFrameToContainer(TGCompositeFrame*); 00065 00066 private: 00067 TGTab* m_tab; 00068 std::string m_selectedTabName; 00069 #ifndef __CINT__ 00070 std::vector<boost::shared_ptr<FWParameterSetterBase> > m_setters; 00071 #endif 00072 }; 00073 00074 //============================================================================== 00075 00076 class CmsShowViewPopup : public TGTransientFrame 00077 { 00078 public: 00079 CmsShowViewPopup(const TGWindow* p = 0, UInt_t w = 200, UInt_t h = 200, FWColorManager* cm=0, FWViewBase* wb=0, TEveWindow* ew = 0); 00080 virtual ~CmsShowViewPopup(); 00081 00082 // ---------- const member functions --------------------- 00083 00084 // ---------- static member functions -------------------- 00085 00086 // ---------- member functions --------------------------- 00087 00088 virtual void CloseWindow(); 00089 virtual void MapWindow(); 00090 virtual void UnmapWindow(); 00091 00092 bool mapped() { return m_mapped; } 00093 00094 void reset(FWViewBase*, TEveWindow* ew); 00095 00096 void saveImage(); 00097 void changeBackground(); 00098 void backgroundColorWasChanged(); 00099 TEveWindow* getEveWindow() const { return m_eveWindow; } 00100 #ifndef __CINT__ 00101 sigc::signal<void> closed_; 00102 #endif 00103 00104 ClassDef(CmsShowViewPopup, 0); 00105 00106 private: 00107 CmsShowViewPopup(const CmsShowViewPopup&); // stop default 00108 const CmsShowViewPopup& operator=(const CmsShowViewPopup&); // stop default 00109 00110 // ---------- member data -------------------------------- 00111 00112 bool m_mapped; 00113 00114 TGLabel* m_viewLabel; 00115 ViewerParameterGUI* m_paramGUI; 00116 TGTextButton* m_saveImageButton; 00117 TGTextButton* m_changeBackground; 00118 00119 FWColorManager* m_colorManager; 00120 FWViewBase* m_viewBase; 00121 TEveWindow* m_eveWindow; 00122 }; 00123 00124 #endif