1 //****************************************************************************************
5 // Written by: Daniel Switkin
7 // Copyright 1999, Be Incorporated
9 //****************************************************************************************
14 #include <interface/Control.h>
15 #include <app/MessageRunner.h>
17 class CPUButton
: public BControl
{
19 CPUButton(BRect rect
, const char *name
, const char *label
, BMessage
*message
);
20 CPUButton(BMessage
*message
);
23 virtual void Draw(BRect rect
);
24 virtual void MouseDown(BPoint point
);
25 virtual void MouseUp(BPoint point
);
26 virtual void MouseMoved(BPoint point
, uint32 transit
, const BMessage
*message
);
28 virtual void MessageReceived(BMessage
*message
);
29 virtual void AttachedToWindow();
30 virtual void DetachedFromWindow();
32 status_t
Invoke(BMessage
*message
= NULL
);
33 static CPUButton
*Instantiate(BMessage
*data
);
34 status_t
Archive(BMessage
*data
, bool deep
= true) const;
36 void UpdateColors(int32 color
);
42 rgb_color fOnColor
, fOffColor
;
45 BMessageRunner
*fPulseRunner
;
46 bool fReplicantInDeskbar
;