CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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();
100  TEveWindow* getEveWindow() const { return m_eveWindow; }
101 #ifndef __CINT__
102  sigc::signal<void()> closed_;
103 #endif
104 
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
ViewerParameterGUI(const TGFrame *)
void UnmapWindow() override
std::string m_selectedTabName
ViewerParameterGUI & requestTab(const char *)
ViewerParameterGUI & separator()
void addFrameToContainer(TGCompositeFrame *)
~ViewerParameterGUI() override
CmsShowViewPopup(const TGWindow *p=nullptr, UInt_t w=200, UInt_t h=200, FWColorManager *cm=nullptr, FWViewBase *wb=nullptr, TEveWindow *ew=nullptr)
TEveWindow * getEveWindow() const
ClassDefOverride(CmsShowViewPopup, 0)
TGTextButton * m_changeBackground
TGTextButton * m_saveImageButton
void reset(FWViewBase *, TEveWindow *ew)
FWColorManager * m_colorManager
std::vector< std::shared_ptr< FWParameterSetterBase > > m_setters
~CmsShowViewPopup() override
FWViewBase * m_viewBase
ViewerParameterGUI & addParam(const FWParameterBase *)
TGCompositeFrame * getTabContainer()
const CmsShowViewPopup & operator=(const CmsShowViewPopup &)
void MapWindow() override
void backgroundColorWasChanged()
void CloseWindow() override
T w() const
sigc::signal< void()> closed_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
ViewerParameterGUI * m_paramGUI
TEveWindow * m_eveWindow