CMS 3D CMS Logo

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 protected:
62  void DoRedraw() override;
63 
64 private:
65  FWCustomIconsButton(const FWCustomIconsButton&) = delete; // stop default
66 
67  const FWCustomIconsButton& operator=(const FWCustomIconsButton&) = delete; // stop default
68 
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
FWCustomIconsButton::upIcon
const TGPicture * upIcon() const
Definition: FWCustomIconsButton.h:56
FWCustomIconsButton::m_downIcon
const TGPicture * m_downIcon
Definition: FWCustomIconsButton.h:71
FWCustomIconsButton::setIcons
void setIcons(const TGPicture *iUpIcon, const TGPicture *iDownIcon, const TGPicture *iDisabledIcon, const TGPicture *ibelowMouseIcon=nullptr)
Definition: FWCustomIconsButton.cc:88
FWCustomIconsButton::downIcon
const TGPicture * downIcon() const
Definition: FWCustomIconsButton.h:57
FWCustomIconsButton::HandleCrossing
bool HandleCrossing(Event_t *) override
Definition: FWCustomIconsButton.cc:106
fileinputsource_cfi.option
option
Definition: fileinputsource_cfi.py:87
FWCustomIconsButton::FWCustomIconsButton
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)
Definition: FWCustomIconsButton.cc:32
FWCustomIconsButton::swapIcons
void swapIcons(const TGPicture *&iUpIcon, const TGPicture *&iDownIcon, const TGPicture *&iDisabledIcon)
Definition: FWCustomIconsButton.cc:78
FWCustomIconsButton::~FWCustomIconsButton
~FWCustomIconsButton() override
Definition: FWCustomIconsButton.cc:61
FWCustomIconsButton::disabledIcon
const TGPicture * disabledIcon() const
Definition: FWCustomIconsButton.h:58
FWCustomIconsButton::DoRedraw
void DoRedraw() override
Definition: FWCustomIconsButton.cc:117
FWCustomIconsButton::operator=
const FWCustomIconsButton & operator=(const FWCustomIconsButton &)=delete
FWCustomIconsButton::m_inside
bool m_inside
Definition: FWCustomIconsButton.h:75
FWCustomIconsButton
Definition: FWCustomIconsButton.h:29
FWCustomIconsButton::m_disabledIcon
const TGPicture * m_disabledIcon
Definition: FWCustomIconsButton.h:72
FWCustomIconsButton::m_belowMouseIcon
const TGPicture * m_belowMouseIcon
Definition: FWCustomIconsButton.h:73
FWCustomIconsButton::bellowMouseIcon
const TGPicture * bellowMouseIcon() const
Definition: FWCustomIconsButton.h:59
FWCustomIconsButton::m_upIcon
const TGPicture * m_upIcon
Definition: FWCustomIconsButton.h:70