CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWDisplayProperties.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_FWDisplayProperties_h
2 #define Fireworks_Core_FWDisplayProperties_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : FWDisplayProperties
7 //
16 //
17 // Original Author:
18 // Created: Thu Jan 3 14:22:36 EST 2008
19 // $Id: FWDisplayProperties.h,v 1.13 2011/02/22 18:37:31 amraktad Exp $
20 //
21 
22 // system include files
23 #include "Rtypes.h"
24 
25 // user include files
26 
27 // forward declarations
28 
30 {
31 
32 public:
45  FWDisplayProperties(Color_t iColor,
46  bool isVisible,
47  Char_t transparency);
48  //virtual ~FWDisplayProperties();
49 
50  // ---------- const member functions ---------------------
51 
52  Color_t color() const {
53  return m_color;
54  }
55 
56  Char_t transparency() const {
57  return m_transparency;
58  }
59 
60  bool isVisible() const {
61  return m_isVisible;
62  }
63 
64  bool operator==(const FWDisplayProperties& iRHS) const {
65  return m_color == iRHS.m_color
66  && m_isVisible == iRHS.m_isVisible
67  && m_transparency == iRHS.m_transparency;
68  }
69  bool operator!=(const FWDisplayProperties& iRHS) const {
70  return not (*this == iRHS);
71  }
72 
73  // ---------- static member functions --------------------
74 
75  // ---------- member functions ---------------------------
76 
77  void setColor(Color_t iColor) {
78  m_color = iColor;
79  }
80 
83  transparency = transparency < 0 ? 0 : transparency;
84  transparency = transparency > 100 ? 100 : transparency;
86  }
87 
88  void setIsVisible(bool iSet) {
89  m_isVisible = iSet;
90  }
91 
92 private:
93  //FWDisplayProperties(const FWDisplayProperties&); // stop default
94 
95  //const FWDisplayProperties& operator=(const FWDisplayProperties&); // stop default
96 
97  // ---------- member data --------------------------------
98 
99  Color_t m_color;
102 };
103 
104 #endif
void setColor(Color_t iColor)
bool operator!=(const FWDisplayProperties &iRHS) const
static const FWDisplayProperties defaultProperties
Color_t color() const
Char_t transparency() const
bool operator==(const FWDisplayProperties &iRHS) const
FWDisplayProperties(Color_t iColor, bool isVisible, Char_t transparency)
void setTransparency(Char_t transparency)
void setIsVisible(bool iSet)