home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool_main.zip / ool / include / xwindrag.h < prev    next >
Text File  |  1997-08-12  |  2KB  |  50 lines

  1. #ifndef __OOL_XWINDOWDRAG_H__
  2. #define __OOL_XWINDOWDRAG_H__
  3.  
  4. /*===========================================================================*/
  5. /* OOL ------------------- the Open Object Library ------------------- r 1.0 */
  6. /*===========================================================================*/
  7. /*                              class: XWindowDrag                           */
  8. /*                       derived from: XObject                               */
  9. /*                        last update: 12/96                                 */
  10. /*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
  11. /*===========================================================================*/
  12.  
  13. #include "xobject.h"
  14.  
  15. #ifdef OOL_FOR_OS2_X86
  16.  
  17.    //image type and options
  18.    #define IMG_ICON     DRG_ICON
  19.    #define IMG_BITMAP   DRG_BITMAP
  20.    #define IMG_STRETCH  DRG_STRETCH
  21.  
  22. #endif
  23.  
  24. class XWindow;
  25. class XDragItem;
  26. class XBitmap;
  27. class XIcon;
  28.  
  29. class _export_ XWindowDrag: public XObject
  30. {
  31.    private:
  32.       PDRAGINFO pInfo;
  33.       SHORT count;
  34.       DRAGIMAGE * pImage;
  35.       SHORT imageCount;
  36.       XWindow * ownerWindow;
  37.    public:
  38.       XWindowDrag( const XWindow * owner, const SHORT itemCount );
  39.       ~XWindowDrag();
  40.       void AddImage( const XIcon *, const SHORT style = 0, const SHORT xOffset=0, const SHORT yOffset=0, const SHORT stretch=0);
  41.       void AddImage( const XBitmap *, const SHORT style = 0, const SHORT xOffset=0, const SHORT yOffset=0, const SHORT stretch=0);
  42.       OOL_WINDOWHANDLE PerformDrag( void );
  43.       void GetDragItem( XDragItem * item, const SHORT number);
  44.       SHORT GetItemCount(void) { return pInfo->cditem; }
  45.       LONG GetSupportedOperation( void ) { return pInfo->usOperation; }
  46.       void SetDragItem( const XDragItem * item, const SHORT number);
  47. };
  48.  
  49. #endif
  50.