class TEveElement


 Base class for TEveUtil visualization elements, providing hierarchy
 management, rendering control and list-tree item management.

Function Members (Methods)

public:
TEveElement()
TEveElement(Color_t& main_color)
virtual~TEveElement()
virtual Bool_tAcceptElement(TEveElement* el)
virtual voidAddElement(TEveElement* el)
virtual TGListTreeItem*AddIntoListTree(TGListTree* ltree, TGListTreeItem* parent_lti)
virtual TGListTreeItem*AddIntoListTree(TGListTree* ltree, TEveElement* parent)
virtual TGListTreeItem*AddIntoListTrees(TEveElement* parent)
virtual voidAddParent(TEveElement* re)
voidAddStamp(UChar_t bits)
TEveElement::List_iBeginChildren()
TEveElement::List_iBeginParents()
virtual Bool_tCanEditElement() const
virtual Bool_tCanEditMainColor() const
virtual Bool_tCanEditMainTrans() const
virtual Bool_tCanEditMainTransparency() const
virtual voidCheckReferenceCount(const TEveException& eh = "TEveElement::CheckReferenceCount ")
static TClass*Class()
voidClearStamps()
virtual voidCollectSceneParents(TEveElement::List_t& scenes)
virtual voidCollectSceneParentsFromChildren(TEveElement::List_t& scenes, TEveElement* parent)
voidDecDenyDestroy()
voidDecImpliedHighlighted()
voidDecImpliedSelected()
virtual voidDestroy()MENU
virtual voidDestroyElements()MENU
virtual voidDestroyListSubTree(TGListTree* ltree, TGListTreeItem* parent)
virtual voidDestroyMainTrans()
voidDisableListElements(Bool_t rnr_self = kFALSE, Bool_t rnr_children = kFALSE)MENU
virtual voidElementChanged(Bool_t update_scenes = kTRUE, Bool_t redraw = kFALSE)
voidEnableListElements(Bool_t rnr_self = kTRUE, Bool_t rnr_children = kTRUE)MENU
TEveElement::List_iEndChildren()
TEveElement::List_iEndParents()
virtual voidExpandIntoListTree(TGListTree* ltree, TGListTreeItem* parent)
virtual voidExportToCINT(Text_t* var_name)MENU
virtual voidFillImpliedSelectedSet(TEveElement::Set_t& impSelSet)
TEveElement*FindChild(const TString& name, const TClass* cls = 0)
TEveElement*FindChild(TPRegexp& regexp, const TClass* cls = 0)
Int_tFindChildren(TEveElement::List_t& matches, const TString& name, const TClass* cls = 0)
Int_tFindChildren(TEveElement::List_t& matches, TPRegexp& regexp, const TClass* cls = 0)
virtual TEveElement::sLTI_iFindItem(TGListTree* ltree)
virtual TEveElement::sLTI_iFindItem(TGListTree* ltree, TGListTreeItem* parent_lti)
virtual TGListTreeItem*FindListTreeItem(TGListTree* ltree)
virtual TGListTreeItem*FindListTreeItem(TGListTree* ltree, TGListTreeItem* parent_lti)
UChar_tGetChangeBits() const
Int_tGetDenyDestroy() const
Bool_tGetDestroyOnZeroRefCnt() const
virtual TObject*GetEditorObject(const TEveException& eh = "TEveElement::GetEditorObject ") const
virtual const Text_t*GetElementName() const
virtual const Text_t*GetElementTitle() const
virtual const TGPicture*GetListTreeCheckBoxIcon()
virtual const TGPicture*GetListTreeIcon(Bool_t open = kFALSE)
virtual Color_tGetMainColor() const
Color_t*GetMainColorPtr()
virtual UChar_tGetMainTransparency() const
Int_tGetNChildren() const
virtual Int_tGetNItems() const
Int_tGetNParents() const
virtual TObject*GetObject(const TEveException& eh = "TEveElement::GetObject ") const
virtual TObject*GetRenderObject(const TEveException& eh = "TEveElement::GetRenderObject ") const
virtual Bool_tGetRnrChildren() const
virtual Bool_tGetRnrSelf() const
virtual Bool_tGetRnrState() const
virtual UChar_tGetSelectedLevel() const
void*GetUserData() const
virtual Bool_tHandleElementPaste(TEveElement* el)
Bool_tHasChild(TEveElement* el)
virtual Bool_tHasMainColor() const
virtual Bool_tHasMainTrans() const
voidHighlightElement(Bool_t state)
voidIncDenyDestroy()
voidIncImpliedHighlighted()
voidIncImpliedSelected()
virtual voidInitMainTrans(Bool_t can_edit = kTRUE)
virtual TClass*IsA() const
Bool_tIsPickable() const
virtual voidPadPaint(Option_t* option)
virtual TEveTrans*PtrMainTrans()
virtual TEveTrans&RefMainTrans()
virtual voidRemoveElement(TEveElement* el)
virtual voidRemoveElementLocal(TEveElement* el)
virtual voidRemoveElements()
virtual voidRemoveElementsLocal()
virtual Bool_tRemoveFromListTree(TGListTree* ltree, TGListTreeItem* parent_lti)
virtual Int_tRemoveFromListTrees(TEveElement* parent)
virtual voidRemoveParent(TEveElement* re)
voidSelectElement(Bool_t state)
voidSetDestroyOnZeroRefCnt(Bool_t d)
virtual voidSetElementName(const Text_t* name)
virtual voidSetElementNameTitle(const Text_t* name, const Text_t* title)
virtual voidSetElementTitle(const Text_t* title)
virtual voidSetMainColor(Color_t color)
voidSetMainColor(Pixel_t pixel)
voidSetMainColorPtr(Color_t* color)
virtual voidSetMainTransparency(UChar_t)
voidSetPickable(Bool_t p)
virtual voidSetRnrChildren(Bool_t rnr)
virtual voidSetRnrSelf(Bool_t rnr)
virtual voidSetRnrState(Bool_t rnr)
voidSetStamp(UChar_t bits)
virtual voidSetTransMatrix(Double_t* carr)
virtual voidSetTransMatrix(const TGeoMatrix& mat)
voidSetUserData(void* ud)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Bool_tSingleRnrState() const
voidSpawnEditor()MENU
voidStampColorSelection()
voidStampObjProps()
voidStampTransBBox()
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidUpdateItems()
protected:
virtual voidRemoveElementsInternal()
private:
TEveElement(const TEveElement&)
TEveElement&operator=(const TEveElement&)

Data Members

public:
enum EChangeBits { kCBColorSelection
kCBTransBBox
kCBObjProps
};
public:
static const TGPicture*fgListTreeIcons[8]
static const TGPicture*fgRnrIcons[4]
protected:
Bool_tfCanEditMainTransAllow editing of main transformation.
UChar_tfChangeBits
list<TEveElement*,allocator<TEveElement*> >fChildrenList of children.
Int_tfDenyDestroyDeny-destroy count.
Bool_tfDestroyOnZeroRefCntAuto-destruct when ref-count reaches zero.
Bool_tfDestructing
Bool_tfHighlighted!
Short_tfImpliedHighlighted!
Short_tfImpliedSelected!
set<TEveElement::TEveListTreeInfo,less<TEveElement::TEveListTreeInfo>,allocator<TEveElement::TEveListTreeInfo> >fItems! Set of list-tree-items.
Color_t*fMainColorPtrPointer to main-color variable.
TEveTrans*fMainTransPointer to main transformation matrix.
list<TEveElement*,allocator<TEveElement*> >fParentsList of parents.
Bool_tfPickable
Bool_tfRnrChildrenRender children of this element.
Bool_tfRnrSelfRender this element.
Bool_tfSelected!
void*fUserData! Externally assigned and controlled user data.

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TEveElement()
 Default contructor.
TEveElement(Color_t& main_color)
 Constructor.
~TEveElement()
 Destructor.
const Text_t* GetElementName()
 Virtual function for retrieveing name of the element.
 Here we attempt to cast the assigned object into TNamed and call
 GetName() there.
const Text_t* GetElementTitle()
 Virtual function for retrieveing title of the render-element.
 Here we attempt to cast the assigned object into TNamed and call
 GetTitle() there.
void SetElementName(const Text_t* name)
 Virtual function for setting of name of an element.
 Here we attempt to cast the assigned object into TNamed and call
 SetName() there.
void SetElementTitle(const Text_t* title)
 Virtual function for setting of title of an element.
 Here we attempt to cast the assigned object into TNamed and call
 SetTitle() there.
void SetElementNameTitle(const Text_t* name, const Text_t* title)
 Virtual function for setting of name and title of render element.
 Here we attempt to cast the assigned object into TNamed and call
 SetNameTitle() there.
void AddParent(TEveElement* re)
 Add re into the list parents.
 Adding parent is subordinate to adding an element.
 This is an internal function.
void RemoveParent(TEveElement* re)
 Remove re from the list of parents.
 Removing parent is subordinate to removing an element.
 This is an internal function.
void CheckReferenceCount(const TEveException& eh = "TEveElement::CheckReferenceCount ")
 Check external references to this and eventually auto-destruct
 the render-element.
void CollectSceneParents(TEveElement::List_t& scenes)
 Collect all parents of class TEveScene. This is needed to
 automatically detect which scenes need to be updated.

 Overriden in TEveScene to include itself and return.
void CollectSceneParentsFromChildren(TEveElement::List_t& scenes, TEveElement* parent)
 Collect scene-parents from all children. This is needed to
 automatically detect which scenes need to be updated during/after
 a full sub-tree update.
 Argument parent specifies parent in traversed hierarchy for which we can
 skip the upwards search.
void ExpandIntoListTree(TGListTree* ltree, TGListTreeItem* parent)
 Populates parent with elements.
 parent must be an already existing representation of *this*.
 Returns number of inserted elements.
 If parent already has children, it does nothing.

 Element can be inserted in a list-tree several times, thus we can not
 search through fItems to get parent here.
 Anyhow, it is probably known as it must have been selected by the user.
void DestroyListSubTree(TGListTree* ltree, TGListTreeItem* parent)
 Destroy sub-tree under item 'parent' in list-tree 'ltree'.
TGListTreeItem* AddIntoListTree(TGListTree* ltree, TGListTreeItem* parent_lti)
 Add this element into ltree to an already existing item
 parent_lti.
TGListTreeItem* AddIntoListTree(TGListTree* ltree, TEveElement* parent)
 Add this render element into ltree to all items belonging to
 parent. Returns list-tree-item from the first register entry (but
 we use a set for that so it can be anything).
TGListTreeItem* AddIntoListTrees(TEveElement* parent)
 Add this render element into all list-trees and all items
 belonging to parent. Returns list-tree-item from the first
 register entry (but we use a set for that so it can be anything).
Bool_t RemoveFromListTree(TGListTree* ltree, TGListTreeItem* parent_lti)
 Remove element from list-tree 'ltree' where its parent item is
 'parent_lti'.
 Returns kTRUE if the item was found and removed, kFALSE
 otherwise.
Int_t RemoveFromListTrees(TEveElement* parent)
 Remove element from all list-trees where 'parent' is the
 user-data of the list-tree-item.
TGListTreeItem* FindListTreeItem(TGListTree* ltree)
 Find any list-tree-item of this element in list-tree 'ltree'.
 Note that each element can be placed into the same list-tree on
 several postions.
TGListTreeItem* FindListTreeItem(TGListTree* ltree, TGListTreeItem* parent_lti)
 Find list-tree-item of this element with given parent
 list-tree-item.
void UpdateItems()
 Update list-tree-items representing this element.
TObject* GetObject(const TEveException& eh = "TEveElement::GetObject ") const
 Get a TObject associated with this render-element.
 Most cases uses double-inheritance from TEveElement and TObject
 so we just do a dynamic cast here.
 If some TEveElement descendant implements a different scheme,
 this virtual method should be overriden accordingly.
void SpawnEditor()
 Show GUI editor for this object.
 This is forwarded to TEveManager::EditElement().
void ExportToCINT(Text_t* var_name)
 Export render-element to CINT with variable name var_name.
void PadPaint(Option_t* option)
 Paint self and/or children into currently active pad.
void SetRnrSelf(Bool_t rnr)
 Set render state of this element, i.e. if it will be published
 on next scene update pass.
void SetRnrChildren(Bool_t rnr)
 Set render state of this element's children, i.e. if they will
 be published on next scene update pass.
void SetRnrState(Bool_t rnr)
 Set render state of this element and of its children to the same
 value.
void SetMainColor(Color_t color)
 Set main color of the element.
 List-tree-items are updated.
void SetMainColor(Pixel_t pixel)
 Convert pixel to Color_t and call the above function.
TEveTrans* PtrMainTrans()
 Return pointer to main transformation. It is created if not yet
 existing.
TEveTrans& RefMainTrans()
 Return reference to main transformation. It is created if not yet
 existing.
void InitMainTrans(Bool_t can_edit = kTRUE)
 Initialize the main transformation to identity matrix.
 If can_edit is true (default), the user will be able to edit the
 transformation parameters via TEveElementEditor.
void DestroyMainTrans()
 Destroy the main transformation matrix, it will always be taken
 as identity. Editing of transformation parameters is disabled.
void SetTransMatrix(Double_t* carr)
 Set transformation matrix from colum-major array.
void SetTransMatrix(const TGeoMatrix& mat)
 Set transformation matrix from TGeo's matrix.
Bool_t AcceptElement(TEveElement* el)
 Check if el can be added to this element.

 In the base-class version we only make sure the new child is not
 equal to this.
void AddElement(TEveElement* el)
 Add el to the list of children.
void RemoveElement(TEveElement* el)
 Remove el from the list of children.
void RemoveElementLocal(TEveElement* el)
 Perform additional local removal of el.
 Called from RemoveElement() which does whole untangling.
 Put into special function as framework-related handling of
 element removal should really be common to all classes and
 clearing of local structures happens in between removal
 of list-tree-items and final removal.
 If you override this, you should also override
 RemoveElementsLocal().
void RemoveElementsInternal()
 Remove all elements. This assumes removing of all elements can
 be done more efficiently then looping over them and removing one
 by one. This protected function performs the removal on the
 level of TEveElement.
void RemoveElements()
 Remove all elements. This assumes removing of all elements can
 be done more efficiently then looping over them and removing
 them one by one.
void RemoveElementsLocal()
 Perform additional local removal of all elements.
 See comment to RemoveelementLocal(TEveElement*).
Bool_t HasChild(TEveElement* el)
 Check if element el is a child of this element.
TEveElement* FindChild(const TString& name, const TClass* cls)
 Find the first child with given name.  If cls is specified (non
 0), it is also checked.

 Returns 0 if not found.
TEveElement* FindChild(TPRegexp& regexp, const TClass* cls)
 Find the first child whose name matches regexp. If cls is
 specified (non 0), it is also checked.

 Returns 0 if not found.
Int_t FindChildren(List_t& matches, const TString& name, const TClass* cls)
 Find all children with given name and append them to matches
 list. If class is specified (non 0), it is also checked.

 Returns number of elements added to the list.
Int_t FindChildren(List_t& matches, TPRegexp& regexp, const TClass* cls)
 Find all children whose name matches regexp and append them to
 matches list.

 Returns number of elements added to the list.
void EnableListElements(Bool_t rnr_self = kTRUE, Bool_t rnr_children = kTRUE)
 Enable rendering of children and their list contents.
 Arguments control how to set self/child rendering.
void DisableListElements(Bool_t rnr_self = kFALSE, Bool_t rnr_children = kFALSE)
 Disable rendering of children and their list contents.
 Arguments control how to set self/child rendering.

 Same as above function, but default arguments are different. This
 is convenient for calls via context menu.
void Destroy()
 Destroy this element.
void DestroyElements()
 Destroy all children of this element.
Bool_t HandleElementPaste(TEveElement* el)
 React to element being pasted or dnd-ed.
 Return true if redraw is needed.
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.
void SelectElement(Bool_t state)
 Set element's selection state. Stamp appropriately.
void IncImpliedSelected()
 Increase element's implied-selection count. Stamp appropriately.
void DecImpliedSelected()
 Decrease element's implied-selection count. Stamp appropriately.
void HighlightElement(Bool_t state)
 Set element's highlight state. Stamp appropriately.
void IncImpliedHighlighted()
 Increase element's implied-highlight count. Stamp appropriately.
void DecImpliedHighlighted()
 Decrease element's implied-highlight count. Stamp appropriately.
void FillImpliedSelectedSet(TEveElement::Set_t& impSelSet)
 Populate set impSelSet with derived / dependant elements.
UChar_t GetSelectedLevel()
 Get selection level, needed for rendering selection and
 highlight feedback.
 This should go to TAtt3D.
void SetStamp(UChar_t bits)
 Set fChangeBits to bits.
 Register this element to gEve as stamped.
void AddStamp(UChar_t bits)
 Add (bitwise or) given stamps to fChangeBits.
 Register this element to gEve as stamped.
const TGPicture* GetListTreeIcon(Bool_t open = kFALSE)
 Returns pointer to first listtreeicon
const TGPicture* GetListTreeCheckBoxIcon()
 Returns list-tree-item check-box picture appropriate for given
 rendering state.
TEveElement(const TEveElement&)
TEveElement& operator=(const TEveElement& )
List_i BeginParents()
{ return fParents.begin(); }
List_i EndParents()
{ return fParents.end(); }
Int_t GetNParents()
{ return fParents.size(); }
List_i BeginChildren()
{ return fChildren.begin(); }
List_i EndChildren()
{ return fChildren.end(); }
Int_t GetNChildren()
{ return fChildren.size(); }
Bool_t GetDestroyOnZeroRefCnt()
{ return fDestroyOnZeroRefCnt; }
void SetDestroyOnZeroRefCnt(Bool_t d)
{ fDestroyOnZeroRefCnt = d; }
Int_t GetDenyDestroy()
{ return fDenyDestroy; }
void IncDenyDestroy()
{ ++fDenyDestroy; }
void DecDenyDestroy()
{ if (--fDenyDestroy <= 0) CheckReferenceCount("TEveElement::DecDenyDestroy "); }
TObject* GetEditorObject(const TEveException& eh = "TEveElement::GetEditorObject ") const
{ return GetObject(eh); }
TObject* GetRenderObject(const TEveException& eh = "TEveElement::GetRenderObject ") const
{ return GetObject(eh); }
sLTI_i FindItem(TGListTree* ltree)
sLTI_i FindItem(TGListTree* ltree, TGListTreeItem* parent_lti)
Int_t GetNItems()
{ return fItems.size(); }
Bool_t CanEditElement()
{ return kTRUE; }
Bool_t SingleRnrState()
{ return kFALSE; }
Bool_t GetRnrSelf()
{ return fRnrSelf; }
Bool_t GetRnrChildren()
{ return fRnrChildren; }
Bool_t GetRnrState()
{ return fRnrSelf && fRnrChildren; }
Bool_t CanEditMainColor()
{ return kFALSE; }
Color_t* GetMainColorPtr()
{ return fMainColorPtr; }
void SetMainColorPtr(Color_t* color)
{ fMainColorPtr = color; }
Bool_t HasMainColor()
{ return fMainColorPtr != 0; }
Color_t GetMainColor()
{ return fMainColorPtr ? *fMainColorPtr : 0; }
Bool_t CanEditMainTransparency()
{ return kFALSE; }
UChar_t GetMainTransparency()
{ return 0; }
void SetMainTransparency(UChar_t )
{}
Bool_t CanEditMainTrans()
{ return fCanEditMainTrans; }
Bool_t HasMainTrans()
{ return fMainTrans != 0; }
void* GetUserData()
{ return fUserData; }
void SetUserData(void* ud)
{ fUserData = ud; }
Bool_t IsPickable()
{ return fPickable; }
void SetPickable(Bool_t p)
{ fPickable = p; }
void StampColorSelection()
{ AddStamp(kCBColorSelection); }
void StampTransBBox()
{ AddStamp(kCBTransBBox); }
void StampObjProps()
 void StampElementAdded()   { AddStamp(kCBElementAdded); }
 void StampElementRemoved() { AddStamp(kCBElementRemoved); }
{ AddStamp(kCBObjProps); }
void ClearStamps()
{ fChangeBits = 0; }
UChar_t GetChangeBits()
{ return fChangeBits; }

Last change: root/eve:$Id: TEveElement.h 22539 2008-03-08 14:36:37Z rdm $
Last generated: 2008-05-13 17:08
Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.