Logo ROOT   6.12/07
Reference Guide
TEveCompound.h
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Author: Matevz Tadel 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, 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 #ifndef ROOT_TEveCompound
13 #define ROOT_TEveCompound
14 
15 #include "TEveElement.h"
16 #include "TEveProjectionBases.h"
17 
18 
19 //==============================================================================
20 // TEveCompound
21 //==============================================================================
22 
24 {
25 private:
26  TEveCompound(const TEveCompound&); // Not implemented
27  TEveCompound& operator=(const TEveCompound&); // Not implemented
28 
29 protected:
30  Short_t fCompoundOpen; // If more than zero, tag new children as compound members.
31 
32 public:
33  TEveCompound(const char* n="TEveCompound", const char* t="",
34  Bool_t doColor=kTRUE, Bool_t doTransparency=kFALSE);
35  virtual ~TEveCompound() {}
36 
39  Bool_t IsCompoundOpen() const { return fCompoundOpen > 0; }
40 
41  virtual void SetMainColor(Color_t color);
42  virtual void SetMainTransparency(Char_t t);
43 
44  virtual void AddElement(TEveElement* el);
45  virtual void RemoveElementLocal(TEveElement* el);
46  virtual void RemoveElementsLocal();
47 
48  virtual void FillImpliedSelectedSet(Set_t& impSelSet);
49 
50  virtual TClass* ProjectedClass(const TEveProjection* p) const;
51 
52  ClassDef(TEveCompound, 0); // Container for managing compounds of TEveElements.
53 };
54 
55 
56 //==============================================================================
57 // TEveCompoundProjected
58 //==============================================================================
59 
61  public TEveProjected
62 {
63 private:
64  TEveCompoundProjected(const TEveCompoundProjected&); // Not implemented
65  TEveCompoundProjected& operator=(const TEveCompoundProjected&); // Not implemented
66 
67 public:
70 
71  virtual void SetMainColor(Color_t color);
72 
73  virtual void UpdateProjection() {}
74  virtual TEveElement* GetProjectedAsElement() { return this; }
75 
76  ClassDef(TEveCompoundProjected, 0); // Projected TEveCompund container.
77 };
78 
79 #endif
Abstract base class for classes that hold results of a non-linear projection transformation.
std::set< TEveElement * > Set_t
Definition: TEveElement.h:73
virtual void AddElement(TEveElement *el)
Call base-class implementation.
virtual void RemoveElementLocal(TEveElement *el)
Decompoundofy el, call base-class version.
bool Bool_t
Definition: RtypesCore.h:59
A list of TEveElements.
Definition: TEveElement.h:459
Description of TEveCompound.
Definition: TEveCompound.h:23
#define ClassDef(name, id)
Definition: Rtypes.h:320
Description of TEveCompoundProjected.
Definition: TEveCompound.h:60
virtual void UpdateProjection()
Definition: TEveCompound.h:73
virtual TClass * ProjectedClass(const TEveProjection *p) const
Virtual from TEveProjectable, returns TEveCompoundProjected class.
Base-class for non-linear projections.
short Color_t
Definition: RtypesCore.h:79
Bool_t IsCompoundOpen() const
Definition: TEveCompound.h:39
virtual ~TEveCompoundProjected()
Definition: TEveCompound.h:69
virtual void SetMainColor(Color_t color)
SetMainColor for the compound.
virtual void RemoveElementsLocal()
Decompoundofy children, call base-class version.
virtual TEveElement * GetProjectedAsElement()
Returns this projected dynamic-casted to TEveElement.
Definition: TEveCompound.h:74
short Short_t
Definition: RtypesCore.h:35
void CloseCompound()
Definition: TEveCompound.h:38
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:75
virtual ~TEveCompound()
Definition: TEveCompound.h:35
const Bool_t kFALSE
Definition: RtypesCore.h:88
char Char_t
Definition: RtypesCore.h:29
TEveCompound(const TEveCompound &)
virtual void SetMainTransparency(Char_t t)
SetMainTransparency for the compound.
Short_t fCompoundOpen
Definition: TEveCompound.h:30
void OpenCompound()
Definition: TEveCompound.h:37
const Bool_t kTRUE
Definition: RtypesCore.h:87
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:33
const Int_t n
Definition: legend1.C:16
TEveCompound & operator=(const TEveCompound &)
virtual void FillImpliedSelectedSet(Set_t &impSelSet)
Recurse on all children that are in this compound and call the base-class version.