upgrading_to_v4.txt 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. Upgrading from version 3.x of the Drag and Drop Component Suite.
  2. --------------------------------------------------------------------------------
  3. Replace the following units:
  4. --------------------------------------------------------------------------------
  5. Old: New:
  6. DragFileSource DragDropFile
  7. DragFileTarget DragDropFile
  8. DropTextSource DragDropText
  9. DropTextTarget DragDropText
  10. DropPIDLSource DragDropPIDL
  11. DropPIDLTarget DragDropPIDL
  12. DropBMPSource DragDropGraphics
  13. DropBMPTarget DragDropGraphics
  14. --------------------------------------------------------------------------------
  15. Demo applications moved:
  16. --------------------------------------------------------------------------------
  17. From To:
  18. .\DetailedDemo .\Demo\DetailedDemo
  19. .\PIDLDemo .\Demo\PIDLDemo
  20. .\SourceDemo .\Demo\SourceDemo
  21. .\TargetDemo .\Demo\TargetDemo
  22. --------------------------------------------------------------------------------
  23. Deprecated classes:
  24. --------------------------------------------------------------------------------
  25. Old class: Replaced with:
  26. TDropSource TCustomDropMultiSource
  27. TCustomDropSource TCustomDropMultiSource
  28. TDropTarget TCustomDropMultiTarget
  29. TCustomDropTarget TCustomDropMultiTarget
  30. --------------------------------------------------------------------------------
  31. Field Test Feedback:
  32. --------------------------------------------------------------------------------
  33. I have attempted to maintain the greatest possible backward compatibility with
  34. earlier versions of the Drag and Drop Component Suite. If you encounter any
  35. compatibility problems not addressed in this document, plase let me know about
  36. them so they can be fixed before the final release.
  37. Also ,if you have created and are using custom drag and drop components based on
  38. a previous version of the Drag and Drop Component Suite, I urge you to contact
  39. me. The current design have to some degree been limited
  40. --------------------------------------------------------------------------------
  41. Architectural changes:
  42. --------------------------------------------------------------------------------
  43. - The TInterfacedComponent class has moved from the DropSource unit to the
  44. DragDrop unit.
  45. - All source and target components now uses TClipboardFormat and TDataFormat
  46. objects for data conversion and transfer.
  47. - The TDropSource class has been deprecated and has been moved to the
  48. DropSource3 unit. It is provided for backwards compatibility only and will be
  49. removed in a future version. Instead use either the TCustomDropSource or the
  50. TCustomDropMultiSource classes which replaces the TDropSource class as the
  51. drop source base classes. The TCustomDropMultiSource base class should be used
  52. for all new development.
  53. - The TDropTarget class has been deprecated, but is still located in the
  54. DropTarget unit. It is provided for backwards compatibility only and will be
  55. removed in a future version. Instead use the TCustomDropTarget or the
  56. TCustomDropMultiTarget classes which replaces the TDropTarget class as the
  57. drop target base classes. The TCustomDropMultiTarget base class should be used
  58. for all new development.
  59. - All drop source components now descend from the new TCustomDropMultiSource
  60. class which descends from TCustomDropSource.
  61. - All drop target components now descend from the new TCustomDropMultiTarget
  62. class which descends from TCustomDropTarget.
  63. - The component glyphs of TDropBMPSource and TDropBMPTarget has changed. The new
  64. TDropImageTarget component uses the old TDropBMPTarget glyph.
  65. - CutToClipboard and CopyToClipboard now places live data on the clipboard
  66. instead of a static snapshot of the data. This is nescessary to support
  67. "delete on paste". The implications of this is that there is a direct link
  68. between the clipboard and the drop source component. If you modify the data
  69. of the source component (e.g. clear TDropTextSource.Text), you will also
  70. modify the data on the clipboard. The drop source component's FlushClipboard
  71. method can be used to "freeze" the data on the clipboard and the
  72. EmptyClipboard method can be used to empty the clipboard.
  73. - The TDropSource.InternalCutCopyToClipboard method has been deleted.
  74. - The TDropSource.CutOrCopyToClipboard does not need to be implemented in
  75. descendant classes anymore and it is advisable not to do so.
  76. - All clipboard format registrations are now done by the TClipboardFormat
  77. descendant classes. In previous versions, the registration values were
  78. available via global variables (CF_TEXT, CF_IDLIST etc.), but these variables
  79. are no longer available. If you need access to the registration values, you
  80. should instead use the TClipboardFormat.GetClipboardFormat class methods.
  81. E.g. to retrieve the registration value for the "FileGroupDescriptor" format,
  82. use the TFileGroupDescritorClipboardFormat.GetClipboardFormat class method.
  83. Alternatively, you can also use the RegisterClipboardFormat API function to
  84. retrieve the regitration value directly. Either methods are equally valid.
  85. - The ShellMalloc global variable has moved from the DropSource unit to the
  86. DragDrop unit.
  87. - Target components now supports multiple drop targets.
  88. Previous versions only allowed one control to be registered as a drop target
  89. per target component and registering subsequent targets would automatically
  90. unregister the previous drop target. This behavious can be emulated by setting
  91. the target component's MultiTarget property to False. When MultiTarget is
  92. False, registering a target will automatically unregister the previous target.
  93. If MultiTarget is True, registering a target will not unregister any previous
  94. targets.