CMS 3D CMS Logo

CmsShowViewPopup.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_CmsShowViewPopup_h
2 #define Fireworks_Core_CmsShowViewPopup_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : CmsShowViewPopup
7 //
16 //
17 // Original Author:
18 // Created: Wed Jun 25 15:15:12 EDT 2008
19 //
20 
21 // system include files
22 #include <vector>
23 #ifndef __CINT__
24 #include <memory>
25 #include <sigc++/sigc++.h>
26 #endif
27 #include "TGFrame.h"
28 
29 // user include files
31 
32 // forward declarations
33 class TGLabel;
34 class TGTextButton;
35 class TGButton;
36 class TGFrame;
37 class TGTab;
38 class TGCompositeFrame;
39 class TEveWindow;
40 
41 class FWParameterBase;
43 class FWViewBase;
44 class FWColorManager;
45 class FWDialogBuilder;
46 
47 /* Helper class to organise parameters in view controller */
48 
49 class ViewerParameterGUI : public TGCompositeFrame,
51 {
52 public:
53  ViewerParameterGUI(const TGFrame*);
54  ~ViewerParameterGUI() override{}
55 
56  ViewerParameterGUI& requestTab(const char*);
59  void reset();
60  void populateComplete();
61 
62  TGCompositeFrame* getTabContainer();
63  void addFrameToContainer(TGCompositeFrame*);
64 
65 private:
66  TGTab* m_tab;
68 #ifndef __CINT__
69  std::vector<std::shared_ptr<FWParameterSetterBase> > m_setters;
70 #endif
71 };
72 
73 //==============================================================================
74 
75 class CmsShowViewPopup : public TGTransientFrame
76 {
77 public:
78  CmsShowViewPopup(const TGWindow* p = nullptr, UInt_t w = 200, UInt_t h = 200, FWColorManager* cm=nullptr, FWViewBase* wb=nullptr, TEveWindow* ew = nullptr);
79  ~CmsShowViewPopup() override;
80 
81  // ---------- const member functions ---------------------
82 
83  // ---------- static member functions --------------------
84 
85  // ---------- member functions ---------------------------
86 
87  void CloseWindow() override;
88  void MapWindow() override;
89  void UnmapWindow() override;
90 
91  bool mapped() { return m_mapped; }
92 
93  void reset(FWViewBase*, TEveWindow* ew);
94 
95  void saveImage();
96  void changeBackground();
97  void backgroundColorWasChanged();
98  TEveWindow* getEveWindow() const { return m_eveWindow; }
99 #ifndef __CINT__
100  sigc::signal<void> closed_;
101 #endif
102 
103  ClassDefOverride(CmsShowViewPopup, 0);
104 
105 private:
106  CmsShowViewPopup(const CmsShowViewPopup&); // stop default
107  const CmsShowViewPopup& operator=(const CmsShowViewPopup&); // stop default
108 
109  // ---------- member data --------------------------------
110 
111  bool m_mapped;
112 
113  TGLabel* m_viewLabel;
115  TGTextButton* m_saveImageButton;
116  TGTextButton* m_changeBackground;
117 
120  TEveWindow* m_eveWindow;
121 };
122 
123 #endif
ViewerParameterGUI(const TGFrame *)
std::string m_selectedTabName
const double w
Definition: UKUtility.cc:23
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
sigc::signal< void > closed_
ViewerParameterGUI & requestTab(const char *)
ViewerParameterGUI & separator()
void addFrameToContainer(TGCompositeFrame *)
~ViewerParameterGUI() override
TEveWindow * getEveWindow() const
TGTextButton * m_changeBackground
TGTextButton * m_saveImageButton
FWColorManager * m_colorManager
const FWParameterSetterEditorBase & operator=(const FWParameterSetterEditorBase &)=delete
std::vector< std::shared_ptr< FWParameterSetterBase > > m_setters
FWViewBase * m_viewBase
ViewerParameterGUI & addParam(const FWParameterBase *)
TGCompositeFrame * getTabContainer()
ViewerParameterGUI * m_paramGUI
TEveWindow * m_eveWindow