Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - PtRaw overlayed widgets and Raw Events: (3 Items)
   
PtRaw overlayed widgets and Raw Events  
Let's have 2-3 PtRaw Widgets overlaying each other.
I need to handle Raw events as Ph_EV_XXXXXX in each one of the widgets differently. 
My question is how to setup/create the widgets so that each one of them gets these kind of events. Right now with my 
setting, only the topmost widget gets the events and looks like consumes them.
Thanks,
Re: PtRaw overlayed widgets and Raw Events  
I know I can forward the Ph_EVXXXX by PtSendEventToWidget(), but that approach needs registering of handlers for all 
type of events needed by all of the overlaid widgets at the upper one, and the from the upper one redistributing to the 
brothers behind. 
My question is if there is another better way by setup/creation of the widgets and not implementing forwarding logic?
Re: PtRaw overlayed widgets and Raw Events  
You may want to create a PtRegion or PhRegion to collect the events. I guess you need just one region that overlays your
 widgets (I assume that they have the same position and the size):
- Make it sensitive to all types of events that you need. 
- Opaque to nothing. 
- You will need to position it (if your Raw widgets move)
- Attach just one raw callback and process your events.

Another approach is to have a Pt_CB_FILTER callback attached to the window to see all the raw events.