gem-graph-client/doc/docbook/d0/d09/main_8c.xml

130 lines
6.0 KiB
XML
Raw Normal View History

<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_main_8c" xml:lang="en-US">
<title>src/main.c File Reference</title>
<indexterm><primary>src/main.c</primary></indexterm>
<para>
<para>Gem-graph-client main file. </para>
</para>
2024-10-25 22:12:02 +02:00
<programlisting linenumbering="unnumbered">#include &quot;../include/fsm.h&quot;<?linebreak?>#include &quot;../include/signal.h&quot;<?linebreak?>#include &quot;../include/widget.h&quot;<?linebreak?></programlisting>Include dependency graph for main.c:<para>
<informalfigure>
<mediaobject>
<imageobject>
<imagedata width="50%" align="center" valign="middle" scalefit="0" fileref="../../d4/d00/main_8c__incl.svg"></imagedata>
2024-10-25 22:12:02 +02:00
</imageobject>
</mediaobject>
</informalfigure>
</para>
<simplesect>
<title>Functions </title>
<itemizedlist>
<listitem><para>int <link linkend="_main_8c_1a3c04138a5bfe5d72780bb7e82a18e627">main</link> (int argc, char **argv)</para>
</listitem>
</itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>
<para>Gem-graph-client main file. </para>
<para>This file is part of Gem-graph. It contains only the <link linkend="_main_8c_1a3c04138a5bfe5d72780bb7e82a18e627">main()</link> function.</para>
<para><informaltable frame='bottom'><tgroup cols='1'><colspec align='center'/><tbody><row><entry align='center'>
</entry></row></tbody></tgroup></informaltable>
</para>
<para>The <link linkend="_main_8c_1a3c04138a5bfe5d72780bb7e82a18e627">main()</link> function <emphasis role="bold">initialises</emphasis> the log, the finite state machine (fsm), the application and the windows and <emphasis role="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><informaltable frame='bottom'><tgroup cols='1'><colspec align='center'/><tbody><row><entry align='center'>
</entry></row></tbody></tgroup></informaltable>
</para>
<para>The code files are all located in the src (sources) directory (the headers in &apos;include&apos;). They are divided into several <emphasis role="bold">types of organisation</emphasis>:</para>
<para><itemizedlist>
<listitem>
<para><emphasis>hierarchical</emphasis>: the widgets that give the windows their appearance are organised in the form of a tree. Windows are the first level of depth. Next come the title bar and the pages designed to occupy the window space below the title bar. Each of these pages has its own hierarchical structure: it can be divided into horizontal or vertical strips, which can themselves be divided in the same way, with varying levels of depth right down to the last boxes, which contain lists of widgets such as buttons, sliders or images.</para>
</listitem><listitem>
<para><emphasis>list</emphasis>: the main <emphasis>sections</emphasis> of the fsm (finite state machine) constitute a list of at least four elements, each of which defines a set of possible states :<orderedlist>
<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></orderedlist>
The state of the fsm is uniquely defined at all times by all the parameters listed in these sections. All program actions depend on this state.</para>
</listitem><listitem>
<para><emphasis>transversal</emphasis>: the other functions that must be easily accessible by all the previous functions. They are therefore all located at the root. These are the functions that manage graphics, callbacks, utilities and the log.</para>
</listitem></itemizedlist>
</para>
<para><informaltable frame='bottom'><tgroup cols='1'><colspec align='center'/><tbody><row><entry align='center'>
</entry></row></tbody></tgroup></informaltable>
</para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_main_8c_1a3c04138a5bfe5d72780bb7e82a18e627"/><section>
<title>main()</title>
<indexterm><primary>main</primary><secondary>main.c</secondary></indexterm>
<indexterm><primary>main.c</primary><secondary>main</secondary></indexterm>
<para><computeroutput>int main (int argc, char ** argv)</computeroutput></para>
<para><formalpara><title>Since</title>
<para>2024-04</para>
</formalpara>
<formalpara><title>See also</title>
<para>src/fsm/dispatch/fsm_init() </para>
<para>src/widget/dispatch/on_windows_activation(app)</para>
</formalpara>
<formalpara>
<title>
Parameters</title>
<para>
<table frame="all">
<tgroup cols="2" align="left" colsep="1" rowsep="1">
<colspec colwidth="1*"/>
<colspec colwidth="4*"/>
<tbody>
<row>
<entry>argc</entry><entry>
<para></para>
</entry>
</row>
<row>
<entry>**argv</entry><entry>
<para></para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
<formalpara><title>Returns</title>
<para>status, the program errorlevel </para>
</formalpara>
</para>
2024-10-25 22:12:02 +02:00
Here is the call graph for this function:<para>
<informalfigure>
<mediaobject>
<imageobject>
<imagedata width="50%" align="center" valign="middle" scalefit="0" fileref="../../d0/d09/main_8c_a3c04138a5bfe5d72780bb7e82a18e627_cgraph.svg"></imagedata>
2024-10-25 22:12:02 +02:00
</imageobject>
</mediaobject>
</informalfigure>
</para>
</section>
</section>
</section>