#ifndef ROOT_TEveSelection
#define ROOT_TEveSelection
#include "TEveElement.h"
#include "TQObject.h"
#include <map>
class TEveSelection : public TEveElementList,
public TQObject
{
public:
enum EPickToSelect
{
kPS_Ignore,
kPS_Element,
kPS_Projectable,
kPS_Compound,
kPS_PableCompound,
kPS_Master
};
private:
TEveSelection(const TEveSelection&);
TEveSelection& operator=(const TEveSelection&);
protected:
typedef std::map<TEveElement*, Set_t> SelMap_t;
typedef std::map<TEveElement*, Set_t>::iterator SelMap_i;
Int_t fPickToSelect;
Bool_t fActive;
Bool_t fIsMaster;
SelMap_t fImpliedSelected;
Select_foo fSelElement;
ImplySelect_foo fIncImpSelElement;
ImplySelect_foo fDecImpSelElement;
void DoElementSelect (SelMap_i entry);
void DoElementUnselect(SelMap_i entry);
void RecheckImpliedSet(SelMap_i smi);
public:
TEveSelection(const char* n="TEveSelection", const char* t="");
virtual ~TEveSelection() {}
void SetHighlightMode();
Int_t GetPickToSelect() const { return fPickToSelect; }
void SetPickToSelect(Int_t ps) { fPickToSelect = ps; }
Bool_t GetIsMaster() const { return fIsMaster; }
void SetIsMaster(Bool_t m) { fIsMaster = m; }
virtual Bool_t AcceptElement(TEveElement* el);
virtual void AddElement(TEveElement* el);
virtual void RemoveElement(TEveElement* el);
virtual void RemoveElementLocal(TEveElement* el);
virtual void RemoveElements();
virtual void RemoveElementsLocal();
virtual void RemoveImpliedSelected(TEveElement* el);
void RecheckImpliedSetForElement(TEveElement* el);
void SelectionAdded(TEveElement* el);
void SelectionRemoved(TEveElement* el);
void SelectionCleared();
void SelectionRepeated(TEveElement* el);
virtual void ActivateSelection();
virtual void DeactivateSelection();
TEveElement* MapPickedToSelected(TEveElement* el);
virtual void UserPickedElement(TEveElement* el, Bool_t multi=kFALSE);
virtual void UserRePickedElement(TEveElement* el);
virtual void UserUnPickedElement(TEveElement* el);
ClassDef(TEveSelection, 0);
};
#endif