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 () |
Definition at line 44 of file FWModelContextMenuHandler.cc.
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.
virtual Bool_t FWPopupMenu::HandleKey | ( | Event_t * | event | ) | [inline, virtual] |
Definition at line 73 of file FWModelContextMenuHandler.cc.
References tmp.
{ if (event->fType != kGKeyPress) return kTRUE; UInt_t keysym; char tmp[2]; gVirtualX->LookupString(event, tmp, sizeof(tmp), keysym); TGMenuEntry *ce = fCurrent; switch (keysym) { case kKey_Up: { if (ce) ce = (TGMenuEntry*)GetListOfEntries()->Before(ce); while (ce && ((ce->GetType() == kMenuSeparator) || (ce->GetType() == kMenuLabel) || !(ce->GetStatus() & kMenuEnableMask))) { ce = (TGMenuEntry*)GetListOfEntries()->Before(ce); } if (!ce) ce = (TGMenuEntry*)GetListOfEntries()->Last(); Activate(ce); break; } case kKey_Down: { if (ce) ce = (TGMenuEntry*)GetListOfEntries()->After(ce); while (ce && ((ce->GetType() == kMenuSeparator) || (ce->GetType() == kMenuLabel) || !(ce->GetStatus() & kMenuEnableMask))) { ce = (TGMenuEntry*)GetListOfEntries()->After(ce); } if (!ce) ce = (TGMenuEntry*)GetListOfEntries()->First(); Activate(ce); break; } case kKey_Enter: case kKey_Return: { Event_t ev; ev.fType = kButtonRelease; ev.fWindow = fId; return HandleButton(&ev); } case kKey_Escape: { fCurrent = 0; void *dummy = 0; return EndMenu(dummy); } default: { break; } } return kTRUE; }
virtual void FWPopupMenu::PoppedDown | ( | ) | [inline, virtual] |
Definition at line 67 of file FWModelContextMenuHandler.cc.
References prof2calltree::l.
{ gVirtualX->GrabKey(fId, 0l, kAnyModifier, kFALSE); TGPopupMenu::PoppedDown(); }
virtual void FWPopupMenu::PoppedUp | ( | ) | [inline, virtual] |
Definition at line 59 of file FWModelContextMenuHandler.cc.
References prof2calltree::l.
{ TGPopupMenu::PoppedUp(); gVirtualX->SetInputFocus(fId); gVirtualX->GrabKey(fId, 0l, kAnyModifier, kTRUE); }