CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWCustomIconsButton.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_FWCustomIconsButton_h
2 #define Fireworks_Core_FWCustomIconsButton_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : FWCustomIconsButton
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Thu Oct 23 13:05:30 EDT 2008
19 // $Id: FWCustomIconsButton.h,v 1.6 2009/11/29 15:56:33 amraktad Exp $
20 //
21 
22 // system include files
23 #include "TGButton.h"
24 
25 // user include files
26 
27 // forward declarations
28 class TGPicture;
29 
30 class FWCustomIconsButton : public TGButton
31 {
32 
33 public:
34  FWCustomIconsButton(const TGWindow* iParent,
35  const TGPicture* iUpIcon,
36  const TGPicture* iDownIcon,
37  const TGPicture* iDisableIcon,
38  const TGPicture* iBelowMouseIcon = 0,
39  Int_t id = -1,
40  GContext_t norm = TGButton::GetDefaultGC() (),
41  UInt_t option=0);
42 
43  virtual ~FWCustomIconsButton();
44 
45  virtual bool HandleCrossing(Event_t*);
46 
47  // ---------- const member functions ---------------------
48 
49  // ---------- static member functions --------------------
50 
51  // ---------- member functions ---------------------------
52  void swapIcons(const TGPicture*& iUpIcon,
53  const TGPicture*& iDownIcon,
54  const TGPicture*& iDisabledIcon);
55 
56  void setIcons(const TGPicture* iUpIcon,
57  const TGPicture* iDownIcon,
58  const TGPicture* iDisabledIcon,
59  const TGPicture* ibelowMouseIcon = 0);
60 
61  const TGPicture* upIcon() const { return m_upIcon; }
62  const TGPicture* downIcon() const { return m_downIcon; }
63  const TGPicture* disabledIcon() const { return m_disabledIcon; }
64  const TGPicture* bellowMouseIcon() const { return m_belowMouseIcon; }
65 
66 protected:
67  virtual void DoRedraw();
68 private:
69  FWCustomIconsButton(const FWCustomIconsButton&); // stop default
70 
71  const FWCustomIconsButton& operator=(const FWCustomIconsButton&); // stop default
72 
73  // ---------- member data --------------------------------
74  const TGPicture* m_upIcon;
75  const TGPicture* m_downIcon;
76  const TGPicture* m_disabledIcon;
77  const TGPicture* m_belowMouseIcon;
78 
79  bool m_inside;
80 };
81 
82 
83 #endif
virtual bool HandleCrossing(Event_t *)
const TGPicture * m_disabledIcon
const TGPicture * m_belowMouseIcon
FWCustomIconsButton(const TGWindow *iParent, const TGPicture *iUpIcon, const TGPicture *iDownIcon, const TGPicture *iDisableIcon, const TGPicture *iBelowMouseIcon=0, Int_t id=-1, GContext_t norm=TGButton::GetDefaultGC()(), UInt_t option=0)
const TGPicture * m_upIcon
const FWCustomIconsButton & operator=(const FWCustomIconsButton &)
const TGPicture * disabledIcon() const
const TGPicture * bellowMouseIcon() const
const TGPicture * upIcon() const
const TGPicture * downIcon() const
unsigned int UInt_t
Definition: FUTypes.h:12
void setIcons(const TGPicture *iUpIcon, const TGPicture *iDownIcon, const TGPicture *iDisabledIcon, const TGPicture *ibelowMouseIcon=0)
const TGPicture * m_downIcon
void swapIcons(const TGPicture *&iUpIcon, const TGPicture *&iDownIcon, const TGPicture *&iDisabledIcon)