home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / uicldd.zip / DMSAMP2.HPP < prev    next >
Text File  |  1993-09-02  |  2KB  |  38 lines

  1. #include <idmprov.hpp>
  2.  
  3. #include <idmitem.hpp>
  4.  
  5. class ABitmapItem : public IDMItem {
  6. /*******************************************************************************
  7.   Objects of this class provide "bitmap control" drop behavior when a
  8.   source bitmap file is dropped on a bitmap control properly configured
  9.   with a target handler and a ABitmapProvider.
  10. *******************************************************************************/
  11. public:
  12. /*------------------------------- Constructor ----------------------------------
  13.   Objects of this class are constructed from a generic item handle.
  14. ------------------------------------------------------------------------------*/
  15.   ABitmapItem ( const IDMItemHandle &item );
  16.  
  17. /*------------------------------ Drop Behavior ---------------------------------
  18.   dropped - Take the dropped file, create a PM bitmap object,
  19.             and set it into the target window.
  20. ------------------------------------------------------------------------------*/
  21. virtual Boolean
  22.   dropped ( IWindow *target, IDMTargetDropEvent & );
  23. };
  24.  
  25. class ABitmapProvider : public IDMItemProvider {
  26. /*******************************************************************************
  27.   Objects of this class are attached to bitmap controls in order to have
  28.   ABitmapItem objects created when a bitmap file is dropped on such a
  29.   control.
  30. *******************************************************************************/
  31. public:
  32. /*------------------------------- Target Items ---------------------------------
  33.   provideTargetItemFor - Returns an ABitmapItem to replace the argument item.
  34. ------------------------------------------------------------------------------*/
  35. virtual IDMItemHandle
  36.   provideTargetItemFor ( const IDMItemHandle &item );
  37. };
  38.