GUI
include
EventListener.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017 by Maciej Wiecierzewski
3
*/
4
5
#ifndef EVENTLISTENER_H
6
#define EVENTLISTENER_H
7
8
#include <functional>
9
10
#include "
Event.h
"
11
12
namespace
gui
13
{
14
16
17
class
EventListener
18
{
19
public
:
20
typedef
std::function<void(Event&)>
Function
;
21
typedef
unsigned
int
Id
;
22
23
EventListener
() {};
24
EventListener
(Function
function
);
25
26
void
bind
(Function&
function
);
27
void
operator()
(
Event
& event);
28
29
protected
:
30
31
private
:
32
Function
func
;
33
EventListener::Id
id
;
34
35
friend
class
EventEmitter
;
36
friend
class
GUISystem
;
37
};
38
39
}
40
41
#endif // EVENTLISTENER_H
Generated on Sat Feb 11 2017 20:22:31 for GUI by
1.8.13