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

<refnamediv>
<refname>GnomeDbSelector</refname><refpurpose>Individual selection of libgnomedb objects (data types, functions, ...)</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>

<synopsis>



struct      <link linkend="GnomeDbSelector-struct">GnomeDbSelector</link>;
struct      <link linkend="GnomeDbSelectorClass">GnomeDbSelectorClass</link>;
enum        <link linkend="GnomeDbSelectorFeature">GnomeDbSelectorFeature</link>;
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gnome-db-selector-new">gnome_db_selector_new</link>           (void);
<link linkend="void">void</link>        <link linkend="gnome-db-selector-add-part">gnome_db_selector_add_part</link>      (<link linkend="GnomeDbSelector">GnomeDbSelector</link> *sel,
                                             const <link linkend="gchar">gchar</link> *name,
                                             <link linkend="GnomeDbSelectorPart">GnomeDbSelectorPart</link> *part);
<link linkend="void">void</link>        <link linkend="gnome-db-selector-add-parts-for-feature">gnome_db_selector_add_parts_for_feature</link>
                                            (<link linkend="GnomeDbSelector">GnomeDbSelector</link> *sel,
                                             <link linkend="GdaMetaStore">GdaMetaStore</link> *store,
                                             <link linkend="GnomeDbSelectorFeature">GnomeDbSelectorFeature</link> feature);

</synopsis>
</refsynopsisdiv>

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

  <link linkend="GObject">GObject</link>
   +----<link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
         +----<link linkend="GtkObject">GtkObject</link>
               +----<link linkend="GtkWidget">GtkWidget</link>
                     +----<link linkend="GtkContainer">GtkContainer</link>
                           +----<link linkend="GtkTreeView">GtkTreeView</link>
                                 +----GnomeDbSelector
</synopsis>

</refsect1>



<refsect1>
<title>Implemented Interfaces</title>
<para>
GnomeDbSelector implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link> and  <link linkend="GtkBuildable">GtkBuildable</link>.</para>

</refsect1>



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

&quot;<link linkend="GnomeDbSelector-selected-object-changed">selected-object-changed</link>&quot;
            <link linkend="void">void</link>        user_function      (<link linkend="GnomeDbSelector">GnomeDbSelector</link> *dbselector,
                                            <link linkend="GnomeDbSelectorPart">GnomeDbSelectorPart</link> *arg1,
                                            <link linkend="GtkTreeStore">GtkTreeStore</link> *arg2,
                                            <link linkend="gpointer">gpointer</link> arg3,
                                            <link linkend="gpointer">gpointer</link> user_data);
</synopsis>
</refsect1>


<refsect1>
<title>Description</title>
<para>
This widget presents the user with a (configurable) list of objects to choose from: Data types, functions,
aggregates, ...
</para>
<para>
What really gets displayed in the widget (columns and rows) depends on the parameters passed to the <link linkend="gnome-db-selector-new"><function>gnome_db_selector_new()</function></link> function.

</para>
</refsect1>

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

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

	GtkTreeViewClass    parent_class;
	void              (*selected_object_changed) (GnomeDbSelector *sel, GnomeDbSelectorPart *part, 
						      GtkTreeStore *store, GtkTreeIter *iter);
};
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="GnomeDbSelectorFeature"/>enum GnomeDbSelectorFeature</title>
<indexterm><primary>GnomeDbSelectorFeature</primary></indexterm><programlisting>typedef enum {
	GNOME_DB_SELECTOR_FEATURE_NONE = 0,
	GNOME_DB_SELECTOR_FEATURE_SCHEMAS = 1 &lt;&lt; 0,
	GNOME_DB_SELECTOR_FEATURE_SCHEMA_TABLES = 1 &lt;&lt; 1,
	GNOME_DB_SELECTOR_FEATURE_SCHEMA_VIEWS = 1 &lt;&lt; 2,
	GNOME_DB_SELECTOR_FEATURE_SCHEMA_DOMAINS = 1 &lt;&lt; 3,

	GNOME_DB_SELECTOR_FEATURE_SCHEMA_TABLE_COLUMNS = 1 &lt;&lt; 4,
	GNOME_DB_SELECTOR_FEATURE_SCHEMA_TABLE_CONSTRAINTS = 1 &lt;&lt; 5,
	GNOME_DB_SELECTOR_FEATURE_SCHEMA_TABLE_TRIGGERS = 1 &lt;&lt; 6,
	
	GNOME_DB_SELECTOR_FEATURE_SCHEMA_TABLE_DETAILS = (GNOME_DB_SELECTOR_FEATURE_SCHEMA_TABLE_COLUMNS | GNOME_DB_SELECTOR_FEATURE_SCHEMA_TABLE_CONSTRAINTS | GNOME_DB_SELECTOR_FEATURE_SCHEMA_TABLE_TRIGGERS),

	GNOME_DB_SELECTOR_FEATURE_SCHEMA_VIEW_COLUMNS = 1 &lt;&lt; 7,
	GNOME_DB_SELECTOR_FEATURE_SCHEMA_VIEW_DETAILS = (GNOME_DB_SELECTOR_FEATURE_SCHEMA_VIEW_COLUMNS)
} GnomeDbSelectorFeature;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="gnome-db-selector-new"/>gnome_db_selector_new ()</title>
<indexterm><primary>gnome_db_selector_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>*  gnome_db_selector_new           (void);</programlisting>
<para>
Creates a new <link linkend="GnomeDbSelector"><type>GnomeDbSelector</type></link> widget. If <parameter>features</parameter> is different than GNOME_DB_SELECTOR_FEATURE_NONE
then some <link linkend="GnomeDbSelectorPart"><type>GnomeDbSelectorPart</type></link> will be created and inserted by default in the new selector widget,
avoiding much hand written code.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the new widget
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-db-selector-add-part"/>gnome_db_selector_add_part ()</title>
<indexterm><primary>gnome_db_selector_add_part</primary></indexterm><programlisting><link linkend="void">void</link>        gnome_db_selector_add_part      (<link linkend="GnomeDbSelector">GnomeDbSelector</link> *sel,
                                             const <link linkend="gchar">gchar</link> *name,
                                             <link linkend="GnomeDbSelectorPart">GnomeDbSelectorPart</link> *part);</programlisting>
<para>
</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>sel</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeDbSelector"><type>GnomeDbSelector</type></link> widget
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeDbSelectorPart"><type>GnomeDbSelectorPart</type></link> object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-db-selector-add-parts-for-feature"/>gnome_db_selector_add_parts_for_feature ()</title>
<indexterm><primary>gnome_db_selector_add_parts_for_feature</primary></indexterm><programlisting><link linkend="void">void</link>        gnome_db_selector_add_parts_for_feature
                                            (<link linkend="GnomeDbSelector">GnomeDbSelector</link> *sel,
                                             <link linkend="GdaMetaStore">GdaMetaStore</link> *store,
                                             <link linkend="GnomeDbSelectorFeature">GnomeDbSelectorFeature</link> feature);</programlisting>
<para>
Adds some predefined parts to <parameter>sel</parameter> to implement some features</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>sel</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeDbSelector"><type>GnomeDbSelector</type></link> widget
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>store</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GdaMetaStore"><type>GdaMetaStore</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>feature</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeDbSelectorFeature"><type>GnomeDbSelectorFeature</type></link> feature
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>

<refsect1>
<title>Signals</title>
<refsect2><title><anchor id="GnomeDbSelector-selected-object-changed"/>The &quot;selected-object-changed&quot; signal</title>
<programlisting><link linkend="void">void</link>        user_function                  (<link linkend="GnomeDbSelector">GnomeDbSelector</link> *dbselector,
                                            <link linkend="GnomeDbSelectorPart">GnomeDbSelectorPart</link> *arg1,
                                            <link linkend="GtkTreeStore">GtkTreeStore</link> *arg2,
                                            <link linkend="gpointer">gpointer</link> arg3,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>dbselector</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>arg3</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>
</refsect1>



</refentry>
