summaryrefslogtreecommitdiff
path: root/public/mxtk/mxevent.h
blob: 35c0f0983b98fbebbd23c286a7afad4756920f1a (plain) (blame)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//
//                 mxToolKit (c) 1999 by Mete Ciragan
//
// file:           mxEvent.h
// implementation: all
// last modified:  Apr 12 1999, Mete Ciragan
// copyright:      The programs and associated files contained in this
//                 distribution were developed by Mete Ciragan. The programs
//                 are not in the public domain, but they are freely
//                 distributable without licensing fees. These programs are
//                 provided without guarantee or warrantee expressed or
//                 implied.
//
#ifndef INCLUDED_MXEVENT
#define INCLUDED_MXEVENT



class mxWidget;



class mxEvent
{
public:
	// ENUMS
	enum { 
		Action, 
		Size, 
		Timer, 
		Idle, 
		Show, 
		Hide,
		MouseUp, 
		MouseDown, 
		MouseMove, 
		MouseDrag,
		KeyUp, 
		KeyDown, 
		MouseWheeled, 
		Focus, 
		Activate,
		NCMouseUp, 
		NCMouseDown, 
		NCMouseMove, 
		NCMouseDrag,
		Close,
		PosChanged,
		Char,
		ParentNotify
	};

	enum { MouseLeftButton = 1, MouseRightButton = 2, MouseMiddleButton = 4};
	enum { KeyCtrl = 1, KeyShift = 2 };
	enum { RightClicked = 1, DoubleClicked = 2 };

	// DATA
	int event;
	mxWidget *widget;
	int action;
	int width, height;
	int x, y, buttons;
	int key;
	int modifiers;
	int flags;

	// NO CREATORS
	mxEvent () : event (0), widget (0), action (0), width (0), height (0), x (0), y (0), buttons (0), key (0), modifiers (0), flags (0) {}
	virtual ~mxEvent () {}

private:
	// NOT IMPLEMENTED
	mxEvent (const mxEvent&);
	mxEvent& operator= (const mxEvent&);
};



#endif // INCLUDED_MXEVENT