I have finished the work on the render buffer and basic message pump of my console user interface framework, but now I have to propagate events to all the widgets (controls) on the screen.
Apparently I have two options:
or
How would you go about it?
It's hard to give a definitive answer without knowing more about your framework, but I think registering all your widgets and message pump with some kind of mediator class would be the best option. If you try propagating your events through a hierarchy it could get very messy and your event-handling logic is going to be spread all over the place, making for unmaintainable code.