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, public FWParameterSetterEditorBase {
50 public:
51  ViewerParameterGUI(const TGFrame*);
52  ~ViewerParameterGUI() override {}
53 
54  ViewerParameterGUI& requestTab(const char*);
57  void reset();
58  void populateComplete();
59 
60  TGCompositeFrame* getTabContainer();
61  void addFrameToContainer(TGCompositeFrame*);
62 
63 private:
64  TGTab* m_tab;
66 #ifndef __CINT__
67  std::vector<std::shared_ptr<FWParameterSetterBase> > m_setters;
68 #endif
69 };
70 
71 //==============================================================================
72 
73 class CmsShowViewPopup : public TGTransientFrame {
74 public:
75  CmsShowViewPopup(const TGWindow* p = nullptr,
76  UInt_t w = 200,
77  UInt_t h = 200,
78  FWColorManager* cm = nullptr,
79  FWViewBase* wb = nullptr,
80  TEveWindow* ew = nullptr);
81  ~CmsShowViewPopup() override;
82 
83  // ---------- const member functions ---------------------
84 
85  // ---------- static member functions --------------------
86 
87  // ---------- member functions ---------------------------
88 
89  void CloseWindow() override;
90  void MapWindow() override;
91  void UnmapWindow() override;
92 
93  bool mapped() { return m_mapped; }
94 
95  void reset(FWViewBase*, TEveWindow* ew);
96 
97  void saveImage();
98  void changeBackground();
99  void backgroundColorWasChanged();
100  TEveWindow* getEveWindow() const { return m_eveWindow; }
101 #ifndef __CINT__
102  sigc::signal<void> closed_;
103 #endif
104 
105  ClassDefOverride(CmsShowViewPopup, 0);
106 
107 private:
108  CmsShowViewPopup(const CmsShowViewPopup&); // stop default
109  const CmsShowViewPopup& operator=(const CmsShowViewPopup&); // stop default
110 
111  // ---------- member data --------------------------------
112 
113  bool m_mapped;
114 
115  TGLabel* m_viewLabel;
117  TGTextButton* m_saveImageButton;
118  TGTextButton* m_changeBackground;
119 
122  TEveWindow* m_eveWindow;
123 };
124 
125 #endif
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
ViewerParameterGUI(const TGFrame *)
std::string m_selectedTabName
const double w
Definition: UKUtility.cc:23
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