Hi,
for example in TGFrame.h are event functions like :
virtual Bool_t HandleButton(Event_t *) { return kFALSE; }
virtual Bool_t HandleDoubleClick(Event_t *) { return kFALSE; }
and so on …
why don’t you let the user access these events over the signal/slot mechanism like:
virtual Bool_t HandleButton(Event_t )
{ Emit("ButtonClicked(Event_t)", (Long_t)event); } //SIGNAL
Matthias
Hi Matthias,
you use TGFrame::ProcessedEvent(Event_t* event) signal for that
Regards. Valeriy
Hi Valeriy
In my opinion ProcessedEvent(Event_t*) only handles events like activating or resizing of the frame, but not events like button- , motion- or keyevents.
When i overwrite the Handle-functions of TGFrame, (HandleButton, HandleKey, …) and let them throw a signal as shown in my last post, then i can access all events.
Regards.
Matthias
Hi Matthias,
by default there is "embedded event filtering"
you will not receive any events untill the call TGFrame::AddInput
which used to specifiy what kind of events you want to catch.
For example, if you are interesting in button_press events
you’ll need to call
my_frame->AddInput(kButtonPressMask);
Regards. Valeriy
++
Of cause there are more “fancy things” there, like
GrabButton - your frame will receive all button press/release events
occured in any window on desktop
GrabPointer, GrabKey …