CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 public:
31  FWCustomIconsButton(const TGWindow* iParent,
32  const TGPicture* iUpIcon,
33  const TGPicture* iDownIcon,
34  const TGPicture* iDisableIcon,
35  const TGPicture* iBelowMouseIcon = nullptr,
36  Int_t id = -1,
37  GContext_t norm = TGButton::GetDefaultGC()(),
38  UInt_t option = 0);
39 
40  ~FWCustomIconsButton() override;
41 
42  bool HandleCrossing(Event_t*) override;
43 
44  // ---------- const member functions ---------------------
45 
46  // ---------- static member functions --------------------
47 
48  // ---------- member functions ---------------------------
49  void swapIcons(const TGPicture*& iUpIcon, const TGPicture*& iDownIcon, const TGPicture*& iDisabledIcon);
50 
51  void setIcons(const TGPicture* iUpIcon,
52  const TGPicture* iDownIcon,
53  const TGPicture* iDisabledIcon,
54  const TGPicture* ibelowMouseIcon = nullptr);
55 
56  const TGPicture* upIcon() const { return m_upIcon; }
57  const TGPicture* downIcon() const { return m_downIcon; }
58  const TGPicture* disabledIcon() const { return m_disabledIcon; }
59  const TGPicture* bellowMouseIcon() const { return m_belowMouseIcon; }
60 
61  FWCustomIconsButton(const FWCustomIconsButton&) = delete; // stop default
62 
63  const FWCustomIconsButton& operator=(const FWCustomIconsButton&) = delete; // stop default
64 
65 protected:
66  void DoRedraw() override;
67 
68 private:
69  // ---------- member data --------------------------------
70  const TGPicture* m_upIcon;
71  const TGPicture* m_downIcon;
72  const TGPicture* m_disabledIcon;
73  const TGPicture* m_belowMouseIcon;
74 
75  bool m_inside;
76 };
77 
78 #endif
const TGPicture * m_disabledIcon
const TGPicture * m_belowMouseIcon
const FWCustomIconsButton & operator=(const FWCustomIconsButton &)=delete
const TGPicture * m_upIcon
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=nullptr)
FWCustomIconsButton(const TGWindow *iParent, const TGPicture *iUpIcon, const TGPicture *iDownIcon, const TGPicture *iDisableIcon, const TGPicture *iBelowMouseIcon=nullptr, Int_t id=-1, GContext_t norm=TGButton::GetDefaultGC()(), UInt_t option=0)
bool HandleCrossing(Event_t *) override
const TGPicture * m_downIcon
void swapIcons(const TGPicture *&iUpIcon, const TGPicture *&iDownIcon, const TGPicture *&iDisabledIcon)