home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool.zip / OOL / include / xdragitm.h < prev    next >
Text File  |  1997-02-23  |  2KB  |  59 lines

  1. #ifndef __OOL_XDRAGITEM_H__
  2. #define __OOL_XDRAGITEM_H__
  3.  
  4. /*===========================================================================*/
  5. /* OOL ------------------- the Open Object Library ------------- OS/2 Beta 1 */
  6. /*===========================================================================*/
  7. /*                              class: XDragItem                             */
  8. /*                       derived from: XObject                               */
  9. /*                        last update: 12/96                                 */
  10. /*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
  11. /*===========================================================================*/
  12.  
  13. #include "xstring.h"
  14. #include "xdragevn.h"
  15.  
  16.  
  17. #ifdef OOL_FOR_OS2_X86
  18.  
  19.    //mechanism information
  20.    #define DRG_M_FILE    "DRM_OS2FILE"
  21.    #define DRG_M_OBJECT  "DRM_OBJECT"
  22.  
  23.    //format information
  24.    #define DRG_F_TEXT    "DRF_TEXT"
  25.  
  26. #endif
  27.  
  28.  
  29. class _export_ XDragItem: public XObject
  30. {
  31.       friend class XDragEvent;
  32.       friend class XContainerDragEvent;
  33.       friend class XWindowDrag;
  34.    private:
  35.    public:
  36.       PDRAGITEM item;
  37.       BOOL allocated;
  38.    public:
  39.       XDragItem() { allocated = FALSE;}
  40.       XDragItem( const XWindow * sourceWindow, const SHORT operation = DRG_COPY, const LONG id = 0, const char * type = DRG_M_OBJECT , const char * mechanism = DRG_F_TEXT);
  41.       ~XDragItem();
  42.       void Accept( const BOOL accept = TRUE );
  43.       void EndConversation( const BOOL success = TRUE);
  44.       OOL_WINDOWHANDLE GetSourceWindow(void) { return item->hwndItem; }
  45.       void GetContainerName( XString*);
  46.       LONG GetID(void) {return item->ulItemID;}
  47.       void GetMechanism( XString *);
  48.       void GetName( XString * );
  49.       void GetTargetName( XString *);
  50.       void GetType( XString *);
  51.       void SetContainerName( const char *);
  52.       void SetMechanism( const char *);
  53.       void SetName( const char *);
  54.       void SetTargetName( const char *);
  55.       BOOL VerifyItemType( const char * mechanism, const char * format = NULL);
  56. };
  57.  
  58. #endif
  59.