12 #ifndef ROOT_TEveElement
13 #define ROOT_TEveElement
65 typedef std::set<TEveListTreeInfo>
sLTI_t;
69 typedef std::list<TEveElement*>
List_t;
73 typedef std::set<TEveElement*>
Set_t;
75 typedef Set_t::const_iterator
Set_ci;
TEveTrans is a 4x4 transformation matrix for homogeneous coordinates stored internally in a column-ma...
Abstract base class for classes that hold results of a non-linear projection transformation.
virtual void SetElementName(const char *name)
Virtual function for setting of name of an element.
virtual const char * GetTitle() const
Returns title of object.
List_ci BeginParents() const
void DecDenyDestroy()
Decreases the deny-destroy count of the element.
virtual Bool_t GetRnrState() const
virtual void PadPaint(Option_t *option)
Paint self and/or children into currently active pad.
void SetVizModel(TEveElement *model)
Set visualization-parameter model element.
TRef fSource
Set of list-tree-items.
void DisableListElements(Bool_t rnr_self=kFALSE, Bool_t rnr_children=kFALSE)
Disable rendering of children and their list contents.
virtual void SelectElement(Bool_t state)
Set element's selection state. Stamp appropriately.
Int_t fDenyDestroy
Counter for top-level list-tree items that prevent automatic destruction.
virtual void AddParent(TEveElement *re)
Add re into the list parents.
virtual UChar_t GetSelectedLevel() const
Get selection level, needed for rendering selection and highlight feedback.
void(TEveElement::* ImplySelect_foo)()
virtual sLTI_i FindItem(TGListTree *ltree)
Find any list-tree-item of this element in list-tree 'ltree'.
static const TGPicture * fgRnrIcons[4]
void SetUserData(void *ud)
virtual Bool_t HasMainTrans() const
virtual const char * GetElementTitle() const
Virtual function for retrieving title of the render-element.
virtual void CollectSceneParentsFromChildren(List_t &scenes, TEveElement *parent)
Collect scene-parents from all children.
TEveListTreeInfo(const TEveListTreeInfo &l)
virtual TClass * ProjectedClass(const TEveProjection *p) const
Virtual from TEveProjectable, returns TEveCompoundProjected class.
Bool_t IsPickable() const
virtual void AddStamp(UChar_t bits)
Add (bitwise or) given stamps to fChangeBits.
std::set< TEveElement * > Set_t
virtual ~TEveElementList()
virtual const char * GetElementName() const
Virtual function for retrieving name of the element.
virtual void DestroyMainTrans()
Destroy the main transformation matrix, it will always be taken as identity.
virtual Bool_t AcceptElement(TEveElement *el)
Check if TEveElement el is inherited from fChildClass.
void VizDB_Apply(const char *tag)
Set visual parameters for this object for given tag.
virtual ~TEveElementListProjected()
List_ci EndParents() const
void CSCApplyMainTransparencyToAllChildren()
virtual void RemoveParent(TEveElement *re)
Remove re from the list of parents.
virtual void NameTitleChanged()
Virtual function called when a name or title of the element has been changed.
virtual void SetName(const char *name)
Change (i.e.
void SetPickable(Bool_t p)
virtual const char * GetElementTitle() const
Virtual function for retrieving title of the render-element.
virtual TEveElement * GetProjectedAsElement()
Returns this projected dynamic-casted to TEveElement.
virtual void RemoveElementLocal(TEveElement *el)
Perform additional local removal of el.
static const TGPicture * fgListTreeIcons[9]
Int_t fTopItemCnt
Counter for parents that are ignored in ref-counting.
TEveElement * LastChild() const
Returns the last child element or 0 if the list is empty.
void IncDenyDestroy()
Increases the deny-destroy count of the element.
virtual void PropagateMainColorToProjecteds(Color_t color, Color_t old_color)
Propagate color to projected elements.
virtual Bool_t SetRnrState(Bool_t rnr)
Set render state of this element and of its children to the same value.
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 PaintStandard(TObject *id)
Paint object – a generic implementation for EVE elements.
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
virtual void CollectSceneParents(List_t &scenes)
Collect all parents of class TEveScene.
virtual void Destroy()
Destroy this element.
bool operator==(const TEveListTreeInfo &x) const
ClassDef(TEveElementList, 0)
Int_t GetParentIgnoreCnt() const
Get number of parents that should be ignored in doing reference-counting.
virtual TObject * GetObject(const TEveException &="TEveElementList::GetObject ") const
Get a TObject associated with this render-element.
virtual const char * GetElementName() const
Virtual function for retrieving name of the element.
void DecParentIgnoreCnt()
Decrease number of parents ignored in reference-counting.
Bool_t FindVizModel()
Find model element in VizDB that corresponds to previously assigned fVizTag and set fVizModel accordi...
virtual void SetNameTitle(const char *name, const char *title)
Change (i.e. set) all the TNamed parameters (name and title).
static const char * ToString(Bool_t b)
Convert Bool_t to string - kTRUE or kFALSE.
virtual void SetElementNameTitle(const char *name, const char *title)
Virtual function for setting of name and title of render element.
TEveElementList(const char *n="TEveElementList", const char *t="", Bool_t doColor=kFALSE, Bool_t doTransparency=kFALSE)
Constructor.
void CSCApplyMainColorToMatchingChildren()
virtual void PropagateVizParamsToProjecteds()
Propagate visualization parameters to dependent elements.
void SetChildClass(TClass *c)
virtual void RemoveElementsLocal()
Perform additional local removal of all elements.
TEveListTreeInfo & operator=(const TEveListTreeInfo &l)
TEveElement()
Default constructor.
void SetMainColorPtr(Color_t *color)
virtual TString GetHighlightTooltip()
void CSCImplySelectAllChildren()
TEveElementObjectPtr & operator=(const TEveElementObjectPtr &)
TObject * GetSourceObject() const
void RecheckImpliedSelections()
Call this if it is possible that implied-selection or highlight has changed for this element or for i...
virtual TEveElementList * CloneElement() const
Clone the element via copy constructor.
void SetCSCBits(UChar_t f)
virtual void RemoveElement(TEveElement *el)
Remove el from the list of children.
Persistent Reference link to a TObject A TRef is a lightweight object pointing to any TObject...
void IncParentIgnoreCnt()
Increase number of parents ignored in reference-counting.
Description of TEveCompound.
ECompoundSelectionColorBits
TEveElement * GetVizModel() const
virtual void SetElementTitle(const char *title)
Virtual function for setting of title of an element.
void SetEditMainTransparency(Bool_t x)
Bool_t fDestroyOnZeroRefCnt
Deny-destroy count.
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...
Bool_t fCanEditMainTransparency
sLTI_t::reverse_iterator sLTI_ri
virtual void Annihilate()
Optimized destruction without check of reference-count.
The TNamed class is the base class for all named ROOT classes.
void VizDB_Reapply()
Reset visual parameters for this object from VizDB.
void SetVizTag(const TString &tag)
virtual TEveElement * CloneElementRecurse(Int_t level=0) const
Clone elements and recurse 'level' deep over children.
virtual void DestroyListSubTree(TGListTree *ltree, TGListTreeItem *parent)
Destroy sub-tree under item 'parent' in list-tree 'ltree'.
TEveElementListProjected()
Constructor.
virtual Bool_t GetRnrChildren() const
virtual Color_t GetMainColor() const
Int_t FindChildren(List_t &matches, const TString &name, const TClass *cls=0)
Find all children with given name and append them to matches list.
void SetCompound(TEveCompound *c)
void SetEditMainColor(Bool_t x)
TEveElement & operator=(const TEveElement &)
virtual TObject * GetRenderObject(const TEveException &eh) const
virtual Bool_t CanEditMainTrans() const
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.
virtual void SetElementTitle(const char *title)
Virtual function for setting of title of an element.
Base-class for non-linear projections.
virtual void ExpandIntoListTree(TGListTree *ltree, TGListTreeItem *parent)
Populates parent with elements.
virtual Bool_t GetRnrSelf() const
const List_t & RefChildren() const
void SaveVizParams(std::ostream &out, const TString &tag, const TString &var)
Save visualization parameters for this element with given tag.
Bool_t HasChild(TEveElement *el)
Check if element el is a child of this element.
void(TEveElement::* Select_foo)(Bool_t)
virtual void DestroyElements()
Destroy all children of this element.
virtual void SetElementName(const char *name)
Virtual function for setting of name of an element.
virtual void ClearStamps()
virtual ~TEveElement()
Destructor.
virtual Bool_t CanEditMainColor() const
virtual ~TEveListTreeInfo()
Abstract base-class for non-linear projectable objects.
Bool_t GetOwnObject() const
virtual TEveElementObjectPtr * CloneElement() const
Clone the element via copy constructor.
virtual void InitMainTrans(Bool_t can_edit=kTRUE)
Initialize the main transformation to identity matrix.
Color_t * GetMainColorPtr() const
void SetPickableRecursively(Bool_t p)
Set pickable state on the element and all its children.
virtual TGListTreeItem * AddIntoListTrees(TEveElement *parent)
Add this render element into all list-trees and all items belonging to parent.
virtual void PreDeleteElement()
Externally assigned and controlled user data.
List_t::const_iterator List_ci
void CSCApplyMainTransparencyToMatchingChildren()
virtual void CheckReferenceCount(const TEveException &eh="TEveElement::CheckReferenceCount ")
Check external references to this and eventually auto-destruct the render-element.
List_ci BeginChildren() const
TEveElement * GetMaster()
Returns the master element - that is:
virtual TGListTreeItem * AddIntoListTree(TGListTree *ltree, TGListTreeItem *parent_lti)
Add this element into ltree to an already existing item parent_lti.
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
void SetSourceObject(TObject *o)
virtual ~TEveElementObjectPtr()
Destructor.
virtual void SetElementNameTitle(const char *name, const char *title)
Virtual function for setting of name and title of render element.
virtual void DecImpliedHighlighted()
Decrease element's implied-highlight count. Stamp appropriately.
virtual void PropagateMainTransparencyToProjecteds(Char_t t, Char_t old_t)
Propagate transparency to projected elements.
virtual void DecImpliedSelected()
Decrease element's implied-selection count. Stamp appropriately.
virtual const TGPicture * GetListTreeCheckBoxIcon()
Returns list-tree-item check-box picture appropriate for given rendering state.
void SetMainColorRGB(UChar_t r, UChar_t g, UChar_t b)
Convert RGB values to Color_t and call SetMainColor.
void SetMainAlpha(Float_t alpha)
Set main-transparency via float alpha variable.
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
void ResetCSCBits(UChar_t f)
virtual void AnnihilateRecursively()
Protected member function called from TEveElement::Annihilate().
virtual void IncImpliedSelected()
Increase element's implied-selection count. Stamp appropriately.
virtual void FillImpliedSelectedSet(Set_t &impSelSet)
Populate set impSelSet with derived / dependant elements.
virtual void IncImpliedHighlighted()
Increase element's implied-highlight count. Stamp appropriately.
virtual void ExportToCINT(char *var_name)
Export render-element to CINT with variable name var_name.
TEveElement with external TObject as a holder of visualization data.
virtual TObject * GetObject(const TEveException &eh="TEveElementObjectPtr::GetObject ") const
Return external object.
virtual Bool_t SetRnrSelf(Bool_t rnr)
Set render state of this element, i.e.
virtual const char * GetName() const
Returns name of object.
const TString & GetVizTag() const
bool operator<(const TEveListTreeInfo &x) const
The ROOT global object gROOT contains a list of all defined classes.
virtual TObject * GetEditorObject(const TEveException &eh) const
virtual void AddElement(TEveElement *el)
Add el to the list of children.
virtual Int_t GetNItems() const
Bool_t GetDestroyOnZeroRefCnt() const
Returns state of flag determining if the element will be destroyed when reference count reaches zero...
void * GetUserData() const
virtual void SetMainColor(Color_t color)
Set main color of the element.
ClassDef(TEveElementListProjected, 0)
void StampColorSelection()
void ExportSourceObjectToCINT(char *var_name) const
Export source object to CINT with given name for the variable.
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 void SetMainTransparency(Char_t t)
Set main-transparency.
TEveElement * FirstChild() const
Returns the first child element or 0 if the list is empty.
virtual Bool_t RemoveFromListTree(TGListTree *ltree, TGListTreeItem *parent_lti)
Remove element from list-tree 'ltree' where its parent item is 'parent_lti'.
virtual TEveElement * ForwardEdit()
Returns element to be displayed in GUI editor on click.
std::list< TEveElement * > List_t
virtual void DestroyOrWarn()
Destroy this element. Prints a warning if deny-destroy is in force.
Set_t::const_iterator Set_ci
void EnableListElements(Bool_t rnr_self=kTRUE, Bool_t rnr_children=kTRUE)
Enable rendering of children and their list contents.
virtual void RemoveElementsInternal()
Remove all elements.
virtual void ExportToCINT(char *var_name)
Export external object to CINT with variable name var_name.
A projected element list – required for proper propagation of render state to projected views...
void DumpSourceObject() const
Call Dump() on source object.
Int_t GetDenyDestroy() const
Returns the number of times deny-destroy has been requested on the element.
Bool_t TestCSCBits(UChar_t f) const
virtual Bool_t SingleRnrState() const
void CSCTakeAnyParentAsMaster()
virtual Bool_t SetRnrChildren(Bool_t rnr)
Set render state of this element's children, i.e.
void CSCApplyMainColorToAllChildren()
virtual void HighlightElement(Bool_t state)
Set element's highlight state. Stamp appropriately.
Central application manager for Eve.
virtual TObject * GetObject(const TEveException &eh) const
Get a TObject associated with this render-element.
virtual void UnHighlighted()
Virtual function called when both fHighlighted is false and fImpliedHighlighted is 0...
virtual Bool_t GetRnrAnything() const
virtual const TGPicture * GetListTreeIcon(Bool_t open=kFALSE)
Returns pointer to first listtreeicon.
Short_t fImpliedHighlighted
void SpawnEditor()
Show GUI editor for this object.
virtual void CopyVizParamsFromDB()
Copy visualization parameters from the model-element fVizModel.
Mother of all ROOT objects.
Structure holding information about TGListTree and TGListTreeItem that represents given TEveElement...
typedef void((*Func_t)())
TObject * GetObject() const
Return a pointer to the referenced object.
UChar_t GetChangeBits() const
Bool_t HasParents() const
Bool_t HasChildren() const
TEveElementObjectPtr(TObject *obj, Bool_t own=kTRUE)
Constructor.
virtual void RemoveElements()
Remove all elements.
virtual Bool_t AcceptElement(TEveElement *el)
Check if el can be added to this element.
#define dest(otri, vertexptr)
void SetOwnObject(Bool_t o)
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 PropagateVizParamsToElements(TEveElement *el=0)
Propagate visualization parameters from element el (defaulting to this) to all elements (children)...
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write-out visual parameters for this object.
void SetMainColorPixel(Pixel_t pixel)
Convert pixel to Color_t and call SetMainColor().
virtual TEveTrans & RefMainTrans()
Return reference to main transformation.
virtual Bool_t HasMainColor() const
virtual Bool_t SetRnrSelfChildren(Bool_t rnr_self, Bool_t rnr_children)
Set state for rendering of this element and its children.
Int_t NumChildren() const
virtual Char_t GetMainTransparency() const
Exception class thrown by TEve classes and macros.
virtual Bool_t CanEditElement() const
TEveElementListProjected & operator=(const TEveElementListProjected &)
virtual TEveElement * CloneElement() const
Clone the element via copy constructor.
ClassDef(TEveListTreeInfo, 0)
TEveElementList & operator=(const TEveElementList &)
virtual TGListTreeItem * FindListTreeItem(TGListTree *ltree)
Find any list-tree-item of this element in list-tree 'ltree'.
void VizDB_UpdateModel(Bool_t update=kTRUE)
Copy visual parameters from this element to viz-db model.
void SetDestroyOnZeroRefCnt(Bool_t d)
Sets the state of flag determining if the element will be destroyed when reference count reaches zero...
List_ci EndChildren() const
virtual void PropagateRnrStateToProjecteds()
Propagate render state to the projected replicas of this element.
virtual void AnnihilateElements()
Annihilate elements.
virtual TEveTrans * PtrMainTrans(Bool_t create=kTRUE)
Return pointer to main transformation.
TEveCompound * GetCompound()
TEveElement * FindChild(const TString &name, const TClass *cls=0)
Find the first child with given name.
virtual void UnSelected()
Virtual function called when both fSelected is false and fImpliedSelected is 0.
TClass * GetChildClass() const
virtual TEveElement * ForwardSelection()
Returns element to be selected on click.
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
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' ...
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
void PrintSourceObject() const
Call Print() on source object.
virtual Bool_t CanEditMainTransparency() const
TString fVizTag
Element used as model from VizDB.
virtual void CloneChildrenRecurse(TEveElement *dest, Int_t level=0) const
Clone children and attach them to the dest element.
std::set< TEveListTreeInfo > sLTI_t
virtual void SetTransMatrix(Double_t *carr)
Set transformation matrix from column-major array.
virtual void UpdateProjection()
This is abstract method from base-class TEveProjected.
ClassDef(TEveElementObjectPtr, 0)
virtual Bool_t HandleElementPaste(TEveElement *el)
React to element being pasted or dnd-ed.
TEveListTreeInfo(TGListTree *lt, TGListTreeItem *lti)