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.21 2010/11/11 19:45:49 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 class ViewerParameterGUI : public TGCompositeFrame, public FWParameterSetterEditorBase 00050 { 00051 public: 00052 ViewerParameterGUI(const TGFrame*); 00053 virtual ~ViewerParameterGUI(){} 00054 00055 ViewerParameterGUI& requestTab(const char*); 00056 ViewerParameterGUI& addParam(const FWParameterBase*); 00057 ViewerParameterGUI& separator(); 00058 void reset(); 00059 void populateComplete(); 00060 00061 TGCompositeFrame* getTabContainer(); 00062 void addFrameToContainer(TGCompositeFrame*); 00063 00064 00065 private: 00066 TGTab* m_tab; 00067 std::string m_selectedTabName; 00068 #ifndef __CINT__ 00069 std::vector<boost::shared_ptr<FWParameterSetterBase> > m_setters; 00070 #endif 00071 }; 00072 00073 //============================================================================== 00074 00075 class CmsShowViewPopup : public TGTransientFrame 00076 { 00077 public: 00078 CmsShowViewPopup(const TGWindow* p = 0, UInt_t w = 200, UInt_t h = 200, FWColorManager* cm=0, FWViewBase* wb=0, TEveWindow* ew = 0); 00079 virtual ~CmsShowViewPopup(); 00080 00081 // ---------- const member functions --------------------- 00082 00083 // ---------- static member functions -------------------- 00084 00085 // ---------- member functions --------------------------- 00086 virtual void CloseWindow(); 00087 virtual void MapWindow(); 00088 virtual void UnmapWindow(); 00089 00090 bool mapped() { return m_mapped; } 00091 00092 void reset(FWViewBase*, TEveWindow* ew); 00093 00094 void saveImage(); 00095 void changeBackground(); 00096 void backgroundColorWasChanged(); 00097 TEveWindow* getEveWindow() const { return m_eveWindow; } 00098 #ifndef __CINT__ 00099 sigc::signal<void> closed_; 00100 #endif 00101 00102 ClassDef(CmsShowViewPopup, 0); 00103 00104 private: 00105 CmsShowViewPopup(const CmsShowViewPopup&); // stop default 00106 00107 const CmsShowViewPopup& operator=(const CmsShowViewPopup&); // stop default 00108 00109 // ---------- member data -------------------------------- 00110 bool m_mapped; 00111 00112 TGLabel* m_viewLabel; 00113 ViewerParameterGUI* m_paramGUI; 00114 TGButton* m_saveImageButton; 00115 TGTextButton* m_changeBackground; 00116 00117 FWColorManager* m_colorManager; 00118 FWViewBase* m_viewBase; 00119 TEveWindow* m_eveWindow; 00120 }; 00121 00122 00123 #endif