File indexing completed on 2024-04-06 12:11:30
0001 #ifndef Fireworks_Core_CmsShowViewPopup_h
0002 #define Fireworks_Core_CmsShowViewPopup_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include <vector>
0023 #ifndef __CINT__
0024 #include <memory>
0025 #include <sigc++/sigc++.h>
0026 #endif
0027 #include "TGFrame.h"
0028
0029
0030 #include "Fireworks/Core/interface/FWParameterSetterEditorBase.h"
0031
0032
0033 class TGLabel;
0034 class TGTextButton;
0035 class TGButton;
0036 class TGFrame;
0037 class TGTab;
0038 class TGCompositeFrame;
0039 class TEveWindow;
0040
0041 class FWParameterBase;
0042 class FWParameterSetterBase;
0043 class FWViewBase;
0044 class FWColorManager;
0045 class FWDialogBuilder;
0046
0047
0048
0049 class ViewerParameterGUI : public TGCompositeFrame, public FWParameterSetterEditorBase {
0050 public:
0051 ViewerParameterGUI(const TGFrame*);
0052 ~ViewerParameterGUI() override {}
0053
0054 ViewerParameterGUI& requestTab(const char*);
0055 ViewerParameterGUI& addParam(const FWParameterBase*);
0056 ViewerParameterGUI& separator();
0057 void reset();
0058 void populateComplete();
0059
0060 TGCompositeFrame* getTabContainer();
0061 void addFrameToContainer(TGCompositeFrame*);
0062
0063 private:
0064 TGTab* m_tab;
0065 std::string m_selectedTabName;
0066 #ifndef __CINT__
0067 std::vector<std::shared_ptr<FWParameterSetterBase> > m_setters;
0068 #endif
0069 };
0070
0071
0072
0073 class CmsShowViewPopup : public TGTransientFrame {
0074 public:
0075 CmsShowViewPopup(const TGWindow* p = nullptr,
0076 UInt_t w = 200,
0077 UInt_t h = 200,
0078 FWColorManager* cm = nullptr,
0079 FWViewBase* wb = nullptr,
0080 TEveWindow* ew = nullptr);
0081 ~CmsShowViewPopup() override;
0082
0083
0084
0085
0086
0087
0088
0089 void CloseWindow() override;
0090 void MapWindow() override;
0091 void UnmapWindow() override;
0092
0093 bool mapped() { return m_mapped; }
0094
0095 void reset(FWViewBase*, TEveWindow* ew);
0096
0097 void saveImage();
0098 void changeBackground();
0099 void backgroundColorWasChanged();
0100 TEveWindow* getEveWindow() const { return m_eveWindow; }
0101 #ifndef __CINT__
0102 sigc::signal<void()> closed_;
0103 #endif
0104
0105 ClassDefOverride(CmsShowViewPopup, 0);
0106
0107 private:
0108 CmsShowViewPopup(const CmsShowViewPopup&);
0109 const CmsShowViewPopup& operator=(const CmsShowViewPopup&);
0110
0111
0112
0113 bool m_mapped;
0114
0115 TGLabel* m_viewLabel;
0116 ViewerParameterGUI* m_paramGUI;
0117 TGTextButton* m_saveImageButton;
0118 TGTextButton* m_changeBackground;
0119
0120 FWColorManager* m_colorManager;
0121 FWViewBase* m_viewBase;
0122 TEveWindow* m_eveWindow;
0123 };
0124
0125 #endif