16 #include "TEveDigitSet.h" 17 #include "TEveBoxSet.h" 18 #include "TEveManager.h" 19 #include "TEveSelection.h" 40 const TEveSecondarySelectable::SelectionSet_t&
m_selected;
45 for (
size_t i = 0;
i <
size; ++
i) {
47 TEveSecondarySelectable::SelectionSet_ci si =
m_selected.find(
i);
67 TEveElement* el =
static_cast<TEveElement*
>(
set);
69 return TString::Format(
70 "%d %s %s",
idx,
ss->item()->name().c_str(),
ss->item()->modelInterestingValueAsString(
idx).c_str());
74 assert(!product->HasChildren());
78 m_boxSet->Reset(TEveBoxSet::kBT_FreeBox,
true, 256);
90 assert(product->NumChildren() == 1);
91 return static_cast<TEveDigitSet*
>(*product->BeginChildren());
96 boxSet->DigitValue(
dp.isVisible());
99 boxSet->DigitColor(
dp.color(),
dp.transparency());
101 if (
dp.transparency())
102 boxSet->SetMainTransparency(
dp.transparency());
110 TEveSecondarySelectable::SelectionSet_t& selected =
111 (TEveSecondarySelectable::SelectionSet_t&)(digits->RefSelectedSet());
113 for (std::set<FWModelId>::const_iterator
it = iIds.begin();
it != iIds.end(); ++
it) {
118 digits->SetCurrentDigit(
it->index());
119 digits->DigitValue(
p.isVisible());
121 digits->DigitColor(
p.color(),
p.transparency());
124 TEveSecondarySelectable::SelectionSet_ci si = selected.find(
it->index());
125 if (
info.isSelected()) {
126 if (si == selected.end())
127 selected.insert(
it->index());
129 if (si != selected.end())
134 if (!selected.empty()) {
135 if (0 == digits->GetSelectedLevel()) {
136 gEve->GetSelection()->AddElement(digits);
139 if (1 == digits->GetSelectedLevel() || 2 == digits->GetSelectedLevel()) {
140 gEve->GetSelection()->RemoveElement(digits);
144 digits->StampObjProps();
FWSecondarySelectableSelector(const TEveSecondarySelectable::SelectionSet_t &s, const FWEventItem *i)
void doUnselect() override
void select(int iIndex) const
~FWDigitSetProxyBuilder() override
static TString getTooltip(TEveDigitSet *set, int idx)
TEveElementList * m_elements
void unselect(int iIndex) const
void modelChanges(const FWModelIds &, Product *) override
std::set< FWModelId > FWModelIds
~FWSecondarySelectableSelector() override
const TEveSecondarySelectable::SelectionSet_t & m_selected
const FWEventItem * m_item
TEveBoxSet * addBoxSetToProduct(TEveElementList *product)
const FWEventItem * item() const
ModelInfo modelInfo(int iIndex) const
void addBox(TEveBoxSet *set, const float *pnts, const FWDisplayProperties &dp)
TEveDigitSet * digitSet(TEveElement *product)
const FWEventItem * item() const