test
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 //
20 
21 // system include files
22 #include "Rtypes.h"
23 
24 // user include files
25 
26 // forward declarations
27 
29 {
30 
31 public:
44  FWDisplayProperties(Color_t iColor,
45  bool isVisible,
46  Char_t transparency);
47  //virtual ~FWDisplayProperties();
48 
49  // ---------- const member functions ---------------------
50 
51  Color_t color() const {
52  return m_color;
53  }
54 
55  Char_t transparency() const {
56  return m_transparency;
57  }
58 
59  bool isVisible() const {
60  return m_isVisible;
61  }
62 
63  bool operator==(const FWDisplayProperties& iRHS) const {
64  return m_color == iRHS.m_color
65  && m_isVisible == iRHS.m_isVisible
66  && m_transparency == iRHS.m_transparency;
67  }
68  bool operator!=(const FWDisplayProperties& iRHS) const {
69  return not (*this == iRHS);
70  }
71 
72  // ---------- static member functions --------------------
73 
74  // ---------- member functions ---------------------------
75 
76  void setColor(Color_t iColor) {
77  m_color = iColor;
78  }
79 
82  transparency = transparency < 0 ? 0 : transparency;
83  transparency = transparency > 100 ? 100 : transparency;
85  }
86 
87  void setIsVisible(bool iSet) {
88  m_isVisible = iSet;
89  }
90 
91 private:
92  //FWDisplayProperties(const FWDisplayProperties&); // stop default
93 
94  //const FWDisplayProperties& operator=(const FWDisplayProperties&); // stop default
95 
96  // ---------- member data --------------------------------
97 
98  Color_t m_color;
101 };
102 
103 #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)