3.3. The dynamic part of a module : the viewer

The dynamic part starts with the constructor of the viewer. It is called by the main window when the corresponding button or menu item is selected. See h_guicontrolflow() from control flow viewer eventhooks.c for an example. It does basic connexion to the tab's events available : time window change notification, current time notification, redraw notification, continue notification. All these function should be implemented in your viewer if you want the data you shown to be synchronised with the main window and the other viewers. It also calls the background computation, which will be discussed in the next section.

This is also at this point that the viewer does create it's own memory footprint : its inner structure. This structure will have to be passed as hook_data to each function registered by the viewer : this is what makes the functions "belong" to this instance of the viewer.