evrouter.h

Go to the documentation of this file.
00001 /*********************************************************************
00002  *<
00003     FILE: evrouter.h
00004 
00005     DESCRIPTION: Event router functionality
00006 
00007     CREATED BY: Tom Hudson
00008 
00009     HISTORY: Created 16 June 1995
00010 
00011  *> Copyright (c) 1995, All Rights Reserved.
00012  **********************************************************************/
00013 
00014 #pragma once
00015 #include "coreexp.h"
00016 #include "maxheap.h"
00017 #include "evuser.h"
00018 #include "tab.h"
00019 
00020 typedef EventUser* PEventUser;
00021 typedef Tab<PEventUser> PEventUserTab;
00022 
00027 class EventRouter: public MaxHeapOperators {
00028     private:
00029         PEventUserTab   userTab;
00030         BOOL            notifyMultiple;
00031     public:
00032         EventRouter(BOOL multiple = FALSE)  { notifyMultiple = multiple; }
00037         CoreExport void Register(EventUser *user);
00043         CoreExport void UnRegister(EventUser *user);
00044         // Process the event.  Returns TRUE if the event was handed off to a user.
00047         CoreExport BOOL Process();
00048     };
00049 
00050 extern CoreExport EventRouter deleteRouter;
00051 extern CoreExport EventRouter backspaceRouter;
00052 #ifdef _OSNAP
00053     extern CoreExport EventRouter tabkeyRouter;
00054 #endif
00055