|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLMISC::CEventListenerAsync Class ReferenceCEventListenerAsync.
More...
#include <event_listener.h>
Inheritance diagram for NLMISC::CEventListenerAsync:
List of all members.
Detailed Description
CEventListenerAsync.
-
Author:
-
Stephane Coutelas , Nevrax France
-
Date:
-
2000
Definition at line 66 of file event_listener.h.
Constructor & Destructor Documentation
NLMISC::CEventListenerAsync::CEventListenerAsync |
( |
|
) |
|
|
virtual NLMISC::CEventListenerAsync::~CEventListenerAsync |
( |
|
) |
[inline, virtual] |
|
Member Function Documentation
void NLMISC::CEventListenerAsync::addToServer |
( |
CEventServer & |
server |
) |
|
|
bool NLMISC::CEventListenerAsync::isKeyDown |
( |
TKey |
key |
) |
const |
|
bool NLMISC::CEventListenerAsync::isKeyPushed |
( |
TKey |
key, |
|
|
bool |
release = true |
|
) |
|
|
|
Get if a the state of key has pushed since the last call of isKeyPushed with release=true.
-
Parameters:
-
key |
is the key to check. |
release |
if true, the pushed state of the key is released (force to be false). It will return to true next time only if key is released and then re-pushed. |
-
See also:
-
reset()
Definition at line 78 of file event_listener.cpp.
References _KeyDownArray, _KeyReleaseArray, and NLMISC::TKey.
Referenced by NL3D::CNELU::screenshot. |
void NLMISC::CEventListenerAsync::operator() |
( |
const CEvent & |
event |
) |
[protected, virtual] |
|
|
Call back of the listener.
-
Parameters:
-
event |
is the event send to the listener |
Implements NLMISC::IEventListener.
Definition at line 89 of file event_listener.cpp.
References _KeyArray, _KeyDownArray, _KeyReleaseArray, NLMISC::EventKeyDownId, NLMISC::EventKeyUpId, NLMISC::EventSetFocusId, NLMISC::KeyCONTROL, NLMISC::KeyLCONTROL, NLMISC::KeyLMENU, NLMISC::KeyLSHIFT, NLMISC::KeyMENU, NLMISC::KeyRCONTROL, NLMISC::KeyRMENU, NLMISC::KeyRSHIFT, and NLMISC::KeySHIFT. |
void NLMISC::CEventListenerAsync::removeFromServer |
( |
CEventServer & |
server |
) |
|
|
void NLMISC::CEventListenerAsync::reset |
( |
|
) |
|
|
|
Clear all the Down states to false.
Usefull sometimes when you don't bother what have been pushed before. e.g.: your app listen/test to the key 'A' and 'B' for a certain long period. Then, it test 'C' and 'D' later. If the user has press (by error) the key 'C' during the first period, this API has record it, and then, at the second period, isKeyDown(KeyC) will return true the first time the key is tested, unless if you do a reset() at the beggining of the second period. Clear all the pushed states to false too. -
See also:
-
isKeyDown()
Definition at line 195 of file event_listener.cpp.
References _KeyArray, _KeyDownArray, and _KeyReleaseArray.
Referenced by CEventListenerAsync, and NL3D::CDriverUser::setDisplay. |
Member Data Documentation
CBitSet NLMISC::CEventListenerAsync::_KeyArray [protected]
|
|
CBitSet NLMISC::CEventListenerAsync::_KeyDownArray [protected]
|
|
CBitSet NLMISC::CEventListenerAsync::_KeyReleaseArray [protected]
|
|
The documentation for this class was generated from the following files:
|
|