1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#ifndef _MBUTTON
#define _MBUTTON
#include "layout.h"
#include <Button.h>
#if __POWERPC__
#pragma simple_class_byval off
#endif
class IMPEXPLIBLAYOUT MButton : public MView, public BButton
{
public: ulong ID;
MButton(const char *label, ulong id=0,minimax size=minimax(-1,-1,1E6,1E6,1));
MButton(const char *label, BMessage *message, BHandler *handler=NULL, minimax size=minimax(-1,-1,1E6,1E6,1));
MButton(BMessage*);
virtual long Archive(BMessage *archive, bool deep=true) const;
static BArchivable *Instantiate(BMessage *archive);
virtual ~MButton();
void SetRepeat(ulong initial_delay, ulong repeat_delay);
virtual minimax layoutprefs();
virtual BRect layout(BRect rect);
virtual void setcolor(rgb_color, bool);
virtual void Draw(BRect);
virtual void AttachedToWindow();
virtual void DetachedFromWindow();
virtual void MouseDown(BPoint);
private: static long _mousetracker(void *arg);
void _MouseTracker();
thread_id mousethread;
BHandler *target;
int64 lastwhen;
ulong initialdelay;
ulong repeatdelay;
void initobject();
ulong buttonmask;
uint32 _expansiondata[2];
};
extern const IMPEXPLIBLAYOUT char M_BUTTON_POINTER[];
extern const IMPEXPLIBLAYOUT char M_BUTTON_ID[];
extern const IMPEXPLIBLAYOUT char M_BUTTON_MASK[];
extern const IMPEXPLIBLAYOUT char M_DOUBLECLICK[];
extern const IMPEXPLIBLAYOUT char M_REPEAT[];
extern const IMPEXPLIBLAYOUT char M_RELEASE[];
#endif
|