#ifndef __OOL_XDRAGITEM_H__
#define __OOL_XDRAGITEM_H__

/*===========================================================================*/
/* OOL ------------------- the Open Object Library ------------- OS/2 Beta 1 */
/*===========================================================================*/
/*                              class: XDragItem                             */
/*                       derived from: XObject                               */
/*                        last update: 12/96                                 */
/*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
/*===========================================================================*/

#include "xstring.h"
#include "xdragevn.h"


#ifdef OOL_FOR_OS2_X86

   //mechanism information
   #define DRG_M_FILE    "DRM_OS2FILE"
   #define DRG_M_OBJECT  "DRM_OBJECT"

   //format information
   #define DRG_F_TEXT    "DRF_TEXT"

#endif


class _export_ XDragItem: public XObject
{
      friend class XDragEvent;
      friend class XContainerDragEvent;
      friend class XWindowDrag;
   private:
   public:
      PDRAGITEM item;
      BOOL allocated;
   public:
      XDragItem() { allocated = FALSE;}
      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);
      ~XDragItem();
      void Accept( const BOOL accept = TRUE );
      void EndConversation( const BOOL success = TRUE);
      OOL_WINDOWHANDLE GetSourceWindow(void) { return item->hwndItem; }
      void GetContainerName( XString*);
      LONG GetID(void) {return item->ulItemID;}
      void GetMechanism( XString *);
      void GetName( XString * );
      void GetTargetName( XString *);
      void GetType( XString *);
      void SetContainerName( const char *);
      void SetMechanism( const char *);
      void SetName( const char *);
      void SetTargetName( const char *);
      BOOL VerifyItemType( const char * mechanism, const char * format = NULL);
};

#endif
