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)
 
virtual void PoppedDown ()
 
virtual void PoppedUp ()
 

Detailed Description

Definition at line 44 of file FWModelContextMenuHandler.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 47 of file FWModelContextMenuHandler.cc.

47  :
48  TGPopupMenu(p, w, h, options)
49  {
50  AddInput(kKeyPressMask);
51  }
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

Member Function Documentation

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

Definition at line 73 of file FWModelContextMenuHandler.cc.

References tmp.

74  {
75  if (event->fType != kGKeyPress) return kTRUE;
76 
77  UInt_t keysym;
78  char tmp[2];
79  gVirtualX->LookupString(event, tmp, sizeof(tmp), keysym);
80 
81  TGMenuEntry *ce = fCurrent;
82 
83  switch (keysym)
84  {
85  case kKey_Up:
86  {
87  if (ce) ce = (TGMenuEntry*)GetListOfEntries()->Before(ce);
88  while (ce && ((ce->GetType() == kMenuSeparator) ||
89  (ce->GetType() == kMenuLabel) ||
90  !(ce->GetStatus() & kMenuEnableMask)))
91  {
92  ce = (TGMenuEntry*)GetListOfEntries()->Before(ce);
93  }
94  if (!ce) ce = (TGMenuEntry*)GetListOfEntries()->Last();
95  Activate(ce);
96  break;
97  }
98  case kKey_Down:
99  {
100  if (ce) ce = (TGMenuEntry*)GetListOfEntries()->After(ce);
101  while (ce && ((ce->GetType() == kMenuSeparator) ||
102  (ce->GetType() == kMenuLabel) ||
103  !(ce->GetStatus() & kMenuEnableMask)))
104  {
105  ce = (TGMenuEntry*)GetListOfEntries()->After(ce);
106  }
107  if (!ce) ce = (TGMenuEntry*)GetListOfEntries()->First();
108  Activate(ce);
109  break;
110  }
111  case kKey_Enter:
112  case kKey_Return:
113  {
114  Event_t ev;
115  ev.fType = kButtonRelease;
116  ev.fWindow = fId;
117  return HandleButton(&ev);
118  }
119  case kKey_Escape:
120  {
121  fCurrent = 0;
122  void *dummy = 0;
123  return EndMenu(dummy);
124  }
125  default:
126  {
127  break;
128  }
129  }
130 
131  return kTRUE;
132  }
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
unsigned int UInt_t
Definition: FUTypes.h:12
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
virtual void FWPopupMenu::PoppedDown ( )
inlinevirtual

Definition at line 67 of file FWModelContextMenuHandler.cc.

References prof2calltree::l.

68  {
69  gVirtualX->GrabKey(fId, 0l, kAnyModifier, kFALSE);
70  TGPopupMenu::PoppedDown();
71  }
virtual void FWPopupMenu::PoppedUp ( )
inlinevirtual

Definition at line 59 of file FWModelContextMenuHandler.cc.

References prof2calltree::l.

60  {
61  TGPopupMenu::PoppedUp();
62  gVirtualX->SetInputFocus(fId);
63  gVirtualX->GrabKey(fId, 0l, kAnyModifier, kTRUE);
64 
65  }