home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ Games Programming
/
CPPGAMES.ISO
/
thx
/
include
/
kdfold.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-05-08
|
869b
|
43 lines
// ----------- kdfold.h
#ifndef KDFOLD_H
#define KDFOLD_H
#include "handler.h"
#include "folder.h"
#include "debug.h"
const int MAXDOWNENTRY = 20;
class Hand;
struct HotkeyEntry {
int code;
EventHandler list;
};
class HotkeyFolder : public Folder {
void reset_slot(int);
void thxregister_key(Hand*,int key,callback);
int numentries;
HotkeyEntry entry[MAXDOWNENTRY];
friend class HotkeyServer;
public:
HotkeyFolder() { numentries=0; }
void register_key(Hand*,int key,callback);
void unregister_key(Hand*,int key,callback);
void delHand(Hand*);
void reset();
void dispatch(int, int, int);
};
inline void HotkeyFolder::register_key(Hand* hand,
int code,callback cb)
{
thxregister_key(hand,code,cb);
Assert(numentries <= MAXDOWNENTRY);
}
#endif