Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.4 KiB

  1. //**********************************************************************
  2. // File name: idt.h
  3. //
  4. // Definition of CDropTarget
  5. //
  6. // Copyright (c) 1992 - 1993 Microsoft Corporation. All rights reserved.
  7. //**********************************************************************
  8. #if !defined( _IDT_H_ )
  9. #define _IDT_H_
  10. #include <assert.h>
  11. class CSimpleDoc;
  12. /* Flags to control direction for drag scrolling */
  13. typedef enum tagSCROLLDIR {
  14. SCROLLDIR_NULL = 0,
  15. SCROLLDIR_UP = 1,
  16. SCROLLDIR_DOWN = 2,
  17. SCROLLDIR_RIGHT = 3,
  18. SCROLLDIR_LEFT = 4
  19. } SCROLLDIR;
  20. interface CDropTarget : public IDropTarget
  21. {
  22. CSimpleDoc FAR * m_pDoc;
  23. BOOL m_fCanDropCopy;
  24. BOOL m_fCanDropLink;
  25. DWORD m_dwSrcAspect;
  26. RECT m_rcDragRect;
  27. POINT m_ptLast;
  28. BOOL m_fDragFeedbackDrawn;
  29. DWORD m_dwTimeEnterScrollArea; // time of entering scroll border region
  30. DWORD m_dwLastScrollDir; // current dir for drag scroll
  31. DWORD m_dwNextScrollTime; // time for next scroll
  32. CDropTarget(CSimpleDoc FAR * pDoc)
  33. {
  34. TestDebugOut("In IDT's constructor\r\n");
  35. m_pDoc = pDoc;
  36. m_fCanDropCopy = FALSE;
  37. m_fCanDropLink = FALSE;
  38. m_fDragFeedbackDrawn = FALSE;
  39. m_dwTimeEnterScrollArea = 0L;
  40. m_dwNextScrollTime = 0L;
  41. m_dwLastScrollDir = SCROLLDIR_NULL;
  42. };
  43. ~CDropTarget()
  44. {
  45. TestDebugOut("In IDT's destructor\r\n");
  46. } ;
  47. STDMETHODIMP QueryInterface (REFIID riid, LPVOID FAR* ppv);
  48. STDMETHODIMP_(ULONG) AddRef ();
  49. STDMETHODIMP_(ULONG) Release ();
  50. // *** IDropTarget methods ***
  51. STDMETHODIMP DragEnter (LPDATAOBJECT pDataObj, DWORD grfKeyState,
  52. POINTL pt, LPDWORD pdwEffect);
  53. STDMETHODIMP DragOver (DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect);
  54. STDMETHODIMP DragLeave ();
  55. STDMETHODIMP Drop (LPDATAOBJECT pDataObj, DWORD grfKeyState, POINTL pt,
  56. LPDWORD pdwEffect);
  57. private:
  58. // Drag/Drop support methods
  59. BOOL QueryDrop (DWORD grfKeyState, POINTL pointl, BOOL fDragScroll,
  60. LPDWORD lpdwEffect);
  61. BOOL DoDragScroll( POINTL pointl );
  62. void InitDragFeedback(LPDATAOBJECT pDataObj, POINTL pointl);
  63. void DrawDragFeedback( POINTL pointl );
  64. void UndrawDragFeedback( void );
  65. };
  66. #endif // _IDT_H_