<para>The <linklinkend="_main_8c_1a3c04138a5bfe5d72780bb7e82a18e627">main()</link> function <emphasisrole="bold">initialises</emphasis> the log, the finite state machine (fsm), the application and the windows and <emphasisrole="bold">closes</emphasis> all the elements it opened before the end of program execution.</para>
<para>By default, the main window opens on the overview page of the current model as specified in: src/widget/main_window/designer/widget_design_main_window().</para>
<para>The widgets that give the windows their appearance are organised in a tree-like <emphasis>hierarchy</emphasis>.</para>
</listitem><listitem>
<para>The fsm (finite state machine), which controls the program's actions and indicates its state at all times, contains the following main <emphasis>sections</emphasis>:<itemizedlist>
<listitem>
<para>execute or edit (managing the appropriate tools states in both cases)</para>
</listitem><listitem>
<para>measure, operate on data, prepare displayable results</para>
</listitem><listitem>
<para>apply user preferences</para>
</listitem><listitem>
<para>indicate the desired state of windows and widgets</para>
</listitem></itemizedlist>
</para>
</listitem><listitem>
<para>The other functions are those that manage graphics, callbacks, utilities and the log. They are called <emphasis>transversal</emphasis> because they must be easily accessed by all the preceding functions. They therefore remain at the root (src). </para>