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.

77 lines
2.3 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. int m_nCount; // reference count
  23. CSimpleDoc FAR * m_pDoc;
  24. BOOL m_fCanDropCopy;
  25. BOOL m_fCanDropLink;
  26. DWORD m_dwSrcAspect;
  27. RECT m_rcDragRect;
  28. POINT m_ptLast;
  29. BOOL m_fDragFeedbackDrawn;
  30. DWORD m_dwTimeEnterScrollArea; // time of entering scroll border region
  31. DWORD m_dwLastScrollDir; // current dir for drag scroll
  32. DWORD m_dwNextScrollTime; // time for next scroll
  33. CDropTarget(CSimpleDoc FAR * pDoc) {
  34. TestDebugOut("In IDT's constructor\r\n");
  35. m_pDoc = pDoc;
  36. m_nCount = 0;
  37. m_fCanDropCopy = FALSE;
  38. m_fCanDropLink = FALSE;
  39. m_fDragFeedbackDrawn = FALSE;
  40. m_dwTimeEnterScrollArea = 0L;
  41. m_dwNextScrollTime = 0L;
  42. m_dwLastScrollDir = SCROLLDIR_NULL;
  43. };
  44. ~CDropTarget() {
  45. TestDebugOut("In IDT's destructor\r\n");
  46. assert(m_nCount == 0);
  47. } ;
  48. STDMETHODIMP QueryInterface (REFIID riid, LPVOID FAR* ppv);
  49. STDMETHODIMP_(ULONG) AddRef ();
  50. STDMETHODIMP_(ULONG) Release ();
  51. // *** IDropTarget methods ***
  52. STDMETHODIMP DragEnter (LPDATAOBJECT pDataObj, DWORD grfKeyState,
  53. POINTL pt, LPDWORD pdwEffect);
  54. STDMETHODIMP DragOver (DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect);
  55. STDMETHODIMP DragLeave ();
  56. STDMETHODIMP Drop (LPDATAOBJECT pDataObj, DWORD grfKeyState, POINTL pt,
  57. LPDWORD pdwEffect);
  58. private:
  59. // Drag/Drop support methods
  60. BOOL QueryDrop (DWORD grfKeyState, POINTL pointl, BOOL fDragScroll,
  61. LPDWORD lpdwEffect);
  62. BOOL DoDragScroll( POINTL pointl );
  63. void InitDragFeedback(LPDATAOBJECT pDataObj, POINTL pointl);
  64. void DrawDragFeedback( POINTL pointl );
  65. void UndrawDragFeedback( void );
  66. };
  67. #endif // _IDT_H_