12#ifndef ROOT7_REveSelection
13#define ROOT7_REveSelection
20namespace Experimental {
81 typedef std::map<REveElement*, Record>
SelMap_t;
103 auto i =
fMap.find(el);
104 return i !=
fMap.end() ? & i->second :
nullptr;
117 REveSelection(
const std::string &
n =
"REveSelection",
const std::string &t =
"",
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
Base class for REveUtil visualization elements, providing hierarchy management, rendering control and...
std::set< REveElement * > Set_t
void ExecuteNewElementPicked(REveSelection *s, REveElement *el, bool multi, bool secondary, const std::set< int > &secondary_idcs)
virtual bool DeviateSelection(REveSelection *s, REveElement *el, bool multi, bool secondary, const std::set< int > &secondary_idcs)=0
REveSelection Container for selected and highlighted elements.
void RemoveNieceInternal(REveElement *el) override
Virtual from REveAunt.
void NewElementPicked(ElementId_t id, bool multi, bool secondary, const std::set< int > &secondary_idcs={})
Called from GUI when user picks or un-picks an element.
bool HasNiece(REveElement *el) const override
Check if elemenet el is selected (not implied selected).
bool AcceptNiece(REveElement *el) override
Pre-addition check.
std::shared_ptr< Deviator > fDeviator
!
std::shared_ptr< Deviator > GetDeviator() const
REveSelection & operator=(const REveSelection &)=delete
void AddNieceForSelection(REveElement *, bool secondary, const std::set< int > &)
void AddNieceInternal(REveElement *el) override
Add an element into selection, virtual from REveAunt.
REveElement * MapPickedToSelected(REveElement *el)
Given element el that was picked or clicked by the user, find the parent/ancestor element that should...
void RemoveImpliedSelected(REveElement *el)
Remove element from all implied-selected sets.
bool GetIsHighlight() const
int RemoveImpliedSelectedReferencesTo(REveElement *el)
Remove pointers to el from implied selected sets.
~REveSelection() override
Destructor.
const std::vector< int > & RefPickToSelect() const
void SelectionRemoved(REveElement *el)
Emit SelectionRemoved signal.
void SetHiddenEdgeColorRGB(UChar_t r, UChar_t g, UChar_t b)
Set hidden highlight color.
REveSelection(const REveSelection &)=delete
void SetVisibleEdgeColorRGB(UChar_t r, UChar_t g, UChar_t b)
Set visible highlight color.
Color_t fHiddenEdgeColor
!
std::vector< int > fPickToSelect
!
virtual void ActivateSelection()
Activate this selection.
bool HasNieces() const override
Check if any elements are selected.
std::map< REveElement *, Record > SelMap_t
void SelectionCleared()
Emit SelectionCleared signal.
void SetIsHighlight(bool m)
virtual void DeactivateSelection()
Deactivate this selection.
void DoElementSelect(SelMap_i &entry)
Select element indicated by the entry and fill its implied-selected set.
Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset) override
Write core json. If rnr_offset negative, render data will not be written.
Record * find_record(REveElement *el)
void NewElementPickedInternal(REveElement *el, bool multi, bool secondary, const std::set< int > &secondary_idcs)
Called from NewElementPicked or Deviator::DeviateSelection.
SelMap_t::iterator SelMap_i
virtual void UserRePickedElement(REveElement *el)
Called when element selection is repeated.
virtual void UserPickedElement(REveElement *el, Bool_t multi=kFALSE)
Called when user picks/clicks on an element.
void AddPickToSelect(int ps)
void SetDeviator(std::shared_ptr< Deviator > d)
void RecheckImpliedSetForElement(REveElement *el)
If given element is selected or implied-selected within this selection then recheck implied-set for g...
void SelectionRepeated(REveElement *el)
Emit SelectionRepeated signal.
void RecheckImpliedSet(SelMap_i &entry)
Recalculate implied-selected state for given selection entry.
void SelectionAdded(REveElement *el)
Emit SelectionAdded signal.
void NewElementPickedStr(ElementId_t id, bool multi, bool secondary, const char *secondary_idcs="")
Wrapper for NewElementPickedStr that takes secondary indices as C-style string.
void RemoveNieces() override
Add an element into selection, virtual from REveAunt.
Color_t fVisibleEdgeColor
!
void DoElementUnselect(SelMap_i &entry)
Deselect element indicated by the entry and clear its implied-selected set.
void ClearSelection()
Clear selection if not empty.
virtual void UserUnPickedElement(REveElement *el)
Called when an element is unselected.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
REveElement * f_primary
! it's also implied through the map – XXXX do i need it ????
bool is_secondary() const
std::set< int > f_sec_idcs
Record(REveElement *el, const std::set< int > &secondary_idcs)
bool f_is_sec
! is secondary-selected – XXXX do i need it ????