Tuix Guide logo Tuix Guide


Event Propagation

It’s worth taking a moment to understand how events propagate through tuix. Each application loop, sent events get put into a queue. On the next loop iteration, the events are flushed from the queue and sent to the corresponding targets one by one in the order of the hierarchy.

The hierarchy is a tree which contains all of the widgets in the application. The window is at the root of the tree and widgets and their children make up the branches and leaves. For example, an application with a window, a container, and a widget within the container would look like this in the hierarchy:

// Image here

There are four types of event propagation: