17 #include "KeySymbols.h"
50 AddInput(kKeyPressMask);
61 TGPopupMenu::PoppedUp();
62 gVirtualX->SetInputFocus(fId);
63 gVirtualX->GrabKey(fId, 0
l, kAnyModifier, kTRUE);
69 gVirtualX->GrabKey(fId, 0
l, kAnyModifier, kFALSE);
70 TGPopupMenu::PoppedDown();
75 if (event->fType != kGKeyPress)
return kTRUE;
79 gVirtualX->LookupString(event, tmp,
sizeof(tmp), keysym);
81 TGMenuEntry *ce = fCurrent;
87 if (ce) ce = (TGMenuEntry*)GetListOfEntries()->Before(ce);
88 while (ce && ((ce->GetType() == kMenuSeparator) ||
89 (ce->GetType() == kMenuLabel) ||
90 !(ce->GetStatus() & kMenuEnableMask)))
92 ce = (TGMenuEntry*)GetListOfEntries()->Before(ce);
94 if (!ce) ce = (TGMenuEntry*)GetListOfEntries()->Last();
100 if (ce) ce = (TGMenuEntry*)GetListOfEntries()->After(ce);
101 while (ce && ((ce->GetType() == kMenuSeparator) ||
102 (ce->GetType() == kMenuLabel) ||
103 !(ce->GetStatus() & kMenuEnableMask)))
105 ce = (TGMenuEntry*)GetListOfEntries()->After(ce);
107 if (!ce) ce = (TGMenuEntry*)GetListOfEntries()->First();
115 ev.fType = kButtonRelease;
117 return HandleButton(&ev);
123 return EndMenu(dummy);
150 m_selectionManager(iSM),
151 m_detailViewManager(iDVM),
156 m_afterViewSeperator(0),
159 m_nDetailViewEntries(0),
191 class change_visibility {
193 change_visibility(
bool iIsVisible): m_isVisible(iIsVisible) {}
194 void operator()(
const FWModelId& iID)
const {
222 std::vector<Color_t>
colors;
250 assert(0!=viewChoices.size());
266 FWDisplayProperties changeProperties = it->item()->modelInfo(it->index()).displayProperties();
268 it->item()->setDisplayProperties(it->index(), changeProperties);
312 if(viewChoices.size()>0) {
315 index != viewChoices.size();
321 const std::string kStart(
"Open ");
322 const std::string kEnd(
" Detail View ...");
375 "FWModelContextMenuHandler",
376 const_cast<FWModelContextMenuHandler*>(
this),
377 "chosenItem(Int_t)");
385 std::vector<Color_t>
colors;
390 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
void addViewEntry(const char *, int)
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
void addTo(FWModelContextMenuHandler &)
static const char *const kOpenDetailView
BackgroundColorIndex backgroundColorIndex() const
void colorChangeRequested(Color_t)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
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.
TGMenuEntry * m_viewSeperator
std::vector< std::string > detailViewsFor(const FWModelId &) const
FWDetailViewManager * m_detailViewManager
void openDetailViewFor(const FWModelId &, const std::string &)
std::vector< std::vector< double > > tmp
ModelInfo modelInfo(int iIndex) const
void setIsVisible(bool iSet)
FWColorPopup * m_colorPopup
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
void createColorPopup() const
const FWEventItem * item() const