16 #include "TGPicture.h" 17 #include "TVirtualX.h" 33 const TGPicture* iUpIcon,
34 const TGPicture* iDownIcon,
35 const TGPicture* iDisabledIcon,
36 const TGPicture* iBelowMouseIcon,
40 : TGButton(iParent,
id, norm,
option),
42 m_downIcon(iDownIcon),
43 m_disabledIcon(iDisabledIcon),
44 m_belowMouseIcon(iBelowMouseIcon),
46 assert(
nullptr != iUpIcon);
47 assert(
nullptr != iDownIcon);
48 assert(
nullptr != iDisabledIcon);
49 gVirtualX->ShapeCombineMask(GetId(), 0, 0, iUpIcon->GetMask());
50 SetBackgroundPixmap(iUpIcon->GetPicture());
51 Resize(iUpIcon->GetWidth(), iUpIcon->GetHeight());
52 fTWidth = iUpIcon->GetWidth();
53 fTHeight = iUpIcon->GetHeight();
79 const TGPicture*& iDownIcon,
80 const TGPicture*& iDisabledIcon) {
84 gVirtualX->ShapeCombineMask(GetId(), 0, 0,
m_upIcon->GetMask());
89 const TGPicture* iDownIcon,
90 const TGPicture* iDisabledIcon,
91 const TGPicture* iBelowMouseIcon) {
97 gVirtualX->ShapeCombineMask(GetId(), 0, 0,
m_upIcon->GetMask());
107 if (
event->fType == kEnterNotify)
109 else if (
event->fType == kLeaveNotify)
114 return TGButton::HandleCrossing(
event);
121 int x = (fWidth - fTWidth) >> 1;
122 int y = (fHeight - fTHeight) >> 1;
135 case kButtonDisabled:
void swap(Association< C > &lhs, Association< C > &rhs)