CMS 3D CMS Logo

CmsShowCommon.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_CmsShowCommon_h
2 #define Fireworks_Core_CmsShowCommon_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : CmsShowCommon
7 //
16 //
17 // Original Author: Alja Mrak-Tadel
18 // Created: Fri Sep 10 14:51:07 CEST 2010
19 //
20 
21 #include <sigc++/signal.h>
22 #include <sigc++/sigc++.h>
23 
24 #include "Rtypes.h"
25 #include "TGLUtil.h"
26 #include "TEveVector.h"
27 
35 
36 class CmsShowCommonPopup;
37 class FWViewEnergyScale;
38 class FWColorManager;
39 namespace fireworks {
40  class Context;
41 }
42 
44  friend class CmsShowCommonPopup;
45 
46 public:
48  ~CmsShowCommon() override;
49 
50  // ---------- const member functions ---------------------
51  void addTo(FWConfiguration&) const override;
52 
53  // ---------- static member functions --------------------
54 
55  // ---------- member functions ---------------------------
56  void setFrom(const FWConfiguration&) override;
57 
58  void setTrackBreakMode();
59  void setDrawBreakMarkers();
60 
61  int gamma() { return m_gamma.value(); }
62  void setGamma();
63  void switchBackground();
64  void permuteColors();
65  void randomizeColors();
66  void loopPalettes();
67 
68  void setGeomColor(FWGeomColorIndex, Color_t);
69  void setGeomTransparency(int val, bool projected);
70  FWViewEnergyScale* getEnergyScale() const { return m_viewContext.getEnergyScale(); }
71 
72  const TGLColorSet& getLightColorSet() const { return m_lightColorSet; }
73  const TGLColorSet& getDarkColorSet() const { return m_darkColorSet; }
74 
75  UChar_t getProjTrackBreaking() const { return m_trackBreak.value(); }
76  bool getRnrPTBMarkers() const { return m_drawBreakPoints.value(); }
77 
78  void setView(CmsShowCommonPopup* x) { m_view = x; }
79 
80  void getEventCenter(float* inC) const;
81  void setEventCenter(float, float, float);
82  void resetEventCenter();
83 
84  mutable sigc::signal<void, const CmsShowCommon*> eventCenterChanged_;
85 
86 protected:
87  const FWColorManager* colorManager() const;
88  void setPalette();
89  // ---------- member data --------------------------------
90 
93 
96 
97  // general colors
98  mutable FWLongParameter m_backgroundColor; // can be set via Ctr+b key binding
101 
102  // geom colors
106 
107  TGLColorSet m_lightColorSet;
108  TGLColorSet m_darkColorSet;
109 
111 
113  TEveVector m_externalEventCenter; //cached
114 
115 private:
116  CmsShowCommon(const CmsShowCommon&) = delete; // stop default
117  const CmsShowCommon& operator=(const CmsShowCommon&) = delete; // stop default
118 };
119 
120 #endif
TGLColorSet m_lightColorSet
bool getRnrPTBMarkers() const
Definition: CmsShowCommon.h:76
sigc::signal< void, const CmsShowCommon * > eventCenterChanged_
Definition: CmsShowCommon.h:84
const CmsShowCommonPopup & operator=(const CmsShowCommonPopup &)
FWBoolParameter m_drawBreakPoints
Definition: CmsShowCommon.h:95
FWLongParameter m_backgroundColor
Definition: CmsShowCommon.h:98
FWGeomColorIndex
FWLongParameter m_gamma
Definition: CmsShowCommon.h:99
UChar_t getProjTrackBreaking() const
Definition: CmsShowCommon.h:75
TEveVector m_externalEventCenter
const TGLColorSet & getLightColorSet() const
Definition: CmsShowCommon.h:72
fireworks::Context * m_context
Definition: CmsShowCommon.h:92
FWLongParameter m_geomTransparency3D
FWViewContext m_viewContext
FWLongParameter m_geomTransparency2D
FWViewEnergyScale * getEnergyScale() const
Definition: CmsShowCommon.h:70
CmsShowCommonPopup * m_view
Definition: CmsShowCommon.h:91
const TGLColorSet & getDarkColorSet() const
Definition: CmsShowCommon.h:73
TGLColorSet m_darkColorSet
FWEnumParameter m_trackBreak
Definition: CmsShowCommon.h:94
void setView(CmsShowCommonPopup *x)
Definition: CmsShowCommon.h:78
FWEnumParameter m_palette