handling of keyboard X-events

From: Pasha Murat (murat@cdfsga.fnal.gov)
Date: Sun Nov 30 1997 - 07:14:41 MET


	Some time ago I already asked this question 
(see "question on TCanvas::HandleInput" in roottalk digest, sorry for 
repeating it again:

is it intentional that TCanvas::HandleInput doesn't have a default for
an X/Win event? Right now if an event is different from a small number 
of events generated by mouse (press-left-button, move mouse, release-left-button 
etc) TCanvas::HandleInput just returns. For example it is not possible to 
process a keyboard X-event in MyObject::ExecuteEvent() simply because it 
never gets there... 

It might make sense to have a default processing of X/Win event which would 
just pass this event to the picked object ExecuteEvent method. Then it would 
be a selected object (and not a canvas itself!) which decides whether or not 
this event has to be processed. The modification would look like this:

TCanvas::HandleInput(..) {
.. snip

	case kButton1Down:
	... snip
	default:
	  
          fSelectedPad = 0;
          pickobj      = 0;
          pad = Pick(px, py, pickobj);
          if (!pad) return;
          fSelectedPad = pad;
          gPad = pad;
	  fSelected = pickobj;
	  if (fSelected) {
            fSelected->ExecuteEvent(event, px, py);
          }
        }
..snip
}

This feature is extremely useful for different shorthands and Working on event 
display prototype I'm really missing it.
						Regards, Pasha.



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:22 MET