test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
FWPopupMenu Class Reference
Inheritance diagram for FWPopupMenu:

Public Member Functions

 FWPopupMenu (const TGWindow *p=0, UInt_t w=10, UInt_t h=10, UInt_t options=0)
 
virtual Bool_t HandleKey (Event_t *event) override
 
virtual void PoppedDown () override
 
virtual void PoppedUp () override
 

Detailed Description

Definition at line 4 of file FWPopupMenu.cc.

Constructor & Destructor Documentation

FWPopupMenu::FWPopupMenu ( const TGWindow *  p = 0,
UInt_t  w = 10,
UInt_t  h = 10,
UInt_t  options = 0 
)
inline

Definition at line 7 of file FWPopupMenu.cc.

7  :
8  TGPopupMenu(p, w, h, options)
9  {
10  AddInput(kKeyPressMask);
11  }
const double w
Definition: UKUtility.cc:23
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.

Member Function Documentation

virtual Bool_t FWPopupMenu::HandleKey ( Event_t *  event)
inlineoverridevirtual

Definition at line 33 of file FWPopupMenu.cc.

References ev, and tmp.

34  {
35  if (event->fType != kGKeyPress) return kTRUE;
36 
37  UInt_t keysym;
38  char tmp[2];
39  gVirtualX->LookupString(event, tmp, sizeof(tmp), keysym);
40 
41  TGMenuEntry *ce = fCurrent;
42 
43  switch (keysym)
44  {
45  case kKey_Up:
46  {
47  if (ce) ce = (TGMenuEntry*)GetListOfEntries()->Before(ce);
48  while (ce && ((ce->GetType() == kMenuSeparator) ||
49  (ce->GetType() == kMenuLabel) ||
50  !(ce->GetStatus() & kMenuEnableMask)))
51  {
52  ce = (TGMenuEntry*)GetListOfEntries()->Before(ce);
53  }
54  if (!ce) ce = (TGMenuEntry*)GetListOfEntries()->Last();
55  Activate(ce);
56  break;
57  }
58  case kKey_Down:
59  {
60  if (ce) ce = (TGMenuEntry*)GetListOfEntries()->After(ce);
61  while (ce && ((ce->GetType() == kMenuSeparator) ||
62  (ce->GetType() == kMenuLabel) ||
63  !(ce->GetStatus() & kMenuEnableMask)))
64  {
65  ce = (TGMenuEntry*)GetListOfEntries()->After(ce);
66  }
67  if (!ce) ce = (TGMenuEntry*)GetListOfEntries()->First();
68  Activate(ce);
69  break;
70  }
71  case kKey_Enter:
72  case kKey_Return:
73  {
74  Event_t ev;
75  ev.fType = kButtonRelease;
76  ev.fWindow = fId;
77  return HandleButton(&ev);
78  }
79  case kKey_Escape:
80  {
81  fCurrent = 0;
82  void *dummy = 0;
83  return EndMenu(dummy);
84  }
85  default:
86  {
87  break;
88  }
89  }
90 
91  return kTRUE;
92  }
bool ev
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
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
virtual void FWPopupMenu::PoppedDown ( )
inlineoverridevirtual

Definition at line 27 of file FWPopupMenu.cc.

References cmsLHEtoEOSManager::l.

28  {
29  gVirtualX->GrabKey(fId, 0l, kAnyModifier, kFALSE);
30  TGPopupMenu::PoppedDown();
31  }
virtual void FWPopupMenu::PoppedUp ( )
inlineoverridevirtual

Definition at line 19 of file FWPopupMenu.cc.

References cmsLHEtoEOSManager::l.

20  {
21  TGPopupMenu::PoppedUp();
22  gVirtualX->SetInputFocus(fId);
23  gVirtualX->GrabKey(fId, 0l, kAnyModifier, kTRUE);
24 
25  }