ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TVirtualDragManager.cxx
Go to the documentation of this file.
1 // $Id: TVirtualDragManager.cxx,v 1.3 2004/11/23 00:07:22 rdm Exp $
2 // Author: Valeriy Onuchin 02/08/04
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 //////////////////////////////////////////////////////////////////////////
13 // //
14 // TVirtualDragManager //
15 // //
16 //////////////////////////////////////////////////////////////////////////
17 
18 #include "TVirtualDragManager.h"
19 #include "TROOT.h"
20 #include "TPluginManager.h"
21 
22 
23 //______________________________________________________________________________
24 // TVirtualDragManager
25 //
26 // Virtual drag and drop manager used for the GUI builder.
27 
29 
30 
32 
33 ////////////////////////////////////////////////////////////////////////////////
34 /// Constructor.
35 
37 {
38  Init();
39 }
40 
41 ////////////////////////////////////////////////////////////////////////////////
42 /// Load plugin and create drag manager object.
43 
45 {
46  if (gDragManager) return gDragManager;
47 
48  static Bool_t loaded = kFALSE;
49  static TPluginHandler *h = 0;
50 
51  // load plugin
52  if (!loaded) {
53  h = gROOT->GetPluginManager()->FindHandler("TVirtualDragManager");
54  if (h) {
55  if (h->LoadPlugin() == -1) return 0;
56  loaded = kTRUE;
57  }
58  }
59  if (loaded) gDragManager = (TVirtualDragManager*)h->ExecPlugin(0);
60 
61  return gDragManager;
62 }
63 
64 ////////////////////////////////////////////////////////////////////////////////
65 /// Initialization.
66 
68 {
69  fDragging = kFALSE;
71  fDropping = kFALSE;
72  fPasting = kFALSE;
73  fTarget = 0;
74  fSource = 0;
75  fFrameUnder = 0;
76  fPasteFrame = 0;
78 }
virtual void Init()
Initialization.
TH1 * h
Definition: legend2.C:5
#define gROOT
Definition: TROOT.h:344
Int_t LoadPlugin()
Load the plugin library for this handler.
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
Long_t ExecPlugin(int nargs, const T &...params)
R__EXTERN TVirtualDragManager * gDragManager
void Init(TClassEdit::TInterpreterLookupHelper *helper)
Definition: TClassEdit.cxx:118
ClassImp(TVirtualDragManager) TVirtualDragManager *gDragManager=0
static TVirtualDragManager * Instance()
Load plugin and create drag manager object.
const Bool_t kTRUE
Definition: Rtypes.h:91