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 //
20 
21 // system include files
22 #include "TGButton.h"
23 
24 // user include files
25 
26 // forward declarations
27 class TGPicture;
28 
29 class FWCustomIconsButton : public TGButton
30 {
31 
32 public:
33  FWCustomIconsButton(const TGWindow* iParent,
34  const TGPicture* iUpIcon,
35  const TGPicture* iDownIcon,
36  const TGPicture* iDisableIcon,
37  const TGPicture* iBelowMouseIcon = 0,
38  Int_t id = -1,
39  GContext_t norm = TGButton::GetDefaultGC() (),
40  UInt_t option=0);
41 
42  virtual ~FWCustomIconsButton();
43 
44  virtual bool HandleCrossing(Event_t*);
45 
46  // ---------- const member functions ---------------------
47 
48  // ---------- static member functions --------------------
49 
50  // ---------- member functions ---------------------------
51  void swapIcons(const TGPicture*& iUpIcon,
52  const TGPicture*& iDownIcon,
53  const TGPicture*& iDisabledIcon);
54 
55  void setIcons(const TGPicture* iUpIcon,
56  const TGPicture* iDownIcon,
57  const TGPicture* iDisabledIcon,
58  const TGPicture* ibelowMouseIcon = 0);
59 
60  const TGPicture* upIcon() const { return m_upIcon; }
61  const TGPicture* downIcon() const { return m_downIcon; }
62  const TGPicture* disabledIcon() const { return m_disabledIcon; }
63  const TGPicture* bellowMouseIcon() const { return m_belowMouseIcon; }
64 
65 protected:
66  virtual void DoRedraw();
67 private:
68  FWCustomIconsButton(const FWCustomIconsButton&); // stop default
69 
70  const FWCustomIconsButton& operator=(const FWCustomIconsButton&); // stop default
71 
72  // ---------- member data --------------------------------
73  const TGPicture* m_upIcon;
74  const TGPicture* m_downIcon;
75  const TGPicture* m_disabledIcon;
76  const TGPicture* m_belowMouseIcon;
77 
78  bool m_inside;
79 };
80 
81 
82 #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
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)