home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool_main.zip / ool / include / xdragitm.h < prev    next >
Text File  |  1998-04-05  |  3KB  |  66 lines

  1. #ifndef __OOL_XDRAGITEM_H__
  2. #define __OOL_XDRAGITEM_H__
  3.  
  4. /*===========================================================================*/
  5. /* OOL ------------------- the Open Object Library ------------------- r 1.0 */
  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.       friend class XDragTransfer;
  35.    private:
  36.       PDRAGITEM item;
  37.       BOOL allocated;
  38.       PDRAGTRANSFER trans;
  39.    public:
  40.       XDragItem() { allocated = FALSE; trans = NULL; }
  41.       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);
  42.       ~XDragItem();
  43.       void Accept( const BOOL accept = TRUE );
  44.       void EndConversation( const BOOL success = TRUE);
  45.       OOL_WINDOWHANDLE GetSourceWindow(void) const { return item->hwndItem; }
  46.       USHORT GetControlOps() const;
  47.       void GetContainerName( XString*) const;
  48.       LONG GetID(void) const {return item->ulItemID;}
  49.       void GetMechanism( XString *) const;
  50.       void GetName( XString * ) const;
  51.       void GetTargetName( XString *) const;
  52.       void GetType( XString *) const;
  53.       BOOL RenderPrepare( const XWindow * target, const USHORT operation, const USHORT reply, const char * mechanism, const char * name, ULONG& suportedOps);
  54.       void SetContainerName( const char *);
  55.       void SetControlOps( const USHORT );
  56.       void SetMechanism( const char *);
  57.       void SetName( const char *);
  58.       void SetSupportedOps( const USHORT ops);
  59.       void SetTargetName( const char *);
  60.       void SetType(const char * type);
  61.       BOOL VerifyItemType( const char * mechanism, const char * format = NULL);
  62.       BOOL Render( const XWindow * target, const USHORT operation, const USHORT reply, const char * mechanism, const char * name, ULONG& suportedOps);
  63. };
  64.  
  65. #endif
  66.