ROOT logo
// @(#)root/eve:$Id: TEveCompound.h 30849 2009-10-23 13:45:23Z matevz $
// Author: Matevz Tadel 2007

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

#ifndef ROOT_TEveCompound
#define ROOT_TEveCompound

#include "TEveElement.h"
#include "TEveProjectionBases.h"


//==============================================================================
// TEveCompound
//==============================================================================

class TEveCompound : public TEveElementList
{
private:
   TEveCompound(const TEveCompound&);            // Not implemented
   TEveCompound& operator=(const TEveCompound&); // Not implemented

protected:
   Short_t  fCompoundOpen; // If more than zero, tag new children as compound members.

public:
   TEveCompound(const char* n="TEveCompound", const char* t="",
                Bool_t doColor=kTRUE);
   virtual ~TEveCompound() {}

   void   OpenCompound()         { ++fCompoundOpen;  }
   void   CloseCompound()        { --fCompoundOpen; }
   Bool_t IsCompoundOpen() const { return fCompoundOpen > 0; }

   virtual void SetMainColor(Color_t color);

   virtual void AddElement(TEveElement* el);
   virtual void RemoveElementLocal(TEveElement* el);
   virtual void RemoveElementsLocal();

   virtual void FillImpliedSelectedSet(Set_t& impSelSet);

   virtual TClass* ProjectedClass(const TEveProjection* p) const;

   ClassDef(TEveCompound, 0); // Container for managing compounds of TEveElements.
};


//==============================================================================
// TEveCompoundProjected
//==============================================================================

class TEveCompoundProjected : public TEveCompound,
                              public TEveProjected
{
private:
   TEveCompoundProjected(const TEveCompoundProjected&);            // Not implemented
   TEveCompoundProjected& operator=(const TEveCompoundProjected&); // Not implemented

protected:
   virtual void SetDepthLocal(Float_t /*d*/) {}

public:
   TEveCompoundProjected();
   virtual ~TEveCompoundProjected() {}

   virtual void SetMainColor(Color_t color);

   virtual void UpdateProjection()      {}

   ClassDef(TEveCompoundProjected, 0); // Projected TEveCompund container.
};

#endif
 TEveCompound.h:1
 TEveCompound.h:2
 TEveCompound.h:3
 TEveCompound.h:4
 TEveCompound.h:5
 TEveCompound.h:6
 TEveCompound.h:7
 TEveCompound.h:8
 TEveCompound.h:9
 TEveCompound.h:10
 TEveCompound.h:11
 TEveCompound.h:12
 TEveCompound.h:13
 TEveCompound.h:14
 TEveCompound.h:15
 TEveCompound.h:16
 TEveCompound.h:17
 TEveCompound.h:18
 TEveCompound.h:19
 TEveCompound.h:20
 TEveCompound.h:21
 TEveCompound.h:22
 TEveCompound.h:23
 TEveCompound.h:24
 TEveCompound.h:25
 TEveCompound.h:26
 TEveCompound.h:27
 TEveCompound.h:28
 TEveCompound.h:29
 TEveCompound.h:30
 TEveCompound.h:31
 TEveCompound.h:32
 TEveCompound.h:33
 TEveCompound.h:34
 TEveCompound.h:35
 TEveCompound.h:36
 TEveCompound.h:37
 TEveCompound.h:38
 TEveCompound.h:39
 TEveCompound.h:40
 TEveCompound.h:41
 TEveCompound.h:42
 TEveCompound.h:43
 TEveCompound.h:44
 TEveCompound.h:45
 TEveCompound.h:46
 TEveCompound.h:47
 TEveCompound.h:48
 TEveCompound.h:49
 TEveCompound.h:50
 TEveCompound.h:51
 TEveCompound.h:52
 TEveCompound.h:53
 TEveCompound.h:54
 TEveCompound.h:55
 TEveCompound.h:56
 TEveCompound.h:57
 TEveCompound.h:58
 TEveCompound.h:59
 TEveCompound.h:60
 TEveCompound.h:61
 TEveCompound.h:62
 TEveCompound.h:63
 TEveCompound.h:64
 TEveCompound.h:65
 TEveCompound.h:66
 TEveCompound.h:67
 TEveCompound.h:68
 TEveCompound.h:69
 TEveCompound.h:70
 TEveCompound.h:71
 TEveCompound.h:72
 TEveCompound.h:73
 TEveCompound.h:74
 TEveCompound.h:75
 TEveCompound.h:76
 TEveCompound.h:77
 TEveCompound.h:78
 TEveCompound.h:79
 TEveCompound.h:80