CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch1/src/Fireworks/Core/interface/FWCustomIconsButton.h

Go to the documentation of this file.
00001 #ifndef Fireworks_Core_FWCustomIconsButton_h
00002 #define Fireworks_Core_FWCustomIconsButton_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Core
00006 // Class  :     FWCustomIconsButton
00007 //
00016 //
00017 // Original Author:  Chris Jones
00018 //         Created:  Thu Oct 23 13:05:30 EDT 2008
00019 // $Id: FWCustomIconsButton.h,v 1.6 2009/11/29 15:56:33 amraktad Exp $
00020 //
00021 
00022 // system include files
00023 #include "TGButton.h"
00024 
00025 // user include files
00026 
00027 // forward declarations
00028 class TGPicture;
00029 
00030 class FWCustomIconsButton : public TGButton
00031 {
00032 
00033 public:
00034    FWCustomIconsButton(const TGWindow*  iParent,
00035                        const TGPicture* iUpIcon,
00036                        const TGPicture* iDownIcon,
00037                        const TGPicture* iDisableIcon,
00038                        const TGPicture* iBelowMouseIcon = 0,
00039                        Int_t id = -1,
00040                        GContext_t norm = TGButton::GetDefaultGC() (),
00041                        UInt_t option=0);
00042    
00043    virtual ~FWCustomIconsButton();
00044 
00045    virtual bool HandleCrossing(Event_t*);
00046    
00047    // ---------- const member functions ---------------------
00048 
00049    // ---------- static member functions --------------------
00050 
00051    // ---------- member functions ---------------------------
00052    void swapIcons(const TGPicture*& iUpIcon,
00053                   const TGPicture*& iDownIcon,
00054                   const TGPicture*& iDisabledIcon);
00055 
00056    void setIcons(const TGPicture* iUpIcon,
00057                  const TGPicture* iDownIcon,
00058                  const TGPicture* iDisabledIcon,
00059                  const TGPicture* ibelowMouseIcon = 0);
00060 
00061    const TGPicture* upIcon() const { return m_upIcon; }
00062    const TGPicture* downIcon() const { return m_downIcon; }
00063    const TGPicture* disabledIcon() const { return m_disabledIcon; }
00064    const TGPicture* bellowMouseIcon() const { return m_belowMouseIcon; }
00065 
00066 protected:
00067    virtual void DoRedraw();
00068 private:
00069    FWCustomIconsButton(const FWCustomIconsButton&); // stop default
00070 
00071    const FWCustomIconsButton& operator=(const FWCustomIconsButton&); // stop default
00072 
00073    // ---------- member data --------------------------------
00074    const TGPicture* m_upIcon;
00075    const TGPicture* m_downIcon;
00076    const TGPicture* m_disabledIcon;
00077    const TGPicture* m_belowMouseIcon;
00078    
00079    bool m_inside;   
00080 };
00081 
00082 
00083 #endif