CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/Fireworks/Core/interface/FWDisplayProperties.h

Go to the documentation of this file.
00001 #ifndef Fireworks_Core_FWDisplayProperties_h
00002 #define Fireworks_Core_FWDisplayProperties_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Core
00006 // Class  :     FWDisplayProperties
00007 //
00016 //
00017 // Original Author:
00018 //         Created:  Thu Jan  3 14:22:36 EST 2008
00019 // $Id: FWDisplayProperties.h,v 1.13 2011/02/22 18:37:31 amraktad Exp $
00020 //
00021 
00022 // system include files
00023 #include "Rtypes.h"
00024 
00025 // user include files
00026 
00027 // forward declarations
00028 
00029 class FWDisplayProperties
00030 {
00031 
00032 public:
00033    static const FWDisplayProperties defaultProperties;
00045    FWDisplayProperties(Color_t iColor,
00046                        bool    isVisible,
00047                        Char_t  transparency);
00048    //virtual ~FWDisplayProperties();
00049 
00050    // ---------- const member functions ---------------------
00051 
00052    Color_t color() const {
00053       return m_color;
00054    }
00055    
00056    Char_t transparency() const {
00057       return m_transparency;
00058    }
00059 
00060    bool isVisible() const {
00061       return m_isVisible;
00062    }
00063 
00064    bool operator==(const FWDisplayProperties& iRHS) const {
00065       return m_color == iRHS.m_color 
00066              && m_isVisible == iRHS.m_isVisible
00067              && m_transparency == iRHS.m_transparency;
00068    }
00069    bool operator!=(const FWDisplayProperties& iRHS) const {
00070       return not (*this == iRHS);
00071    }
00072 
00073    // ---------- static member functions --------------------
00074 
00075    // ---------- member functions ---------------------------
00076 
00077    void setColor(Color_t iColor) {
00078       m_color = iColor;
00079    }
00080 
00082    void setTransparency(Char_t transparency) {
00083       transparency = transparency < 0 ? 0 : transparency; 
00084       transparency = transparency > 100 ? 100 : transparency; 
00085       m_transparency = transparency;
00086    }
00087 
00088    void setIsVisible(bool iSet) {
00089       m_isVisible = iSet;
00090    }
00091 
00092 private:
00093    //FWDisplayProperties(const FWDisplayProperties&); // stop default
00094 
00095    //const FWDisplayProperties& operator=(const FWDisplayProperties&); // stop default
00096 
00097    // ---------- member data --------------------------------
00098 
00099    Color_t m_color;
00100    bool    m_isVisible;
00101    Char_t  m_transparency;
00102 };
00103 
00104 #endif