ROOT logo
// $Id: TVirtualDragManager.cxx,v 1.3 2004/11/23 00:07:22 rdm Exp $
// Author: Valeriy Onuchin   02/08/04

/*************************************************************************
 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TVirtualDragManager                                                  //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "TVirtualDragManager.h"
#include "TROOT.h"
#include "TPluginManager.h"


//______________________________________________________________________________
// TVirtualDragManager
//
// Virtual drag and drop manager used for the GUI builder.

ClassImp(TVirtualDragManager)


TVirtualDragManager *gDragManager = 0;

//______________________________________________________________________________
TVirtualDragManager::TVirtualDragManager()
{
   // Constructor.

   Init();
}

//______________________________________________________________________________
TVirtualDragManager *TVirtualDragManager::Instance()
{
   // Load plugin and create drag manager object.

   if (gDragManager) return gDragManager;

   static Bool_t loaded = kFALSE;
   static TPluginHandler *h = 0;

   // load plugin
   if (!loaded) {
      h = gROOT->GetPluginManager()->FindHandler("TVirtualDragManager");
      if (h) {
         if (h->LoadPlugin() == -1) return 0;
         loaded = kTRUE;
      }
   }
   if (loaded) gDragManager = (TVirtualDragManager*)h->ExecPlugin(0);

   return gDragManager;
}

//______________________________________________________________________________
void TVirtualDragManager::Init()
{
   // Initialization.

   fDragging = kFALSE;
   fMoveWaiting = kFALSE;
   fDropping = kFALSE;
   fPasting = kFALSE;
   fTarget = 0;
   fSource = 0;
   fFrameUnder = 0;
   fPasteFrame = 0;
   fDragType = kDragNone;
}
 TVirtualDragManager.cxx:1
 TVirtualDragManager.cxx:2
 TVirtualDragManager.cxx:3
 TVirtualDragManager.cxx:4
 TVirtualDragManager.cxx:5
 TVirtualDragManager.cxx:6
 TVirtualDragManager.cxx:7
 TVirtualDragManager.cxx:8
 TVirtualDragManager.cxx:9
 TVirtualDragManager.cxx:10
 TVirtualDragManager.cxx:11
 TVirtualDragManager.cxx:12
 TVirtualDragManager.cxx:13
 TVirtualDragManager.cxx:14
 TVirtualDragManager.cxx:15
 TVirtualDragManager.cxx:16
 TVirtualDragManager.cxx:17
 TVirtualDragManager.cxx:18
 TVirtualDragManager.cxx:19
 TVirtualDragManager.cxx:20
 TVirtualDragManager.cxx:21
 TVirtualDragManager.cxx:22
 TVirtualDragManager.cxx:23
 TVirtualDragManager.cxx:24
 TVirtualDragManager.cxx:25
 TVirtualDragManager.cxx:26
 TVirtualDragManager.cxx:27
 TVirtualDragManager.cxx:28
 TVirtualDragManager.cxx:29
 TVirtualDragManager.cxx:30
 TVirtualDragManager.cxx:31
 TVirtualDragManager.cxx:32
 TVirtualDragManager.cxx:33
 TVirtualDragManager.cxx:34
 TVirtualDragManager.cxx:35
 TVirtualDragManager.cxx:36
 TVirtualDragManager.cxx:37
 TVirtualDragManager.cxx:38
 TVirtualDragManager.cxx:39
 TVirtualDragManager.cxx:40
 TVirtualDragManager.cxx:41
 TVirtualDragManager.cxx:42
 TVirtualDragManager.cxx:43
 TVirtualDragManager.cxx:44
 TVirtualDragManager.cxx:45
 TVirtualDragManager.cxx:46
 TVirtualDragManager.cxx:47
 TVirtualDragManager.cxx:48
 TVirtualDragManager.cxx:49
 TVirtualDragManager.cxx:50
 TVirtualDragManager.cxx:51
 TVirtualDragManager.cxx:52
 TVirtualDragManager.cxx:53
 TVirtualDragManager.cxx:54
 TVirtualDragManager.cxx:55
 TVirtualDragManager.cxx:56
 TVirtualDragManager.cxx:57
 TVirtualDragManager.cxx:58
 TVirtualDragManager.cxx:59
 TVirtualDragManager.cxx:60
 TVirtualDragManager.cxx:61
 TVirtualDragManager.cxx:62
 TVirtualDragManager.cxx:63
 TVirtualDragManager.cxx:64
 TVirtualDragManager.cxx:65
 TVirtualDragManager.cxx:66
 TVirtualDragManager.cxx:67
 TVirtualDragManager.cxx:68
 TVirtualDragManager.cxx:69
 TVirtualDragManager.cxx:70
 TVirtualDragManager.cxx:71
 TVirtualDragManager.cxx:72
 TVirtualDragManager.cxx:73
 TVirtualDragManager.cxx:74
 TVirtualDragManager.cxx:75
 TVirtualDragManager.cxx:76
 TVirtualDragManager.cxx:77
 TVirtualDragManager.cxx:78