#ifndef ROOT_TDNDManager
#define ROOT_TDNDManager
#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif
class TGMainFrame;
class TGDragWindow;
class TTimer;
class TGDragWindow : public TGFrame {
protected:
   static Cursor_t fgDefaultCursor; 
protected:
   virtual void DoRedraw();
   Window_t fInput;                 
   Pixmap_t fPic, fMask;            
   UInt_t   fPw, fPh;               
public:
   TGDragWindow(const TGWindow *p, Pixmap_t pic, Pixmap_t mask,
                UInt_t options = kChildFrame, Pixel_t back = GetWhitePixel());
   virtual ~TGDragWindow();
   virtual TGDimension GetDefaultSize() const { return TGDimension(fPw, fPh); }
   virtual void MapWindow();
   virtual void UnmapWindow();
   virtual void RaiseWindow();
   virtual void LowerWindow();
   virtual void MapRaised();
   virtual void Layout();
   Window_t GetInputId() const { return fInput; }
   Bool_t HasWindow(Window_t w) const { return (w == fId || w == fInput); }
   ClassDef(TGDragWindow, 0) 
};
class TDNDdata : public TObject {
public:
   TDNDdata(Atom_t dt = kNone, void *d = 0, Int_t len = 0, Atom_t act = kNone)
           { fDataType = dt; fData = d; fDataLength = len; fAction = act; }
   ~TDNDdata() {}
   Atom_t    fDataType;       
   Atom_t    fAction;         
   void     *fData;           
   Int_t     fDataLength;     
   ClassDef(TDNDdata, 0) 
};
class TGDNDManager : public TObject {
protected:
   TGFrame       *fMain;                         
   Atom_t         fVersion;                      
   Atom_t        *fTypelist, *fDraggerTypes;     
   Atom_t         fDropType;                     
   Atom_t         fAcceptedAction, fLocalAction; 
   Bool_t         fDragging;                     
   Bool_t         fDropAccepted;                 
   Bool_t         fStatusPending;                
   Bool_t         fUseVersion;                   
   Bool_t         fProxyOurs;                    
   Window_t       fSource, fTarget;              
   Bool_t         fTargetIsDNDaware;             
   UInt_t         fGrabEventMask;                
   TGFrame       *fLocalSource, *fLocalTarget;   
   TTimer        *fDropTimeout;                  
   TGDragWindow  *fDragWin;                      
   Pixmap_t       fPic, fMask;                   
   Int_t          fHotx, fHoty;                  
   Cursor_t       fDNDNoDropCursor;              
protected:
   static Atom_t  fgDNDaware, fgDNDselection, fgDNDproxy;
   static Atom_t  fgDNDenter, fgDNDleave, fgDNDposition, fgDNDstatus;
   static Atom_t  fgDNDdrop, fgDNDfinished;
   static Atom_t  fgDNDversion;
   static Atom_t  fgDNDactionCopy, fgDNDactionMove, fgDNDactionLink;
   static Atom_t  fgDNDactionAsk, fgDNDactionPrivate;
   static Atom_t  fgDNDtypeList, fgDNDactionList, fgDNDactionDescrip;
   static Atom_t  fgXCDNDData;
   static Bool_t  fgInit;
   static Atom_t  fgXAWMState;
protected:
   void           InitAtoms();
   Window_t       GetRootProxy();
   Window_t       FindWindow(Window_t root, Int_t x, Int_t y, Int_t maxd);
   Bool_t         IsDNDAware(Window_t win, Atom_t *typelist = 0);
   Bool_t         IsTopLevel(Window_t win);
   void           SendDNDenter(Window_t target);
   void           SendDNDleave(Window_t target);
   void           SendDNDposition(Window_t target, int x, int y,
                                  Atom_t action, Time_t timestamp);
   void           SendDNDstatus(Window_t target, Atom_t action);
   void           SendDNDdrop(Window_t target);
   void           SendDNDfinished(Window_t src);
   Bool_t         HandleDNDenter(Window_t src, long vers, Atom_t dataTypes[3]);
   Bool_t         HandleDNDleave(Window_t src);
   Bool_t         HandleDNDposition(Window_t src, int x_root, int y_root, Atom_t action, Time_t timestamp);
   Bool_t         HandleDNDstatus(Window_t from, int accepted,
                                  Rectangle_t skip, Atom_t action);
   Bool_t         HandleDNDdrop(Window_t src, Time_t timestamp);
   Bool_t         HandleDNDfinished(Window_t target);
public:
   TGDNDManager(TGFrame *toplevel, Atom_t *typelist);
   virtual ~TGDNDManager();
   Bool_t         HandleClientMessage(Event_t *event);
   Bool_t         HandleSelectionRequest(Event_t *event);
   Bool_t         HandleSelection(Event_t *event);
   Bool_t         HandleTimer(TTimer *t);
  
   TGFrame       *GetMainFrame() const { return fMain; }
   void           SetMainFrame(TGFrame *main) { fMain = main; }
   void           SetDragPixmap(Pixmap_t pic, Pixmap_t mask, Int_t hot_x, Int_t hot_y);
   Bool_t         SetRootProxy();
   Bool_t         RemoveRootProxy();
   Bool_t         StartDrag(TGFrame *src, Int_t x_root, Int_t y_root,
                            Window_t grabWin = kNone);
   Bool_t         Drag(Int_t x_root, Int_t y_root, Atom_t action, Time_t timestamp);
   Bool_t         Drop();
   Bool_t         EndDrag();
   Bool_t         IsDragging() const { return fDragging; }
   Window_t       GetSource() const { return fSource; }
   Window_t       GetTarget() const { return fTarget; }
   Atom_t        *GetTypeList() const { return fTypelist; }
   static Atom_t  GetDNDaware();
   static Atom_t  GetDNDselection();
   static Atom_t  GetDNDproxy();
   static Atom_t  GetDNDenter();
   static Atom_t  GetDNDleave();
   static Atom_t  GetDNDposition();
   static Atom_t  GetDNDstatus();
   static Atom_t  GetDNDdrop();
   static Atom_t  GetDNDfinished();
   static Atom_t  GetDNDversion();
   static Atom_t  GetDNDactionCopy();
   static Atom_t  GetDNDactionMove();
   static Atom_t  GetDNDactionLink();
   static Atom_t  GetDNDactionAsk();
   static Atom_t  GetDNDactionPrivate();
   static Atom_t  GetDNDtypeList();
   static Atom_t  GetDNDactionList();
   static Atom_t  GetDNDactionDescrip();
   static Atom_t  GetXCDNDData();
   ClassDef(TGDNDManager, 0) 
};
R__EXTERN TGDNDManager *gDNDManager; 
#endif  // ROOT_TDNDManager
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.