<refentry id="GnomeDbCanvasDbRelations">
<refmeta>
<refentrytitle>GnomeDbCanvasDbRelations</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGNOMEDB-4.0 Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GnomeDbCanvasDbRelations</refname><refpurpose>Graphical representation of the relations (foreign key constreints) in the database.</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>

<synopsis>



<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gnome-db-canvas-db-relations-new">gnome_db_canvas_db_relations_new</link>
                                            (<link linkend="GdaMetaStore">GdaMetaStore</link> *store);
<link linkend="GnomeDbCanvasTable">GnomeDbCanvasTable</link>* <link linkend="gnome-db-canvas-db-relations-get-table-item">gnome_db_canvas_db_relations_get_table_item</link>
                                            (<link linkend="GnomeDbCanvasDbRelations">GnomeDbCanvasDbRelations</link> *canvas,
                                             <link linkend="GdaMetaTable">GdaMetaTable</link> *table);
<link linkend="GnomeDbCanvasTable">GnomeDbCanvasTable</link>* <link linkend="gnome-db-canvas-db-relations-add-table-item">gnome_db_canvas_db_relations_add_table_item</link>
                                            (<link linkend="GnomeDbCanvasDbRelations">GnomeDbCanvasDbRelations</link> *canvas,
                                             const <link linkend="GValue">GValue</link> *table_catalog,
                                             const <link linkend="GValue">GValue</link> *table_schema,
                                             const <link linkend="GValue">GValue</link> *table_name);

</synopsis>
</refsynopsisdiv>









<refsect1>
<title>Description</title>
<para>
This object uses a <link linkend="GdaGraph"><type>GdaGraph</type></link> object to be able to tell which table is displayed,
and where on the canvas.
</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gnome-db-canvas-db-relations-new"/>gnome_db_canvas_db_relations_new ()</title>
<indexterm><primary>gnome_db_canvas_db_relations_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>*  gnome_db_canvas_db_relations_new
                                            (<link linkend="GdaMetaStore">GdaMetaStore</link> *store);</programlisting>
<para>
Creates a new canvas widget to display the relations between the database's tables.
The database is the one managed by the <link linkend="GdaDict"><type>GdaDict</type></link> object which <parameter>graph</parameter> refers.
</para>
<para>
After the <link linkend="GnomeDbCanvasDbRelations"><type>GnomeDbCanvasDbRelations</type></link> has been created, it is possible to display
the tables as listed in a <link linkend="GdaGdaph"><type>GdaGdaph</type></link> by setting the "graph" property (using <link linkend="g-object-set"><function>g_object_set()</function></link>).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>store</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a new <link linkend="GnomeDbCanvasDbRelations"><type>GnomeDbCanvasDbRelations</type></link> widget
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-db-canvas-db-relations-get-table-item"/>gnome_db_canvas_db_relations_get_table_item ()</title>
<indexterm><primary>gnome_db_canvas_db_relations_get_table_item</primary></indexterm><programlisting><link linkend="GnomeDbCanvasTable">GnomeDbCanvasTable</link>* gnome_db_canvas_db_relations_get_table_item
                                            (<link linkend="GnomeDbCanvasDbRelations">GnomeDbCanvasDbRelations</link> *canvas,
                                             <link linkend="GdaMetaTable">GdaMetaTable</link> *table);</programlisting>
<para>
</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>canvas</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>table</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-db-canvas-db-relations-add-table-item"/>gnome_db_canvas_db_relations_add_table_item ()</title>
<indexterm><primary>gnome_db_canvas_db_relations_add_table_item</primary></indexterm><programlisting><link linkend="GnomeDbCanvasTable">GnomeDbCanvasTable</link>* gnome_db_canvas_db_relations_add_table_item
                                            (<link linkend="GnomeDbCanvasDbRelations">GnomeDbCanvasDbRelations</link> *canvas,
                                             const <link linkend="GValue">GValue</link> *table_catalog,
                                             const <link linkend="GValue">GValue</link> *table_schema,
                                             const <link linkend="GValue">GValue</link> *table_name);</programlisting>
<para>
Add a table to <parameter>canvas</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>canvas</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeDbCanvasDbRelations"><type>GnomeDbCanvasDbRelations</type></link> canvas
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>table_catalog</parameter>&nbsp;:</term>
<listitem><simpara> the catalog in which the table is, or <literal>NULL</literal>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>table_schema</parameter>&nbsp;:</term>
<listitem><simpara> the schema in which the table is, or <literal>NULL</literal>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>table_name</parameter>&nbsp;:</term>
<listitem><simpara> the table's name
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the corresponding canvas item, or <literal>NULL</literal> if the table was not found.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
