DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Annotation.cpp
Go to the documentation of this file.
1 // $Id: $
2 //==========================================================================
3 // AIDA Detector description implementation for LCD
4 //--------------------------------------------------------------------------
5 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
6 // All rights reserved.
7 //
8 // For the licensing terms see $DD4hepINSTALL/LICENSE.
9 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
10 //
11 // Author : M.Frank
12 //
13 //==========================================================================
14 
15 // Framework include files
16 #include "DDEve/Annotation.h"
17 #include "DD4hep/InstanceCount.h"
18 #include "TEveViewer.h"
19 #include "TGLViewer.h"
20 
21 // C/C++ include files
22 
23 // Forward declarations
24 
25 using namespace DD4hep;
26 
28 
29 Annotation::Annotation(TEveViewer* v, const std::string& text, float x, float y, Color_t c)
31 : TGLAnnotation(v->GetGLViewer(), text.c_str(), x, y)
32 {
33  SetTextSize(DefaultTextSize());
34  SetUseColorSet(kFALSE);
35  SetTextColor(c);
37 }
38 
42 }
43 
45 Bool_t Annotation::MouseEnter(TGLOvlSelectRecord& ) {
46  fActive = kFALSE;
47  return kTRUE;
48 }
49 
52  return 0.04;
53 }
56  return 0.01;
57 }
virtual Bool_t MouseEnter(TGLOvlSelectRecord &selRec)
Mouse has entered overlay area.
Definition: Annotation.cpp:45
static void decrement(T *)
Decrement count according to type information.
virtual ~Annotation()
Default destructor.
Definition: Annotation.cpp:40
static float DefaultMargin()
Default margin for placement in bottom left corner.
Definition: Annotation.cpp:55
static void increment(T *)
Increment count according to type information.
Definition: InstanceCount.h:98
static float DefaultTextSize()
Default text size.
Definition: Annotation.cpp:51
View * v
Definition: MultiView.cpp:30
Class of the ROOT toolkit. See http://root.cern.ch/root/htmldoc/ClassIndex.html.
Definition: ROOTClasses.h:26
ClassImp(Annotation) Annotation
Standard constructor with initialization.
Definition: Annotation.cpp:27
Class to add annotations to eve viewers.
Definition: Annotation.h:35