forked from panda3d/panda3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuttonEventList.I
More file actions
74 lines (67 loc) · 1.39 KB
/
buttonEventList.I
File metadata and controls
74 lines (67 loc) · 1.39 KB
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
/**
* PANDA 3D SOFTWARE
* Copyright (c) Carnegie Mellon University. All rights reserved.
*
* All use of this software is subject to the terms of the revised BSD
* license. You should have received a copy of this license along
* with this source code in a file named "LICENSE."
*
* @file buttonEventList.I
* @author drose
* @date 2002-03-12
*/
/**
*
*/
INLINE ButtonEventList::
ButtonEventList() {
}
/**
*
*/
INLINE ButtonEventList::
ButtonEventList(const ButtonEventList ©) :
_events(copy._events)
{
}
/**
*
*/
INLINE void ButtonEventList::
operator = (const ButtonEventList ©) {
_events = copy._events;
}
/**
* Adds a new event to the end of the list.
*/
INLINE void ButtonEventList::
add_event(ButtonEvent event) {
_events.push_back(event);
}
/**
* Returns the number of events in the list.
*/
INLINE int ButtonEventList::
get_num_events() const {
return _events.size();
}
/**
* Returns the nth event in the list. This does not remove the event from the
* list; the only way to remove events is to empty the whole list with
* clear().
*/
INLINE const ButtonEvent &ButtonEventList::
get_event(int n) const {
#ifndef NDEBUG
static ButtonEvent empty_event;
nassertr(n >= 0 && n < (int)_events.size(), empty_event);
#endif // NDEBUG
return _events[n];
}
/**
* Empties all the events from the list.
*/
INLINE void ButtonEventList::
clear() {
_events.clear();
}