home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warphead.zip / H / STDDISPO.H < prev    next >
C/C++ Source or Header  |  1997-02-28  |  8KB  |  193 lines

  1. /*====START_GENERATED_PROLOG======================================
  2.  */
  3. /*
  4.  *   COMPONENT_NAME: odui
  5.  *
  6.  *   CLASSES:   OS2DispatchModule
  7.  *
  8.  *   ORIGINS: 82,27
  9.  *
  10.  *
  11.  *   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  12.  *   All Rights Reserved
  13.  *   Licensed Materials - Property of IBM
  14.  *   US Government Users Restricted Rights - Use, duplication or
  15.  *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  16.  *       
  17.  *   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  18.  *   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  19.  *   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  20.  *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  21.  *   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  22.  *   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  23.  *   OR PERFORMANCE OF THIS SOFTWARE.
  24.  */
  25. /*====END_GENERATED_PROLOG========================================
  26.  */
  27. /* @(#) 1.9 com/src/ui/StdDispO.h, odui, od96os2, odos29646d 10/31/96 12:45:51 [11/15/96 15:49:42] */
  28.  
  29. /********************************************************************/
  30. /*                                                                  */
  31. /*                                                                  */
  32. /* Copyright (C) Apple Computer, Inc., 1994                         */
  33. /*                                                                  */
  34. /*  IBM Change History (most recent first):                         */
  35. /*  138899 11/12/95 ced Add support for embedded PM controls        */
  36. /*                      handling drag/drop events.                  */
  37. /*  133968 08/23/95 aml Port DR3                                    */
  38. /*         08/16/94 Ced Port from Apple code (StdDispM.h)           */
  39. /*                                                                  */
  40. /********************************************************************/
  41. /*
  42.   File:    StdDispO.h
  43.  
  44.   Contains:  Helper object for standard dispatch module for OS2
  45.  
  46.   Written by:  Chuck Dumont
  47.  
  48.   Copyright:  ⌐ 1993 - 1995 by IBM, all rights reserved.
  49.  
  50.   Change History (most recent first):
  51.  
  52.      <8>   6/15/95  RR    #1254828/1255536 Adding Redispatching
  53.      <7>   5/10/95  RR    # 1242893, 1245692 Added fields to support
  54.                   Mouse up dispatching
  55.      <6>    5/2/95  RR    # 1226050 Added fLastBorderFrame.
  56.      <5>   1/13/95  RR    Added eventInfo to event handling methods
  57.      <4>  10/27/94  RR    Added tokenized focus fields
  58.      <3>   9/30/94  RR    #1171182 Treat icons as bundled. Added
  59.                   fViewAsFrameToken
  60.      <2>    9/6/94  RR    Added utility methods for event propagation
  61.      <1>   6/24/94  RR    first checked in
  62.     <14>   3/15/94  MB    Changes to support SCpp/ASLM builds,
  63.                   #1150864.
  64.     <13>   2/16/94  JA    Stop including Point.h.
  65.     <12>    2/9/94  NP    Tiger Team cleanup.
  66.     <11>   1/21/94  RR    Restored Dispatch() signature
  67.     <10>   1/18/94  RR    Add fScrollingFocus. Added DispatchTheEvent
  68.                   to propagate to container where appropriate
  69.      <9>   1/15/94  RR    WinState.h->WinStat.h,
  70.                   Dispatch.h->Disptch.h
  71.      <8>   1/11/94  Té    Init... changes
  72.      <7>  12/20/93  RR    New init strategy
  73.      <6>  12/16/93  RR    DispatchToFacetUnderPoint became a member
  74.                   function
  75.      <5>   12/2/93  RR    Use new eventType definition
  76.      <4>  11/19/93  RR    Added DispatchWindowEvent
  77.      <3>   8/13/93  CG    Added ASLM stuff.
  78.      <2>   8/11/93  RR    Added fields to cache handy references to
  79.                   session globals
  80.      <1>   8/10/93  RCR    first checked in
  81.  
  82.   To Do:
  83. */
  84.  
  85. #ifndef _STDDISPO_
  86. #define _STDDISPO_
  87.  
  88. #ifndef _ODTYPES_
  89. #include "ODTypes.h"
  90. #endif
  91.  
  92. #ifndef _PLFMDEF_
  93. #include "PlfmDef.h"
  94. #endif
  95.  
  96. //=====================================================================================
  97. // Classes defined in this interface
  98. //=====================================================================================
  99.  
  100. class OS2DispatchModule;
  101.  
  102. //=====================================================================================
  103. // Classes used by this interface
  104. //=====================================================================================
  105.  
  106. class ODWindow;
  107. class ODWindowState;
  108. class ODArbitrator;
  109. class ODDispatcher;
  110. class ODSession;
  111. class ODFrame;
  112. class ODFacet;
  113.  
  114. //=====================================================================================
  115. // Global Variables
  116. //=====================================================================================
  117.  
  118. //=====================================================================================
  119. // OS2DispatchModule
  120. //=====================================================================================
  121.  
  122. class OS2DispatchModule
  123. {
  124. public:
  125.  
  126.   OS2DispatchModule();
  127.  
  128.   ~OS2DispatchModule();
  129.  
  130.   ODNVMethod void InitOS2DispatchModule(Environment* ev, ODSession* session);
  131.  
  132.   ODNVMethod ODBoolean Dispatch(Environment* ev, ODEventData* event,
  133.                 ODEventInfo* eventInfo);
  134.  
  135. protected:
  136.  
  137.   ODNVMethod ODBoolean HandleResizeEvent (Environment* ev, ODEventData* theEvent, ODEventInfo* eventInfo);
  138.   ODNVMethod ODBoolean HandleMoveEvent (Environment* ev, ODEventData* theEvent, ODEventInfo* eventInfo);
  139.   ODNVMethod ODBoolean DispatchMenuEvent (Environment* ev, ODEventData* theEvent, ODEventInfo* eventInfo);
  140.   ODNVMethod ODBoolean DispatchMouseEvent(Environment* ev, ODEventData* theEvent, ODEventInfo* eventInfo);
  141.   ODNVMethod ODBoolean DispatchKeyEvent(Environment* ev, ODEventData* event, ODEventInfo* eventInfo);
  142.  
  143.   ODNVMethod ODBoolean DispatchUpdateEvent(Environment* ev, ODEventData* event);
  144.   ODNVMethod ODBoolean DispatchActivateEvent(Environment* ev, ODEventData* event, ODEventInfo* eventInfo);
  145.  
  146.   ODNVMethod ODBoolean DispatchToFacetUnderPoint(Environment* ev, ODWindow* window, ODPoint& windowPt,
  147.                                                  ODEventData* theEvent, ODEventInfo* eventInfo);
  148.  
  149.   ODNVMethod ODBoolean DispatchClipboardEvent(Environment*ev, ODEventData* event);
  150.  
  151.   ODNVMethod ODBoolean DispatchDragDropEvent(Environment*ev, ODEventData* event);
  152.  
  153.   ODNVMethod ODBoolean DispatchTheEvent(Environment* ev,
  154.               ODEventData* theEvent,
  155.               ODFrame* targetFrame,
  156.               ODFacet* targetFacet,
  157.               ODEventInfo* eventInfo);
  158.  
  159.   ODNVMethod ODBoolean PropagateTheEvent(Environment* ev,
  160.               ODEventData* theEvent,
  161.               ODFrame* initialFrame,
  162.               ODFacet* initialFacet,
  163.               ODEventInfo* eventInfo);
  164.  
  165. protected:
  166.  
  167.   // Caches for frequently accessed items
  168.   ODSession*     fSession;
  169.   ODArbitrator*   fArbitrator;
  170.   ODWindowState* fWindowState;
  171.   ODDispatcher*   fDispatcher;
  172.  
  173.   ODTypeToken fKeyFocusToken;
  174.   ODTypeToken fMenuFocusToken;
  175.   ODTypeToken fSelectionFocusToken;
  176.   ODTypeToken fModalFocusToken;
  177.   ODTypeToken fMouseFocusToken;
  178.   ODTypeToken fMouseUpOutsideFocusToken;
  179.   ODTypeToken fScrollingFocusToken;
  180.   ODTypeToken fLargeIconViewToken;
  181.   ODTypeToken fSmallIconViewToken;
  182.   ODTypeToken fThumbnailViewToken;
  183.  
  184.   ODFacet* fMouseDownFacet; // The facet to which the last mouse down in border was sent. Used for the mouse up
  185.   ODFacet* fEmbeddedFacet;  // The embedded facet fpr a kODEvtMouseDownEmbedded. Used for the mouse up
  186.   ODBoolean fInvalidClick;  // Mouse down or up outside active border
  187.  
  188.   HWND fPrevDragTarget;       // [138899] HWND of window last dragover message was sent to, -1 if last dragover
  189.                               // message was sent to drag manager, 0 if no prev outstanding dragover message.
  190.   ODBoolean fNeverDropTarget; // [138899] set if fPrevDragTarget window return DOR_NEVERDROP.
  191. };
  192. #endif // _STDDISPO_
  193.