17 #include "KeySymbols.h" 64 : m_modelPopup(nullptr),
65 m_colorPopup(nullptr),
66 m_selectionManager(iSM),
67 m_detailViewManager(iDVM),
71 m_viewSeperator(nullptr),
72 m_afterViewSeperator(nullptr),
75 m_nDetailViewEntries(0),
77 m_viewHander(nullptr) {}
103 class change_visibility {
105 change_visibility(
bool iIsVisible) : m_isVisible(iIsVisible) {}
106 void operator()(
const FWModelId& iID)
const {
108 p.setIsVisible(m_isVisible);
121 change_visibility(!
id.
item()->modelInfo(
id.
index()).displayProperties().isVisible()));
128 std::vector<Color_t>
colors;
176 std::vector<std::string> viewChoices =
178 assert(!viewChoices.empty());
194 it->item()->setDisplayProperties(
it->index(), changeProperties);
236 if (
id.
item()->modelInfo(
id.
index()).displayProperties().isVisible()) {
259 std::vector<std::string> viewChoices =
261 if (!viewChoices.empty()) {
272 if (viewChoices[
index][0] !=
'!') {
275 ->SetString((kStart + viewChoices[
index] + kEnd).c_str());
279 ->SetString((kStart + &viewChoices[
index][1] + kEnd).c_str());
331 "FWModelContextMenuHandler",
332 const_cast<FWModelContextMenuHandler*>(
this),
333 "chosenItem(Int_t)");
339 std::vector<Color_t>
colors;
345 "FWModelContextMenuHandler",
346 const_cast<FWModelContextMenuHandler*>(
this),
347 "colorChangeRequested(Color_t)");
FWModelContextMenuHandler(FWSelectionManager *, FWDetailViewManager *, FWColorManager *, FWGUIManager *)
void setColor(Color_t iColor)
void createModelContext() const
FWSelectionManager * m_selectionManager
TGMenuEntry * m_seperator
unsigned int m_nDetailViewEntries
unsigned int m_nViewEntries
FWColorManager * m_colorManager
std::vector< std::string > detailViewsFor(const FWModelId &) const
TGPopupMenu * m_modelPopup
void showEDIFrame(int iInfoToShow=-1)
Allowed values are -1 or ones from FWDataCategories enum.
void showSelectedModelContext(Int_t iX, Int_t iY, FWViewContextMenuHandlerBase *) const
NOTE: iX and iY are in global coordinates.
virtual void select(int iEntryIndex, const FWModelId &id, int iX, int iY)=0
BackgroundColorIndex backgroundColorIndex() const
static const char *const kOpenDetailView
void colorChangeRequested(Color_t)
virtual ~FWModelContextMenuHandler()
TGMenuEntry * m_afterViewSeperator
const FWEventItem * item() const
FWGUIManager * m_guiManager
FWViewContextMenuHandlerBase * m_viewHander
void addTo(FWModelContextMenuHandler &, const FWModelId &id)
TGMenuEntry * m_viewSeperator
FWDetailViewManager * m_detailViewManager
void addViewEntry(const char *, int, bool enabled=true)
void openDetailViewFor(const FWModelId &, const std::string &)
void setDisplayProperties(int iIndex, const FWDisplayProperties &) const
ClassImp(FWModelContextMenuHandler)
void createColorPopup() const
const std::set< FWModelId > & selected() const
FWColorPopup * m_colorPopup
ModelInfo modelInfo(int iIndex) const
void fillLimitedColors(std::vector< Color_t > &cv) const