Custom event forwarding

Nicholas Bastin nbastin at mac.com
Sun Nov 11 23:50:14 PST 2007


On 12 Nov , 2007, at 02:35 , Ishmagel wrote:

> I am building an app that contains a hierachy of windows. So basically
> i have a wxFrame containing a wxPanel, containing yet another wxPanel.
> I wish to do custom event handling, but i want the last wxPanel to
> receive events sent from the wxFrame. I know that the propagate will
> send the event to the parent window, but is it possible to send events
> the other way, from parent to all the children? My reason for wanting
> this, is that it will then be possible to let wxFrame control
> everything, and just send events out when new things happen, and then
> let the children decide what to do themselves, instead of having
> pointers to all the windows

I don't know if there's any way to do this in wx, but otherwise it  
sounds like a problem for a generic signals implementation.  Try  
boost::signal.  <http://www.boost.org/doc/html/signals.html>

--
Nick




More information about the wx-users mailing list