Logo ROOT  
Reference Guide
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
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 *************************************************************************/
12#ifndef ROOT_TEveElement
13#define ROOT_TEveElement
15#include "TEveUtil.h"
16#include "TEveProjectionBases.h"
18#include "TNamed.h"
19#include "TRef.h"
20#include <list>
21#include <set>
23class TGListTree;
24class TGListTreeItem;
25class TGPicture;
27class TEveCompound;
28class TEveTrans;
29class TGeoMatrix;
32// TEveElement
37 friend class TEveManager;
43 {
44 public:
48 TEveListTreeInfo() : fTree(nullptr), fItem(nullptr) {}
51 virtual ~TEveListTreeInfo() {}
54 { fTree = l.fTree; fItem = l.fItem; return *this; }
56 bool operator==(const TEveListTreeInfo& x) const
57 { return fTree == x.fTree && fItem == x.fItem; }
58 bool operator<(const TEveListTreeInfo& x) const
59 { return fTree == x.fTree ? fItem < x.fItem : fTree < x.fTree; }
61 ClassDef(TEveListTreeInfo, 0); // Structure agregating data for a render element image in a list tree.
62 };
64 static const TGPicture* fgRnrIcons[4];
65 static const TGPicture* fgListTreeIcons[9];
67 typedef std::set<TEveListTreeInfo> sLTI_t;
68 typedef sLTI_t::iterator sLTI_i;
69 typedef sLTI_t::reverse_iterator sLTI_ri;
71 typedef std::list<TEveElement*> List_t;
72 typedef List_t::iterator List_i;
73 typedef List_t::const_iterator List_ci;
75 typedef std::set<TEveElement*> Set_t;
76 typedef Set_t::iterator Set_i;
77 typedef Set_t::const_iterator Set_ci;
80 List_t fParents; // List of parents.
81 List_t fChildren; // List of children.
82 TEveCompound *fCompound; // Compound this object belongs to.
83 TEveElement *fVizModel; //! Element used as model from VizDB.
84 TString fVizTag; // Tag used to query VizDB for model element.
87 Int_t fParentIgnoreCnt; //! Counter for parents that are ignored in ref-counting.
88 Int_t fTopItemCnt; //! Counter for top-level list-tree items that prevent automatic destruction.
89 Int_t fDenyDestroy; //! Deny-destroy count.
90 Bool_t fDestroyOnZeroRefCnt; // Auto-destruct when ref-count reaches zero.
92 Bool_t fRnrSelf; // Render this element.
93 Bool_t fRnrChildren; // Render children of this element.
94 Bool_t fCanEditMainColor; // Allow editing of main color.
95 Bool_t fCanEditMainTransparency; // Allow editing of main transparency.
96 Bool_t fCanEditMainTrans; // Allow editing of main transformation.
98 Char_t fMainTransparency; // Main-transparency variable.
99 Color_t *fMainColorPtr; // Pointer to main-color variable.
100 TEveTrans *fMainTrans; // Pointer to main transformation matrix.
102 sLTI_t fItems; //! Set of list-tree-items.
104 TRef fSource; // External object that is represented by this element.
105 void *fUserData; //! Externally assigned and controlled user data.
107 virtual void PreDeleteElement();
108 virtual void RemoveElementsInternal();
109 virtual void AnnihilateRecursively();
111 static const char* ToString(Bool_t b);
114 TEveElement();
115 TEveElement(Color_t& main_color);
116 TEveElement(const TEveElement& e);
117 virtual ~TEveElement();
119 virtual TEveElement* CloneElement() const;
120 virtual TEveElement* CloneElementRecurse(Int_t level=0) const;
121 virtual void CloneChildrenRecurse(TEveElement* dest, Int_t level=0) const;
123 virtual const char* GetElementName() const;
124 virtual const char* GetElementTitle() const;
126 virtual void SetElementName (const char* name);
127 virtual void SetElementTitle(const char* title);
128 virtual void SetElementNameTitle(const char* name, const char* title);
129 virtual void NameTitleChanged();
131 const TString& GetVizTag() const { return fVizTag; }
132 void SetVizTag(const TString& tag) { fVizTag = tag; }
134 TEveElement* GetVizModel() const { return fVizModel; }
135 void SetVizModel(TEveElement* model);
138 Bool_t ApplyVizTag(const TString& tag, const TString& fallback_tag="");
140 virtual void PropagateVizParamsToProjecteds();
141 virtual void PropagateVizParamsToElements(TEveElement* el=nullptr);
142 virtual void CopyVizParams(const TEveElement* el);
143 virtual void CopyVizParamsFromDB();
144 void SaveVizParams (std::ostream& out, const TString& tag, const TString& var);
145 virtual void WriteVizParams(std::ostream& out, const TString& var);
151 virtual void AddParent(TEveElement* re);
152 virtual void RemoveParent(TEveElement* re);
153 virtual void CheckReferenceCount(const TEveException& eh="TEveElement::CheckReferenceCount ");
154 virtual void CollectSceneParents(List_t& scenes);
155 virtual void CollectSceneParentsFromChildren(List_t& scenes,
156 TEveElement* parent);
158 List_i BeginParents() { return fParents.begin(); }
159 List_i EndParents() { return fParents.end(); }
160 List_ci BeginParents() const { return fParents.begin(); }
161 List_ci EndParents() const { return fParents.end(); }
162 Int_t NumParents() const { return fParents.size(); }
163 Bool_t HasParents() const { return !fParents.empty(); }
165 const List_t& RefChildren() const { return fChildren; }
166 List_i BeginChildren() { return fChildren.begin(); }
167 List_i EndChildren() { return fChildren.end(); }
168 List_ci BeginChildren() const { return fChildren.begin(); }
169 List_ci EndChildren() const { return fChildren.end(); }
170 Int_t NumChildren() const { return fNumChildren; }
171 Bool_t HasChildren() const { return fNumChildren != 0; }
174 TEveElement* FindChild(const TString& name, const TClass* cls=nullptr);
175 TEveElement* FindChild(TPRegexp& regexp, const TClass* cls=nullptr);
176 Int_t FindChildren(List_t& matches, const TString& name, const TClass* cls=nullptr);
177 Int_t FindChildren(List_t& matches, TPRegexp& regexp, const TClass* cls=nullptr);
178 TEveElement* FirstChild() const;
179 TEveElement* LastChild () const;
181 void EnableListElements (Bool_t rnr_self=kTRUE, Bool_t rnr_children=kTRUE); // *MENU*
182 void DisableListElements(Bool_t rnr_self=kFALSE, Bool_t rnr_children=kFALSE); // *MENU*
187 Int_t GetDenyDestroy() const;
188 void IncDenyDestroy();
189 void DecDenyDestroy();
192 void IncParentIgnoreCnt();
193 void DecParentIgnoreCnt();
195 virtual void PadPaint(Option_t* option);
196 virtual void PaintStandard(TObject* id);
198 virtual TObject* GetObject (const TEveException& eh) const;
199 virtual TObject* GetEditorObject(const TEveException& eh) const { return GetObject(eh); }
200 virtual TObject* GetRenderObject(const TEveException& eh) const { return GetObject(eh); }
202 // --------------------------------
204 virtual void ExpandIntoListTree(TGListTree* ltree, TGListTreeItem* parent);
205 virtual void DestroyListSubTree(TGListTree* ltree, TGListTreeItem* parent);
208 TGListTreeItem* parent_lti);
210 TEveElement* parent);
213 virtual Bool_t RemoveFromListTree(TGListTree* ltree,
214 TGListTreeItem* parent_lti);
215 virtual Int_t RemoveFromListTrees(TEveElement* parent);
217 virtual sLTI_i FindItem(TGListTree* ltree);
218 virtual sLTI_i FindItem(TGListTree* ltree,
219 TGListTreeItem* parent_lti);
222 TGListTreeItem* parent_lti);
224 virtual Int_t GetNItems() const { return fItems.size(); }
226 void SpawnEditor(); // *MENU*
227 virtual void ExportToCINT(char* var_name); // *MENU*
229 void DumpSourceObject() const; // *MENU*
230 void PrintSourceObject() const; // *MENU*
231 void ExportSourceObjectToCINT(char* var_name) const; // *MENU*
233 virtual Bool_t AcceptElement(TEveElement* el);
235 virtual void AddElement(TEveElement* el);
236 virtual void RemoveElement(TEveElement* el);
237 virtual void RemoveElementLocal(TEveElement* el);
238 virtual void RemoveElements();
239 virtual void RemoveElementsLocal();
241 virtual void AnnihilateElements();
242 virtual void Annihilate();
244 virtual void ProjectChild(TEveElement* el, Bool_t same_depth=kTRUE);
245 virtual void ProjectAllChildren(Bool_t same_depth=kTRUE);
247 virtual void Destroy(); // *MENU*
248 virtual void DestroyOrWarn();
249 virtual void DestroyElements(); // *MENU*
252 virtual void ElementChanged(Bool_t update_scenes=kTRUE, Bool_t redraw=kFALSE);
254 virtual Bool_t CanEditElement() const { return kTRUE; }
255 virtual Bool_t SingleRnrState() const { return kFALSE; }
256 virtual Bool_t GetRnrSelf() const { return fRnrSelf; }
257 virtual Bool_t GetRnrChildren() const { return fRnrChildren; }
258 virtual Bool_t GetRnrState() const { return fRnrSelf && fRnrChildren; }
259 virtual Bool_t GetRnrAnything() const { return fRnrSelf || (fRnrChildren && HasChildren()); }
260 virtual Bool_t SetRnrSelf(Bool_t rnr);
261 virtual Bool_t SetRnrChildren(Bool_t rnr);
262 virtual Bool_t SetRnrSelfChildren(Bool_t rnr_self, Bool_t rnr_children);
263 virtual Bool_t SetRnrState(Bool_t rnr);
264 virtual void PropagateRnrStateToProjecteds();
266 virtual Bool_t CanEditMainColor() const { return fCanEditMainColor; }
269 void SetMainColorPtr(Color_t* color) { fMainColorPtr = color; }
271 virtual Bool_t HasMainColor() const { return fMainColorPtr != nullptr; }
272 virtual Color_t GetMainColor() const { return fMainColorPtr ? *fMainColorPtr : 0; }
273 virtual void SetMainColor(Color_t color);
277 virtual void PropagateMainColorToProjecteds(Color_t color, Color_t old_color);
281 virtual Char_t GetMainTransparency() const { return fMainTransparency; }
282 virtual void SetMainTransparency(Char_t t);
283 void SetMainAlpha(Float_t alpha);
286 virtual Bool_t CanEditMainTrans() const { return fCanEditMainTrans; }
287 virtual Bool_t HasMainTrans() const { return fMainTrans != nullptr; }
288 virtual TEveTrans* PtrMainTrans(Bool_t create=kTRUE);
289 virtual TEveTrans& RefMainTrans();
290 virtual void InitMainTrans(Bool_t can_edit=kTRUE);
291 virtual void DestroyMainTrans();
293 virtual void SetTransMatrix(Double_t* carr);
294 virtual void SetTransMatrix(const TGeoMatrix& mat);
296 TRef& GetSource() { return fSource; }
299 /*
300 void DumpSourceObject(); // *MENU*
301 void InspectSourceObject(); // *MENU*
302 */
304 void* GetUserData() const { return fUserData; }
305 void SetUserData(void* ud) { fUserData = ud; }
308 // Selection state and management
309 //--------------------------------
319 {
320 kCSCBImplySelectAllChildren = BIT(0), // compound will select all children
321 kCSCBTakeAnyParentAsMaster = BIT(1), // element will take any compound parent as master
322 kCSCBApplyMainColorToAllChildren = BIT(2), // compound will apply color change to all children
323 kCSCBApplyMainColorToMatchingChildren = BIT(3), // compound will apply color change to all children with matching color
324 kCSCBApplyMainTransparencyToAllChildren = BIT(4), // compound will apply transparency change to all children
325 kCSCBApplyMainTransparencyToMatchingChildren = BIT(5) // compound will apply transparency change to all children with matching color
326 };
329 {
333 };
341 Bool_t IsPickable() const { return fPickable; }
345 virtual TEveElement* ForwardSelection();
346 virtual TEveElement* ForwardEdit();
348 virtual void SelectElement(Bool_t state);
349 virtual void IncImpliedSelected();
350 virtual void DecImpliedSelected();
351 virtual void UnSelected();
353 virtual void HighlightElement(Bool_t state);
354 virtual void IncImpliedHighlighted();
355 virtual void DecImpliedHighlighted();
356 virtual void UnHighlighted();
358 virtual void FillImpliedSelectedSet(Set_t& impSelSet);
360 virtual UChar_t GetSelectedLevel() const;
366 Bool_t TestCSCBits(UChar_t f) const { return (fCSCBits & f) != 0; }
368 void ResetAllCSCBits() { fCSCBits = 0; }
377 // Change-stamping and change bits
378 //---------------------------------
381 {
382 kCBColorSelection = BIT(0), // Main color or select/hilite state changed.
383 kCBTransBBox = BIT(1), // Transformation matrix or bounding-box changed.
384 kCBObjProps = BIT(2), // Object changed, requires dropping its display-lists.
385 kCBVisibility = BIT(3) // Rendering of self/children changed.
386 // kCBElementAdded = BIT(), // Element was added to a new parent.
387 // kCBElementRemoved = BIT() // Element was removed from a parent.
389 // Deletions are handled in a special way in TEveManager::PreDeleteElement().
390 };
401 // void StampElementAdded() { AddStamp(kCBElementAdded); }
402 // void StampElementRemoved() { AddStamp(kCBElementRemoved); }
403 virtual void AddStamp(UChar_t bits);
404 virtual void ClearStamps() { fChangeBits = 0; }
409 // List-tree icons
410 //-----------------
413 virtual const TGPicture* GetListTreeCheckBoxIcon();
415 // Menu entries for VizDB communication (here so they are last in the menu).
417 void VizDB_Apply(const char* tag); // *MENU*
418 void VizDB_Reapply(); // *MENU*
419 void VizDB_UpdateModel(Bool_t update=kTRUE); // *MENU*
420 void VizDB_Insert(const char* tag, Bool_t replace=kTRUE, Bool_t update=kTRUE); // *MENU*
422 ClassDef(TEveElement, 0); // Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and list-tree item management.
427// TEveElementList
431 public TNamed,
432 public TEveProjectable
435 TEveElementList& operator=(const TEveElementList&); // Not implemented
438 Color_t fColor; // Color of the object.
439 TClass *fChildClass; // Class of acceptable children, others are rejected.
442 TEveElementList(const char* n="TEveElementList", const char* t="",
443 Bool_t doColor=kFALSE, Bool_t doTransparency=kFALSE);
445 virtual ~TEveElementList() {}
447 virtual TObject* GetObject(const TEveException& /*eh*/="TEveElementList::GetObject ") const
448 { const TObject* obj = this; return const_cast<TObject*>(obj); }
450 virtual TEveElementList* CloneElement() const;
452 virtual const char* GetElementName() const { return GetName(); }
453 virtual const char* GetElementTitle() const { return GetTitle(); }
455 virtual void SetElementName (const char* name)
458 virtual void SetElementTitle(const char* title)
461 virtual void SetElementNameTitle(const char* name, const char* title)
464 TClass* GetChildClass() const { return fChildClass; }
467 virtual Bool_t AcceptElement(TEveElement* el);
469 virtual TClass* ProjectedClass(const TEveProjection* p) const;
471 ClassDef(TEveElementList, 0); // List of TEveElement objects with a possibility to limit the class of accepted elements.
476// TEveElementListProjected
480 public TEveProjected
490 virtual void UpdateProjection();
491 virtual TEveElement* GetProjectedAsElement() { return this; }
493 ClassDef(TEveElementListProjected, 0); // Projected TEveElementList.
ULong_t Pixel_t
Pixel value.
Definition: GuiTypes.h:40
#define d(i)
Definition: RSha256.hxx:102
#define f(i)
Definition: RSha256.hxx:104
#define c(i)
Definition: RSha256.hxx:101
#define e(i)
Definition: RSha256.hxx:103
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
bool Bool_t
Definition: RtypesCore.h:63
int Int_t
Definition: RtypesCore.h:45
short Color_t
Definition: RtypesCore.h:92
unsigned char UChar_t
Definition: RtypesCore.h:38
char Char_t
Definition: RtypesCore.h:37
const Bool_t kFALSE
Definition: RtypesCore.h:101
float Float_t
Definition: RtypesCore.h:57
short Short_t
Definition: RtypesCore.h:39
double Double_t
Definition: RtypesCore.h:59
const Bool_t kTRUE
Definition: RtypesCore.h:100
const char Option_t
Definition: RtypesCore.h:66
#define ClassDef(name, id)
Definition: Rtypes.h:335
#define BIT(n)
Definition: Rtypes.h:85
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t dest
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void pixel
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t b
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t g
char name[80]
Definition: TGX11.cxx:110
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:81
Description of TEveCompound.
Definition: TEveCompound.h:24
A projected element list – required for proper propagation of render state to projected views.
Definition: TEveElement.h:481
TEveElementListProjected(const TEveElementListProjected &)
virtual ~TEveElementListProjected()
Definition: TEveElement.h:488
virtual void UpdateProjection()
This is abstract method from base-class TEveProjected.
virtual TEveElement * GetProjectedAsElement()
Returns this projected dynamic-casted to TEveElement.
Definition: TEveElement.h:491
TEveElementListProjected & operator=(const TEveElementListProjected &)
A list of TEveElements.
Definition: TEveElement.h:433
TEveElementList(const char *n="TEveElementList", const char *t="", Bool_t doColor=kFALSE, Bool_t doTransparency=kFALSE)
TEveElementList & operator=(const TEveElementList &)
virtual Bool_t AcceptElement(TEveElement *el)
Check if TEveElement el is inherited from fChildClass.
TClass * GetChildClass() const
Definition: TEveElement.h:464
virtual TObject * GetObject(const TEveException &="TEveElementList::GetObject ") const
Get a TObject associated with this render-element.
Definition: TEveElement.h:447
virtual void SetElementTitle(const char *title)
Virtual function for setting of title of an element.
Definition: TEveElement.h:458
virtual const char * GetElementTitle() const
Virtual function for retrieving title of the render-element.
Definition: TEveElement.h:453
virtual TEveElementList * CloneElement() const
Clone the element via copy constructor.
void SetChildClass(TClass *c)
Definition: TEveElement.h:465
virtual const char * GetElementName() const
Virtual function for retrieving name of the element.
Definition: TEveElement.h:452
TClass * fChildClass
Definition: TEveElement.h:439
virtual TClass * ProjectedClass(const TEveProjection *p) const
Virtual from TEveProjectable, returns TEveCompoundProjected class.
virtual void SetElementNameTitle(const char *name, const char *title)
Virtual function for setting of name and title of render element.
Definition: TEveElement.h:461
virtual ~TEveElementList()
Definition: TEveElement.h:445
virtual void SetElementName(const char *name)
Virtual function for setting of name of an element.
Definition: TEveElement.h:455
Structure holding information about TGListTree and TGListTreeItem that represents given TEveElement.
Definition: TEveElement.h:43
bool operator==(const TEveListTreeInfo &x) const
Definition: TEveElement.h:56
TEveListTreeInfo & operator=(const TEveListTreeInfo &l)
Definition: TEveElement.h:53
bool operator<(const TEveListTreeInfo &x) const
Definition: TEveElement.h:58
TEveListTreeInfo(TGListTree *lt, TGListTreeItem *lti)
Definition: TEveElement.h:49
TEveListTreeInfo(const TEveListTreeInfo &l)
Definition: TEveElement.h:50
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:36
virtual void AnnihilateRecursively()
Protected member function called from TEveElement::Annihilate().
virtual void ExportToCINT(char *var_name)
Export render-element to CINT with variable name var_name.
virtual void AddStamp(UChar_t bits)
Add (bitwise or) given stamps to fChangeBits.
virtual TEveTrans * PtrMainTrans(Bool_t create=kTRUE)
Return pointer to main transformation.
virtual Bool_t SingleRnrState() const
Definition: TEveElement.h:255
void SaveVizParams(std::ostream &out, const TString &tag, const TString &var)
Save visualization parameters for this element with given tag.
void SetSourceObject(TObject *o)
Definition: TEveElement.h:298
virtual void SelectElement(Bool_t state)
Set element's selection state. Stamp appropriately.
virtual void InitMainTrans(Bool_t can_edit=kTRUE)
Initialize the main transformation to identity matrix.
virtual void AddElement(TEveElement *el)
Add el to the list of children.
virtual TObject * GetEditorObject(const TEveException &eh) const
Definition: TEveElement.h:199
void SetMainColorPixel(Pixel_t pixel)
Convert pixel to Color_t and call SetMainColor().
virtual Bool_t SetRnrSelfChildren(Bool_t rnr_self, Bool_t rnr_children)
Set state for rendering of this element and its children.
virtual void FillImpliedSelectedSet(Set_t &impSelSet)
Populate set impSelSet with derived / dependant elements.
void DumpSourceObject() const
Call Dump() on source object.
Bool_t TestCSCBits(UChar_t f) const
Definition: TEveElement.h:366
List_i BeginParents()
Definition: TEveElement.h:158
Char_t fDestructing
Definition: TEveElement.h:394
virtual void CloneChildrenRecurse(TEveElement *dest, Int_t level=0) const
Clone children and attach them to the dest element.
Int_t fNumChildren
Definition: TEveElement.h:86
void SetEditMainColor(Bool_t x)
Definition: TEveElement.h:267
virtual void ProjectAllChildren(Bool_t same_depth=kTRUE)
If this is a projectable, loop over all projected replicas and add the projected image of all childre...
virtual void SetElementNameTitle(const char *name, const char *title)
Virtual function for setting of name and title of render element.
virtual TEveElement * ForwardSelection()
Returns element to be selected on click.
virtual TGListTreeItem * AddIntoListTrees(TEveElement *parent)
Add this render element into all list-trees and all items belonging to parent.
virtual void SetMainTransparency(Char_t t)
Set main-transparency.
virtual void PropagateVizParamsToElements(TEveElement *el=nullptr)
Propagate visualization parameters from element el (defaulting to this) to all elements (children).
Bool_t fRnrChildren
Definition: TEveElement.h:93
List_ci BeginParents() const
Definition: TEveElement.h:160
void StampObjProps()
Definition: TEveElement.h:399
List_t fChildren
Definition: TEveElement.h:81
Bool_t fDestroyOnZeroRefCnt
Deny-destroy count.
Definition: TEveElement.h:90
TEveElement * GetVizModel() const
Definition: TEveElement.h:134
void StampColorSelection()
Definition: TEveElement.h:397
void SpawnEditor()
Show GUI editor for this object.
static const TGPicture * fgRnrIcons[4]
Definition: TEveElement.h:64
virtual UChar_t GetSelectedLevel() const
Get selection level, needed for rendering selection and highlight feedback.
virtual TString GetHighlightTooltip()
Definition: TEveElement.h:125
virtual Bool_t CanEditMainTransparency() const
Definition: TEveElement.h:279
virtual sLTI_i FindItem(TGListTree *ltree)
Find any list-tree-item of this element in list-tree 'ltree'.
virtual void HighlightElement(Bool_t state)
Set element's highlight state. Stamp appropriately.
virtual void NameTitleChanged()
Virtual function called when a name or title of the element has been changed.
virtual void DestroyMainTrans()
Destroy the main transformation matrix, it will always be taken as identity.
virtual void DestroyListSubTree(TGListTree *ltree, TGListTreeItem *parent)
Destroy sub-tree under item 'parent' in list-tree 'ltree'.
Bool_t fHighlighted
Definition: TEveElement.h:314
Int_t fParentIgnoreCnt
Definition: TEveElement.h:87
Char_t fMainTransparency
Definition: TEveElement.h:98
UChar_t fCSCBits
Definition: TEveElement.h:335
void VizDB_UpdateModel(Bool_t update=kTRUE)
Copy visual parameters from this element to viz-db model.
virtual void ProjectChild(TEveElement *el, Bool_t same_depth=kTRUE)
If this is a projectable, loop over all projected replicas and add the projected image of child 'el' ...
UChar_t fChangeBits
Definition: TEveElement.h:393
sLTI_t fItems
Definition: TEveElement.h:102
void SetCSCBits(UChar_t f)
Definition: TEveElement.h:364
void SetEditMainTransparency(Bool_t x)
Definition: TEveElement.h:280
void VizDB_Insert(const char *tag, Bool_t replace=kTRUE, Bool_t update=kTRUE)
Create a replica of element and insert it into VizDB with given tag.
void * fUserData
Definition: TEveElement.h:105
virtual void CheckReferenceCount(const TEveException &eh="TEveElement::CheckReferenceCount ")
Check external references to this and eventually auto-destruct the render-element.
TEveElement * FirstChild() const
Returns the first child element or 0 if the list is empty.
void DecDenyDestroy()
Decreases the deny-destroy count of the element.
Bool_t fRnrSelf
Definition: TEveElement.h:92
Bool_t GetDestroyOnZeroRefCnt() const
Returns state of flag determining if the element will be destroyed when reference count reaches zero.
virtual TEveTrans & RefMainTrans()
Return reference to main transformation.
std::set< TEveListTreeInfo > sLTI_t
Definition: TEveElement.h:67
void VizDB_Reapply()
Reset visual parameters for this object from VizDB.
void CSCApplyMainTransparencyToMatchingChildren()
Definition: TEveElement.h:374
virtual Int_t GetNItems() const
Definition: TEveElement.h:224
Bool_t IsPickable() const
Definition: TEveElement.h:341
virtual void RemoveElements()
Remove all elements.
Set_t::iterator Set_i
Definition: TEveElement.h:76
Int_t NumParents() const
Definition: TEveElement.h:162
void PrintSourceObject() const
Call Print() on source object.
void CSCTakeAnyParentAsMaster()
Definition: TEveElement.h:370
void ExportSourceObjectToCINT(char *var_name) const
Export source object to CINT with given name for the variable.
Color_t * GetMainColorPtr() const
Definition: TEveElement.h:268
void StampTransBBox()
Definition: TEveElement.h:398
TEveTrans * fMainTrans
Definition: TEveElement.h:100
Set_t::const_iterator Set_ci
Definition: TEveElement.h:77
Bool_t fCanEditMainTransparency
Definition: TEveElement.h:95
virtual void RemoveParent(TEveElement *re)
Remove re from the list of parents.
virtual TEveElement * CloneElement() const
Clone the element via copy constructor.
List_i EndChildren()
Definition: TEveElement.h:167
virtual Bool_t CanEditElement() const
Definition: TEveElement.h:254
virtual void IncImpliedHighlighted()
Increase element's implied-highlight count. Stamp appropriately.
Bool_t HasChildren() const
Definition: TEveElement.h:171
List_t fParents
Definition: TEveElement.h:80
Short_t fImpliedHighlighted
Definition: TEveElement.h:316
Bool_t ApplyVizTag(const TString &tag, const TString &fallback_tag="")
Set the VizTag, find model-element from the VizDB and copy visualization-parameters from it.
virtual void ExpandIntoListTree(TGListTree *ltree, TGListTreeItem *parent)
Populates parent with elements.
virtual void PropagateVizParamsToProjecteds()
Propagate visualization parameters to dependent elements.
virtual TGListTreeItem * FindListTreeItem(TGListTree *ltree)
Find any list-tree-item of this element in list-tree 'ltree'.
virtual Bool_t CanEditMainColor() const
Definition: TEveElement.h:266
virtual void CollectSceneParents(List_t &scenes)
Collect all parents of class TEveScene.
std::list< TEveElement * > List_t
Definition: TEveElement.h:71
virtual void SetMainColor(Color_t color)
Set main color of the element.
void * GetUserData() const
Definition: TEveElement.h:304
void IncDenyDestroy()
Increases the deny-destroy count of the element.
virtual Bool_t CanEditMainTrans() const
Definition: TEveElement.h:286
void SetUserData(void *ud)
Definition: TEveElement.h:305
TEveElement * GetMaster()
Returns the master element - that is:
Int_t NumChildren() const
Definition: TEveElement.h:170
Definition: TEveElement.h:319
@ kCSCBApplyMainTransparencyToAllChildren
Definition: TEveElement.h:324
@ kCSCBApplyMainColorToAllChildren
Definition: TEveElement.h:322
@ kCSCBImplySelectAllChildren
Definition: TEveElement.h:320
@ kCSCBApplyMainColorToMatchingChildren
Definition: TEveElement.h:323
@ kCSCBTakeAnyParentAsMaster
Definition: TEveElement.h:321
@ kCSCBApplyMainTransparencyToMatchingChildren
Definition: TEveElement.h:325
virtual const char * GetElementTitle() const
Virtual function for retrieving title of the render-element.
List_ci EndChildren() const
Definition: TEveElement.h:169
virtual TEveElement * CloneElementRecurse(Int_t level=0) const
Clone elements and recurse 'level' deep over children.
virtual void SetElementTitle(const char *title)
Virtual function for setting of title of an element.
void DecParentIgnoreCnt()
Decrease number of parents ignored in reference-counting.
virtual void DecImpliedHighlighted()
Decrease element's implied-highlight count. Stamp appropriately.
virtual Int_t RemoveFromListTrees(TEveElement *parent)
Remove element from all list-trees where 'parent' is the user-data of the parent list-tree-item.
virtual Bool_t SetRnrChildren(Bool_t rnr)
Set render state of this element's children, i.e.
void SetMainColorRGB(UChar_t r, UChar_t g, UChar_t b)
Convert RGB values to Color_t and call SetMainColor.
Bool_t FindVizModel()
Find model element in VizDB that corresponds to previously assigned fVizTag and set fVizModel accordi...
TEveElement * FindChild(const TString &name, const TClass *cls=nullptr)
Find the first child with given name.
Color_t * fMainColorPtr
Definition: TEveElement.h:99
virtual ~TEveElement()
virtual Bool_t GetRnrState() const
Definition: TEveElement.h:258
TEveCompound * GetCompound()
Definition: TEveElement.h:148
void SetPickableRecursively(Bool_t p)
Set pickable state on the element and all its children.
List_i EndParents()
Definition: TEveElement.h:159
virtual void RemoveElementsInternal()
Remove all elements.
Bool_t fSelected
Definition: TEveElement.h:313
Short_t fImpliedSelected
Definition: TEveElement.h:315
void DisableListElements(Bool_t rnr_self=kFALSE, Bool_t rnr_children=kFALSE)
Disable rendering of children and their list contents.
void VizDB_Apply(const char *tag)
Set visual parameters for this object for given tag.
Bool_t HasParents() const
Definition: TEveElement.h:163
virtual void Destroy()
Destroy this element.
void CSCImplySelectAllChildren()
Definition: TEveElement.h:369
virtual void PreDeleteElement()
Externally assigned and controlled user data.
virtual void SetElementName(const char *name)
Virtual function for setting of name of an element.
Int_t GetDenyDestroy() const
Returns the number of times deny-destroy has been requested on the element.
void RecheckImpliedSelections()
Call this if it is possible that implied-selection or highlight has changed for this element or for i...
const List_t & RefChildren() const
Definition: TEveElement.h:165
virtual void DestroyElements()
Destroy all children of this element.
TString fVizTag
Element used as model from VizDB.
Definition: TEveElement.h:84
std::set< TEveElement * > Set_t
Definition: TEveElement.h:75
void SetCompound(TEveCompound *c)
Definition: TEveElement.h:149
void StampVisibility()
Definition: TEveElement.h:400
void SetVizTag(const TString &tag)
Definition: TEveElement.h:132
virtual void PropagateMainColorToProjecteds(Color_t color, Color_t old_color)
Propagate color to projected elements.
virtual void UnHighlighted()
Virtual function called when both fHighlighted is false and fImpliedHighlighted is 0.
void SetMainAlpha(Float_t alpha)
Set main-transparency via float alpha variable.
List_ci EndParents() const
Definition: TEveElement.h:161
virtual Color_t GetMainColor() const
Definition: TEveElement.h:272
virtual void SetTransMatrix(Double_t *carr)
Set transformation matrix from column-major array.
virtual Bool_t HasMainColor() const
Definition: TEveElement.h:271
void SetMainColorPtr(Color_t *color)
Definition: TEveElement.h:269
TEveElement * fVizModel
Definition: TEveElement.h:83
Int_t fTopItemCnt
Counter for parents that are ignored in ref-counting.
Definition: TEveElement.h:88
virtual TObject * GetRenderObject(const TEveException &eh) const
Definition: TEveElement.h:200
virtual Bool_t SetRnrState(Bool_t rnr)
Set render state of this element and of its children to the same value.
const TString & GetVizTag() const
Definition: TEveElement.h:131
virtual void ElementChanged(Bool_t update_scenes=kTRUE, Bool_t redraw=kFALSE)
Call this after an element has been changed so that the state can be propagated around the framework.
List_t::const_iterator List_ci
Definition: TEveElement.h:73
virtual TGListTreeItem * AddIntoListTree(TGListTree *ltree, TGListTreeItem *parent_lti)
Add this element into ltree to an already existing item parent_lti.
virtual void Annihilate()
Optimized destruction without check of reference-count.
void ResetCSCBits(UChar_t f)
Definition: TEveElement.h:365
TObject * GetSourceObject() const
Definition: TEveElement.h:297
void SetVizModel(TEveElement *model)
Set visualization-parameter model element.
void(TEveElement::* ImplySelect_foo)()
Definition: TEveElement.h:339
virtual void RemoveElement(TEveElement *el)
Remove el from the list of children.
virtual Bool_t GetRnrChildren() const
Definition: TEveElement.h:257
virtual Bool_t HandleElementPaste(TEveElement *el)
React to element being pasted or dnd-ed.
void CSCApplyMainColorToMatchingChildren()
Definition: TEveElement.h:372
virtual void DecImpliedSelected()
Decrease element's implied-selection count. Stamp appropriately.
virtual void CollectSceneParentsFromChildren(List_t &scenes, TEveElement *parent)
Collect scene-parents from all children.
virtual const char * GetElementName() const
Virtual function for retrieving name of the element.
void(TEveElement::* Select_foo)(Bool_t)
Definition: TEveElement.h:338
Default constructor.
Definition: TEveElement.cxx:61
void CSCApplyMainColorToAllChildren()
Definition: TEveElement.h:371
Int_t GetParentIgnoreCnt() const
Get number of parents that should be ignored in doing reference-counting.
TEveElement & operator=(const TEveElement &)=delete
virtual Bool_t AcceptElement(TEveElement *el)
Check if el can be added to this element.
Bool_t HasChild(TEveElement *el)
Check if element el is a child of this element.
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
void SetPickable(Bool_t p)
Definition: TEveElement.h:342
static const char * ToString(Bool_t b)
Convert Bool_t to string - kTRUE or kFALSE.
virtual void PropagateRnrStateToProjecteds()
Propagate render state to the projected replicas of this element.
void ResetAllCSCBits()
Definition: TEveElement.h:368
virtual void PadPaint(Option_t *option)
Paint self and/or children into currently active pad.
Bool_t fCanEditMainColor
Definition: TEveElement.h:94
virtual void RemoveElementLocal(TEveElement *el)
Perform additional local removal of el.
virtual void PropagateMainTransparencyToProjecteds(Char_t t, Char_t old_t)
Propagate transparency to projected elements.
static const TGPicture * fgListTreeIcons[9]
Definition: TEveElement.h:65
TEveCompound * fCompound
Definition: TEveElement.h:82
virtual Char_t GetMainTransparency() const
Definition: TEveElement.h:281
virtual void DestroyOrWarn()
Destroy this element. Prints a warning if deny-destroy is in force.
TRef & GetSource()
Definition: TEveElement.h:296
virtual void IncImpliedSelected()
Increase element's implied-selection count. Stamp appropriately.
virtual void AnnihilateElements()
Annihilate elements.
virtual Bool_t GetRnrSelf() const
Definition: TEveElement.h:256
virtual void ClearStamps()
Definition: TEveElement.h:404
Int_t FindChildren(List_t &matches, const TString &name, const TClass *cls=nullptr)
Find all children with given name and append them to matches list.
virtual const TGPicture * GetListTreeCheckBoxIcon()
Returns list-tree-item check-box picture appropriate for given rendering state.
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write-out visual parameters for this object.
List_ci BeginChildren() const
Definition: TEveElement.h:168
virtual void CopyVizParamsFromDB()
Copy visualization parameters from the model-element fVizModel.
TRef fSource
Set of list-tree-items.
Definition: TEveElement.h:104
void SetDestroyOnZeroRefCnt(Bool_t d)
Sets the state of flag determining if the element will be destroyed when reference count reaches zero...
List_i BeginChildren()
Definition: TEveElement.h:166
sLTI_t::reverse_iterator sLTI_ri
Definition: TEveElement.h:69
List_t::iterator List_i
Definition: TEveElement.h:72
virtual TObject * GetObject(const TEveException &eh) const
Get a TObject associated with this render-element.
virtual const TGPicture * GetListTreeIcon(Bool_t open=kFALSE)
Returns pointer to first listtreeicon.
Int_t fDenyDestroy
Counter for top-level list-tree items that prevent automatic destruction.
Definition: TEveElement.h:89
virtual Bool_t RemoveFromListTree(TGListTree *ltree, TGListTreeItem *parent_lti)
Remove element from list-tree 'ltree' where its parent item is 'parent_lti'.
TEveElement * LastChild() const
Returns the last child element or 0 if the list is empty.
virtual void RemoveElementsLocal()
Perform additional local removal of all elements.
void IncParentIgnoreCnt()
Increase number of parents ignored in reference-counting.
virtual TEveElement * ForwardEdit()
Returns element to be displayed in GUI editor on click.
Bool_t fCanEditMainTrans
Definition: TEveElement.h:96
virtual void PaintStandard(TObject *id)
Paint object – a generic implementation for EVE elements.
virtual Bool_t SetRnrSelf(Bool_t rnr)
Set render state of this element, i.e.
void EnableListElements(Bool_t rnr_self=kTRUE, Bool_t rnr_children=kTRUE)
Enable rendering of children and their list contents.
Bool_t fPickable
Definition: TEveElement.h:312
sLTI_t::iterator sLTI_i
Definition: TEveElement.h:68
void CSCApplyMainTransparencyToAllChildren()
Definition: TEveElement.h:373
virtual void AddParent(TEveElement *re)
Add re into the list parents.
UChar_t GetChangeBits() const
Definition: TEveElement.h:406
virtual void UnSelected()
Virtual function called when both fSelected is false and fImpliedSelected is 0.
virtual Bool_t GetRnrAnything() const
Definition: TEveElement.h:259
virtual Bool_t HasMainTrans() const
Definition: TEveElement.h:287
Exception class thrown by TEve classes and macros.
Definition: TEveUtil.h:102
Central application manager for Eve.
Definition: TEveManager.h:50
Abstract base-class for non-linear projectable objects.
Abstract base class for classes that hold results of a non-linear projection transformation.
Base-class for non-linear projections.
TEveTrans is a 4x4 transformation matrix for homogeneous coordinates stored internally in a column-ma...
Definition: TEveTrans.h:27
A list tree is a widget that can contain a number of items arranged in a tree structure.
Definition: TGListTree.h:195
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Definition: TGPicture.h:25
Geometrical transformation package.
Definition: TGeoMatrix.h:41
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition: TNamed.cxx:164
const char * GetName() const override
Returns name of object.
Definition: TNamed.h:47
const char * GetTitle() const override
Returns title of object.
Definition: TNamed.h:48
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition: TNamed.cxx:140
virtual void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
Definition: TNamed.cxx:154
Mother of all ROOT objects.
Definition: TObject.h:41
Persistent Reference link to a TObject A TRef is a lightweight object pointing to any TObject.
Definition: TRef.h:32
TObject * GetObject() const
Return a pointer to the referenced object.
Definition: TRef.cxx:377
Basic string class.
Definition: TString.h:136
Double_t x[n]
Definition: legend1.C:17
const Int_t n
Definition: legend1.C:16
void(off) SmallVectorTemplateBase< T
TLine l
Definition: textangle.C:4