home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 3.8 KB | 104 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWEventD.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWEVENTD_H
- #define FWEVENTD_H
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #ifndef FWRUNTYP_H
- #include "FWRunTyp.h"
- #endif
-
- #ifndef FWPOINT_H
- #include "FWPoint.h"
- #endif
-
- // ----- OpenDoc Includes -----
-
- #ifndef _ODTYPES_
- #include <ODTypes.h>
- #endif
-
- #ifndef FWODMISS_H
- #include "FWODMiss.h"
- #endif
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- //==============================================================================
- // Forward Declarations
- //==============================================================================
-
- class FW_CLASS_ATTR FW_MEventHandler;
- class FW_CLASS_ATTR FW_CMenuBar;
- class FW_CLASS_ATTR ODFrame;
- class FW_CLASS_ATTR ODFacet;
-
- //==============================================================================
- // class FW_CEventDispatcher
- //==============================================================================
-
- class FW_CLASS_ATTR FW_CEventDispatcher
- {
- public:
- FW_DECLARE_CLASS
-
- FW_CEventDispatcher();
- FW_CEventDispatcher(FW_MEventHandler* theEventHandler, FW_CMenuBar* theMenuBar);
- virtual ~ FW_CEventDispatcher();
-
- virtual FW_Boolean Dispatch(Environment* ev, ODEventData* event, ODFrame* odFrame, ODFacet* odFacet, ODEventInfo* eventInfo);
-
- protected:
- virtual FW_Boolean DispatchNullEvent(Environment* ev, ODEventData* event, ODFrame* odFrame);
- virtual FW_Boolean DispatchMouseDownEvent(Environment* ev, ODEventData* event, ODFrame* odFrame, ODFacet* odFacet, FW_Boolean inBackground);
- virtual FW_Boolean DispatchMouseUpEvent(Environment* ev, ODEventData* event, ODFrame* odFrame, ODFacet* odFacet);
- virtual FW_Boolean DispatchEmbeddedMouseDownEvent(Environment* ev, ODEventData* event, ODFrame* odFrame, ODFacet* odFacet, ODEventInfo* eventInfo, FW_Boolean inBackground);
- virtual FW_Boolean DispatchEmbeddedMouseUpEvent(Environment* ev, ODEventData* event, ODFrame* odFrame, ODFacet* odFacet, ODEventInfo* eventInfo);
- virtual FW_Boolean DispatchBorderMouseDownEvent(Environment* ev, ODEventData* event, ODFrame* odFrame, ODFacet* odFacet, ODEventInfo* eventInfo);
- virtual FW_Boolean DispatchVirtualKeyDownEvent(Environment* ev, ODEventData* event, ODFrame* odFrame);
- virtual FW_Boolean DispatchVirtualKeyUpEvent(Environment* ev, ODEventData* event, ODFrame* odFrame);
- virtual FW_Boolean DispatchCharKeyEvent(Environment* ev, ODEventData* event, ODFrame* odFrame);
- virtual FW_Boolean DispatchActivateEvent(Environment* ev, ODEventData* event, ODFrame* odFrame, ODFacet* odFacet);
- virtual FW_Boolean DispatchMenuEvent(Environment* ev, ODEventData* event, ODFrame* odFrame);
- virtual FW_Boolean DispatchMouseEnterEvent(Environment* ev, ODFacet* odFacet, ODEventInfo* eventInfo);
- virtual FW_Boolean DispatchMouseWithinEvent(Environment* ev, ODFacet* odFacet, ODEventInfo* eventInfo);
- virtual FW_Boolean DispatchMouseLeaveEvent(Environment* ev, ODFacet* odFacet, ODEventInfo* eventInfo);
-
- #ifdef FW_BUILD_MAC
- virtual FW_Boolean DispatchWindowEvent(Environment* ev, ODEventData* event, ODFacet* odFacet);
- virtual FW_Boolean DispatchOSEvent(Environment* ev, ODEventData* event, ODFacet* odFacet);
- #endif
-
- static short OnMouseDown(Environment* ev, ODEventData* event);
- static void OnMouseUp(Environment* ev, ODEventData* event);
-
- static unsigned short gAutoRepeatCount;
-
- static unsigned long gLastMouseUp;
- static short gClickCount;
-
- private:
- FW_MEventHandler* fEventHandler;
- FW_CMenuBar* fMenuBar; // For translating menu events to commands
- FW_MEventHandler* fLastMouseDownTarget;
- FW_MEventHandler* fLastMouseDownFrame;
- };
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export off
- #endif
-
- #endif
-