17 #include "KeySymbols.h"
19 #include "Reflex/Object.h"
20 #include "Reflex/Type.h"
64 m_selectionManager(iSM),
65 m_detailViewManager(iDVM),
70 m_afterViewSeperator(0),
73 m_nDetailViewEntries(0),
106 class change_visibility {
108 change_visibility(
bool iIsVisible): m_isVisible(iIsVisible) {}
109 void operator()(
const FWModelId& iID)
const {
137 std::vector<Color_t>
colors;
147 Reflex::Type rtype(Reflex::Type::ByName(
id.item()->modelType()->GetName()));
148 Reflex::Object
o(rtype, const_cast<void *>(
id.item()->modelData(
id.
index())));
155 const char*
cmd = Form(
"FWGUIManager::OStream() << *(%s*)%p ;",
id.item()->modelType()->GetName(), (
void*)
id.item()->modelData(
id.
index()));
158 gROOT->ProcessLine(cmd);
184 assert(0!=viewChoices.size());
200 FWDisplayProperties changeProperties = it->item()->modelInfo(it->index()).displayProperties();
202 it->item()->setDisplayProperties(it->index(), changeProperties);
257 Reflex::Type rtype(Reflex::Type::ByName(
id.item()->modelType()->GetName()));
258 Reflex::Object
o(rtype, const_cast<void *>(
id.item()->modelData(
id.
index())));
259 Reflex::EMEMBERQUERY inh = Reflex::INHERITEDMEMBERS_ALSO;
260 if ( rtype.FunctionMemberByName(
"print",
Reflex::Type(Reflex::Type::ByName(
"void (std::ostream&)"), Reflex::CONST), 0 , inh))
273 if(viewChoices.size()>0) {
276 index != viewChoices.size();
282 const std::string kStart(
"Open ");
283 const std::string kEnd(
" Detail View ...");
337 "FWModelContextMenuHandler",
338 const_cast<FWModelContextMenuHandler*>(
this),
339 "chosenItem(Int_t)");
347 std::vector<Color_t>
colors;
352 m_colorPopup->Connect(
"ColorSelected(Color_t)",
"FWModelContextMenuHandler", const_cast<FWModelContextMenuHandler*>(
this),
"colorChangeRequested(Color_t)");
const std::set< FWModelId > & selected() const
FWModelContextMenuHandler(FWSelectionManager *, FWDetailViewManager *, FWColorManager *, FWGUIManager *)
void setColor(Color_t iColor)
FWSelectionManager * m_selectionManager
TGMenuEntry * m_seperator
unsigned int m_nDetailViewEntries
unsigned int m_nViewEntries
void setDisplayProperties(int iIndex, const FWDisplayProperties &) const
void createModelContext() const
FWColorManager * m_colorManager
std::vector< Color_t > colors
void fillLimitedColors(std::vector< Color_t > &cv) const
TGPopupMenu * m_modelPopup
void showEDIFrame(int iInfoToShow=-1)
Allowed values are -1 or ones from FWDataCategories enum.
virtual void select(int iEntryIndex, const FWModelId &id, int iX, int iY)=0
static const char *const kOpenDetailView
BackgroundColorIndex backgroundColorIndex() const
void colorChangeRequested(Color_t)
virtual ~FWModelContextMenuHandler()
TGMenuEntry * m_afterViewSeperator
FWGUIManager * m_guiManager
FWViewContextMenuHandlerBase * m_viewHander
void showSelectedModelContext(Int_t iX, Int_t iY, FWViewContextMenuHandlerBase *) const
NOTE: iX and iY are in global coordinates.
void addTo(FWModelContextMenuHandler &, const FWModelId &id)
TGMenuEntry * m_viewSeperator
std::vector< std::string > detailViewsFor(const FWModelId &) const
FWDetailViewManager * m_detailViewManager
void addViewEntry(const char *, int, bool enabled=true)
void openDetailViewFor(const FWModelId &, const std::string &)
ModelInfo modelInfo(int iIndex) const
void setIsVisible(bool iSet)
FWColorPopup * m_colorPopup
void createColorPopup() const
const FWEventItem * item() const