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

<refnamediv>
<refname>GnomeDbCanvasItem</refname><refpurpose>Base class for all the <link linkend="GnomeCanvasItem"><type>GnomeCanvasItem</type></link> derived widgets in libgnomedb.</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>

<synopsis>



struct      <link linkend="GnomeDbCanvasItem-struct">GnomeDbCanvasItem</link>;
struct      <link linkend="GnomeDbCanvasItemClass">GnomeDbCanvasItemClass</link>;
<link linkend="GnomeDbCanvas">GnomeDbCanvas</link>* <link linkend="gnome-db-canvas-item-get-canvas">gnome_db_canvas_item_get_canvas</link>
                                            (<link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> *item);
<link linkend="GnomeDbGraphItem">GnomeDbGraphItem</link>* <link linkend="gnome-db-canvas-item-get-graph-item">gnome_db_canvas_item_get_graph_item</link>
                                            (<link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> *item);
<link linkend="void">void</link>        <link linkend="gnome-db-canvas-item-get-edge-nodes">gnome_db_canvas_item_get_edge_nodes</link>
                                            (<link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> *item,
                                             <link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> **from,
                                             <link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> **to);

</synopsis>
</refsynopsisdiv>

<refsect1>
<title>Object Hierarchy</title>
<synopsis>

  <link linkend="GObject">GObject</link>
   +----<link linkend="GooCanvasItemSimple">GooCanvasItemSimple</link>
         +----<link linkend="GooCanvasGroup">GooCanvasGroup</link>
               +----GnomeDbCanvasItem
                     +----<link linkend="GnomeDbCanvasText">GnomeDbCanvasText</link>
                     +----<link linkend="GnomeDbCanvasCursor">GnomeDbCanvasCursor</link>
                     +----<link linkend="GnomeDbCanvasFkey">GnomeDbCanvasFkey</link>
                     +----<link linkend="GnomeDbCanvasTable">GnomeDbCanvasTable</link>
</synopsis>

</refsect1>



<refsect1>
<title>Implemented Interfaces</title>
<para>
GnomeDbCanvasItem implements
 <link linkend="GooCanvasItem">GooCanvasItem</link>.</para>

</refsect1>


<refsect1>
<title>Properties</title>
<synopsis>

  &quot;<link linkend="GnomeDbCanvasItem--allow-drag">allow-drag</link>&quot;           <link linkend="gboolean">gboolean</link>             : Read / Write
  &quot;<link linkend="GnomeDbCanvasItem--allow-move">allow-move</link>&quot;           <link linkend="gboolean">gboolean</link>             : Read / Write
  &quot;<link linkend="GnomeDbCanvasItem--graph-item">graph-item</link>&quot;           <link linkend="GnomeDbGraphItem">GnomeDbGraphItem</link>     : Read / Write
  &quot;<link linkend="GnomeDbCanvasItem--tip-text">tip-text</link>&quot;             <link linkend="gchararray">gchararray</link>           : Read / Write
</synopsis>
</refsect1>

<refsect1>
<title>Signal Prototypes</title>
<synopsis>

&quot;<link linkend="GnomeDbCanvasItem-destroy">destroy</link>&quot;   <link linkend="void">void</link>        user_function      (<link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> *dbcanvasitem,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GnomeDbCanvasItem-drag-action">drag-action</link>&quot;
            <link linkend="void">void</link>        user_function      (<link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> *dbcanvasitem,
                                            <link linkend="gpointer">gpointer</link> arg1,
                                            <link linkend="gpointer">gpointer</link> arg2,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GnomeDbCanvasItem-moved">moved</link>&quot;     <link linkend="void">void</link>        user_function      (<link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> *dbcanvasitem,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GnomeDbCanvasItem-moving">moving</link>&quot;    <link linkend="void">void</link>        user_function      (<link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> *dbcanvasitem,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GnomeDbCanvasItem-shifted">shifted</link>&quot;   <link linkend="void">void</link>        user_function      (<link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> *dbcanvasitem,
                                            <link linkend="gpointer">gpointer</link> user_data);
</synopsis>
</refsect1>


<refsect1>
<title>Description</title>
<para>
This object adds some functionnalities on top of the  <link linkend="GnomeCanvasItem"><type>GnomeCanvasItem</type></link> objects such as
synchronisation with a <link linkend="GdaGraphItem"><type>GdaGraphItem</type></link> object (to have a persistent position on the canvas), the
ability to be moved on the canvas, and the ability to initiate and report simple drag and drop
within the canvas.
</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GnomeDbCanvasItem-struct"/>struct GnomeDbCanvasItem</title>
<indexterm><primary>GnomeDbCanvasItem</primary></indexterm><programlisting>struct GnomeDbCanvasItem;</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="GnomeDbCanvasItemClass"/>struct GnomeDbCanvasItemClass</title>
<indexterm><primary>GnomeDbCanvasItemClass</primary></indexterm><programlisting>struct GnomeDbCanvasItemClass {

	GooCanvasGroupClass    parent_class;

	/* signals */
	void (*moved)        (GnomeDbCanvasItem *citem);
	void (*moving)       (GnomeDbCanvasItem *citem);
	void (*shifted)      (GnomeDbCanvasItem *citem);
	void (*drag_action)  (GnomeDbCanvasItem *citem, GnomeDbCanvasItem * dragged_from, GnomeDbCanvasItem * dragged_to);
	void (*destroy)      (GnomeDbCanvasItem *citem);

	/* virtual functions */
	void (*extra_event)  (GnomeDbCanvasItem *citem, GdkEventType event_type);
	void (*get_edge_nodes)(GnomeDbCanvasItem *citem, GnomeDbCanvasItem **from, GnomeDbCanvasItem **to);
};
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="gnome-db-canvas-item-get-canvas"/>gnome_db_canvas_item_get_canvas ()</title>
<indexterm><primary>gnome_db_canvas_item_get_canvas</primary></indexterm><programlisting><link linkend="GnomeDbCanvas">GnomeDbCanvas</link>* gnome_db_canvas_item_get_canvas
                                            (<link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> *item);</programlisting>
<para>
Get the <link linkend="GnomeDbCanvas"><type>GnomeDbCanvas</type></link> on which <parameter>item</parameter> is drawn</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>item</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeDbCanvasItem"><type>GnomeDbCanvasItem</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the <link linkend="GnomeDbCanvas"><type>GnomeDbCanvas</type></link> widget
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-db-canvas-item-get-graph-item"/>gnome_db_canvas_item_get_graph_item ()</title>
<indexterm><primary>gnome_db_canvas_item_get_graph_item</primary></indexterm><programlisting><link linkend="GnomeDbGraphItem">GnomeDbGraphItem</link>* gnome_db_canvas_item_get_graph_item
                                            (<link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> *item);</programlisting>
<para>
Get the associated <link linkend="GnomeDbGraphItem"><type>GnomeDbGraphItem</type></link> to <parameter>item</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>item</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeDbCanvasItem"><type>GnomeDbCanvasItem</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the <link linkend="GnomeDbGraphItem"><type>GnomeDbGraphItem</type></link>, or <literal>NULL</literal>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-db-canvas-item-get-edge-nodes"/>gnome_db_canvas_item_get_edge_nodes ()</title>
<indexterm><primary>gnome_db_canvas_item_get_edge_nodes</primary></indexterm><programlisting><link linkend="void">void</link>        gnome_db_canvas_item_get_edge_nodes
                                            (<link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> *item,
                                             <link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> **from,
                                             <link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> **to);</programlisting>
<para>
If the <parameter>item</parameter> canvas item represents a "link" between two other canvas items (an edge), then
set <parameter>from</parameter> and <parameter>to</parameter> to those items.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>item</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeDbCanvasItem"><type>GnomeDbCanvasItem</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>from</parameter>&nbsp;:</term>
<listitem><simpara> a place to store the FROM part of the edge, or <literal>NULL</literal>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>to</parameter>&nbsp;:</term>
<listitem><simpara> a place to store the TO part of the edge, or <literal>NULL</literal>
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>
<refsect1>
<title>Properties</title>
<variablelist>
<varlistentry><term><anchor id="GnomeDbCanvasItem--allow-drag"/>&quot;<literal>allow-drag</literal>&quot; (<link linkend="gboolean">gboolean</link> : Read / Write)</term>
<listitem>
<para></para>
</listitem></varlistentry>
<varlistentry><term><anchor id="GnomeDbCanvasItem--allow-move"/>&quot;<literal>allow-move</literal>&quot; (<link linkend="gboolean">gboolean</link> : Read / Write)</term>
<listitem>
<para></para>
</listitem></varlistentry>
<varlistentry><term><anchor id="GnomeDbCanvasItem--graph-item"/>&quot;<literal>graph-item</literal>&quot; (<link linkend="GnomeDbGraphItem">GnomeDbGraphItem</link> : Read / Write)</term>
<listitem>
<para></para>
</listitem></varlistentry>
<varlistentry><term><anchor id="GnomeDbCanvasItem--tip-text"/>&quot;<literal>tip-text</literal>&quot; (<link linkend="gchararray">gchararray</link> : Read / Write)</term>
<listitem>
<para></para>
</listitem></varlistentry>

</variablelist>
</refsect1>

<refsect1>
<title>Signals</title>
<refsect2><title><anchor id="GnomeDbCanvasItem-destroy"/>The &quot;destroy&quot; signal</title>
<programlisting><link linkend="void">void</link>        user_function                  (<link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> *dbcanvasitem,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>dbcanvasitem</parameter>&nbsp;:</term>
<listitem><simpara>the object which received the signal.

</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2><title><anchor id="GnomeDbCanvasItem-drag-action"/>The &quot;drag-action&quot; signal</title>
<programlisting><link linkend="void">void</link>        user_function                  (<link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> *dbcanvasitem,
                                            <link linkend="gpointer">gpointer</link> arg1,
                                            <link linkend="gpointer">gpointer</link> arg2,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>dbcanvasitem</parameter>&nbsp;:</term>
<listitem><simpara>the object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg2</parameter>&nbsp;:</term>
<listitem><simpara>

</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2><title><anchor id="GnomeDbCanvasItem-moved"/>The &quot;moved&quot; signal</title>
<programlisting><link linkend="void">void</link>        user_function                  (<link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> *dbcanvasitem,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>dbcanvasitem</parameter>&nbsp;:</term>
<listitem><simpara>the object which received the signal.

</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2><title><anchor id="GnomeDbCanvasItem-moving"/>The &quot;moving&quot; signal</title>
<programlisting><link linkend="void">void</link>        user_function                  (<link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> *dbcanvasitem,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>dbcanvasitem</parameter>&nbsp;:</term>
<listitem><simpara>the object which received the signal.

</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2><title><anchor id="GnomeDbCanvasItem-shifted"/>The &quot;shifted&quot; signal</title>
<programlisting><link linkend="void">void</link>        user_function                  (<link linkend="GnomeDbCanvasItem">GnomeDbCanvasItem</link> *dbcanvasitem,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>dbcanvasitem</parameter>&nbsp;:</term>
<listitem><simpara>the object which received the signal.

</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>



</refentry>
