Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
EventDispatch.h
Go to the documentation of this file.
1
/* Project nGenEx
2
Destroyer Studios LLC
3
Copyright © 1997-2004. All Rights Reserved.
4
5
SUBSYSTEM: nGenEx.lib
6
FILE: EventDispatch.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
Event Dispatch class
13
*/
14
15
#ifndef EventDispatch_h
16
#define EventDispatch_h
17
18
#include "
Types.h
"
19
#include "
EventTarget.h
"
20
#include "
List.h
"
21
22
// +--------------------------------------------------------------------+
23
24
class
EventDispatch
25
{
26
public
:
27
static
const
char
*
TYPENAME
() {
return
"EventDispatch"
; }
28
29
EventDispatch
();
30
virtual
~EventDispatch
();
31
32
static
void
Create
();
33
static
void
Close
();
34
static
EventDispatch
*
GetInstance
() {
return
dispatcher
; }
35
36
virtual
void
Dispatch
();
37
virtual
void
Register
(
EventTarget
* tgt);
38
virtual
void
Unregister
(
EventTarget
* tgt);
39
40
virtual
EventTarget
*
GetCapture
();
41
virtual
int
CaptureMouse
(
EventTarget
* tgt);
42
virtual
int
ReleaseMouse
(
EventTarget
* tgt);
43
44
virtual
EventTarget
*
GetFocus
();
45
virtual
void
SetFocus
(
EventTarget
* tgt);
46
virtual
void
KillFocus
(
EventTarget
* tgt);
47
48
virtual
void
MouseEnter
(
EventTarget
* tgt);
49
50
protected
:
51
int
mouse_x
,
mouse_y
,
mouse_l
,
mouse_r
;
52
List<EventTarget>
clients
;
53
EventTarget
*
capture
;
54
EventTarget
*
current
;
55
EventTarget
*
focus
;
56
EventTarget
*
click_tgt
;
57
58
static
EventDispatch
*
dispatcher
;
59
};
60
61
#endif EventDispatch_h
62
nGenEx
EventDispatch.h
Generated on Thu May 31 2012 16:30:53 for Starshatter_Open by
1.8.1