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 
33 
34 class CmsShowCommonPopup;
35 class FWColorManager;
36 namespace fireworks
37 {
38 class Context;
39 }
40 
42 {
43  friend class CmsShowCommonPopup;
44 
45 public:
47  virtual ~CmsShowCommon();
48 
49  // ---------- const member functions ---------------------
50  virtual void addTo(FWConfiguration&) const;
51 
52  // ---------- static member functions --------------------
53 
54  // ---------- member functions ---------------------------
55  virtual void setFrom(const FWConfiguration&);
56 
57  void setTrackBreakMode();
58  void setDrawBreakMarkers();
59 
60  int gamma() { return m_gamma.value(); }
61  void setGamma();
62  void switchBackground();
63  void permuteColors();
64  void randomizeColors();
65  void loopPalettes();
66 
67  void setGeomColor(FWGeomColorIndex, Color_t);
68  void setGeomTransparency(int val, bool projected);
69 
70  FWViewEnergyScale* getEnergyScale() const { return m_energyScale.get(); }
71 
72  const TGLColorSet& getLightColorSet() const { return m_lightColorSet; }
73  const TGLColorSet& getDarkColorSet() const { return m_darkColorSet; }
74 
75 
76  UChar_t getProjTrackBreaking() const { return m_trackBreak.value(); }
77  bool getRnrPTBMarkers() const { return m_drawBreakPoints.value(); }
78 
79  void setView(CmsShowCommonPopup* x) { m_view= x;}
80 
81 protected:
82  const FWColorManager* colorManager() const;
83  void setPalette();
84  // ---------- member data --------------------------------
85 
86 
89 
92 
93  // general colors
94  mutable FWLongParameter m_backgroundColor; // can be set via Ctr+b key binding
97 
98  // geom colors
102 
103  TGLColorSet m_lightColorSet;
104  TGLColorSet m_darkColorSet;
105 
106  std::auto_ptr<FWViewEnergyScale> m_energyScale;
107 
108 
109 private:
110  CmsShowCommon(const CmsShowCommon&); // stop default
111  const CmsShowCommon& operator=(const CmsShowCommon&); // stop default
112 
113 };
114 
115 
116 #endif
TGLColorSet m_lightColorSet
bool getRnrPTBMarkers() const
Definition: CmsShowCommon.h:77
const CmsShowCommonPopup & operator=(const CmsShowCommonPopup &)
FWBoolParameter m_drawBreakPoints
Definition: CmsShowCommon.h:91
FWLongParameter m_backgroundColor
Definition: CmsShowCommon.h:94
FWGeomColorIndex
FWLongParameter m_gamma
Definition: CmsShowCommon.h:95
UChar_t getProjTrackBreaking() const
Definition: CmsShowCommon.h:76
const TGLColorSet & getLightColorSet() const
Definition: CmsShowCommon.h:72
fireworks::Context * m_context
Definition: CmsShowCommon.h:88
FWLongParameter m_geomTransparency3D
FWLongParameter m_geomTransparency2D
Definition: CmsShowCommon.h:99
FWViewEnergyScale * getEnergyScale() const
Definition: CmsShowCommon.h:70
std::auto_ptr< FWViewEnergyScale > m_energyScale
CmsShowCommonPopup * m_view
Definition: CmsShowCommon.h:87
const TGLColorSet & getDarkColorSet() const
Definition: CmsShowCommon.h:73
TGLColorSet m_darkColorSet
FWEnumParameter m_trackBreak
Definition: CmsShowCommon.h:90
void setView(CmsShowCommonPopup *x)
Definition: CmsShowCommon.h:79
FWEnumParameter m_palette
Definition: CmsShowCommon.h:96