<refentry id="GnomeIconSelection" revision="20 Jun 2000">
<refmeta>
<refentrytitle>GnomeIconSelection</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GNOMEUI Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GnomeIconSelection</refname><refpurpose>
An icon listing/chooser display.</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>

#include &lt;gnome.h&gt;


struct      <link linkend="GnomeIconSelection-struct">GnomeIconSelection</link>;
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gnome-icon-selection-new">gnome_icon_selection_new</link>        (void);
void        <link linkend="gnome-icon-selection-add-defaults">gnome_icon_selection_add_defaults</link>
                                            (<link linkend="GnomeIconSelection">GnomeIconSelection</link> *gis);
void        <link linkend="gnome-icon-selection-add-directory">gnome_icon_selection_add_directory</link>
                                            (<link linkend="GnomeIconSelection">GnomeIconSelection</link> *gis,
                                             const <link linkend="gchar">gchar</link> *dir);
void        <link linkend="gnome-icon-selection-show-icons">gnome_icon_selection_show_icons</link> (<link linkend="GnomeIconSelection">GnomeIconSelection</link> *gis);
void        <link linkend="gnome-icon-selection-clear">gnome_icon_selection_clear</link>      (<link linkend="GnomeIconSelection">GnomeIconSelection</link> *gis,
                                             <link linkend="gboolean">gboolean</link> not_shown);
const <link linkend="gchar">gchar</link>* <link linkend="gnome-icon-selection-get-icon">gnome_icon_selection_get_icon</link>  (<link linkend="GnomeIconSelection">GnomeIconSelection</link> *gis,
                                             <link linkend="gboolean">gboolean</link> full_path);
void        <link linkend="gnome-icon-selection-select-icon">gnome_icon_selection_select_icon</link>
                                            (<link linkend="GnomeIconSelection">GnomeIconSelection</link> *gis,
                                             const <link linkend="gchar">gchar</link> *filename);

</synopsis>
</refsynopsisdiv>

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

  <link linkend="GtkObject">GtkObject</link>
   +----<link linkend="GtkWidget">GtkWidget</link>
         +----<link linkend="GtkContainer">GtkContainer</link>
               +----<link linkend="GtkBox">GtkBox</link>
                     +----<link linkend="GtkVBox">GtkVBox</link>
                           +----GnomeIconSelection
</synopsis>

</refsect1>




<refsect1>
<title>Description</title>
<para>
   This provides an icon chooser display.  
</para>
</refsect1>

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

</para></refsect2>
<refsect2>
<title><anchor id="gnome-icon-selection-new">gnome_icon_selection_new ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gnome_icon_selection_new        (void);</programlisting>
<para>
Creates a new icon selection widget, it uses GnomeIconList
for the listing of icons</para>
<para>

</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> Returns the new object
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-icon-selection-add-defaults">gnome_icon_selection_add_defaults ()</title>
<programlisting>void        gnome_icon_selection_add_defaults
                                            (<link linkend="GnomeIconSelection">GnomeIconSelection</link> *gis);</programlisting>
<para>
Adds the default pixmap directory into the selection
widget. It doesn't show the icons in the selection until you
do <link linkend="gnome-icon-selection-show-icons">gnome_icon_selection_show_icons</link>.</para>
<para>

</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>gis</parameter>&nbsp;:</entry>
<entry> GnomeIconSelection to work with
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-icon-selection-add-directory">gnome_icon_selection_add_directory ()</title>
<programlisting>void        gnome_icon_selection_add_directory
                                            (<link linkend="GnomeIconSelection">GnomeIconSelection</link> *gis,
                                             const <link linkend="gchar">gchar</link> *dir);</programlisting>
<para>
Adds the icons from the directory <parameter>dir</parameter> to the
selection widget. It doesn't show the icons in the selection
until you do <link linkend="gnome-icon-selection-show-icons">gnome_icon_selection_show_icons</link>.</para>
<para>

</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>gis</parameter>&nbsp;:</entry>
<entry> GnomeIconSelection to work with
</entry></row>
<row><entry align="right"><parameter>dir</parameter>&nbsp;:</entry>
<entry> directory with pixmaps
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-icon-selection-show-icons">gnome_icon_selection_show_icons ()</title>
<programlisting>void        gnome_icon_selection_show_icons (<link linkend="GnomeIconSelection">GnomeIconSelection</link> *gis);</programlisting>
<para>
Shows the icons inside the widget that
were added with <link linkend="gnome-icon-selection-add-defaults">gnome_icon_selection_add_defaults</link> and
<link linkend="gnome-icon-selection-add-directory">gnome_icon_selection_add_directory</link>. Before this function
is called the icons aren't actually added to the listing 
and can't be picked by the user.</para>
<para>

</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>gis</parameter>&nbsp;:</entry>
<entry> GnomeIconSelection to work with
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-icon-selection-clear">gnome_icon_selection_clear ()</title>
<programlisting>void        gnome_icon_selection_clear      (<link linkend="GnomeIconSelection">GnomeIconSelection</link> *gis,
                                             <link linkend="gboolean">gboolean</link> not_shown);</programlisting>
<para>
Clear the currently shown icons, the ones
that weren't shown yet are not cleared unless the not_shown
parameter is given, in which case even those are cleared.</para>
<para>

</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>gis</parameter>&nbsp;:</entry>
<entry> GnomeIconSelection to work with
</entry></row>
<row><entry align="right"><parameter>not_shown</parameter>&nbsp;:</entry>
<entry> boolean
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-icon-selection-get-icon">gnome_icon_selection_get_icon ()</title>
<programlisting>const <link linkend="gchar">gchar</link>* gnome_icon_selection_get_icon  (<link linkend="GnomeIconSelection">GnomeIconSelection</link> *gis,
                                             <link linkend="gboolean">gboolean</link> full_path);</programlisting>
<para>
Gets the currently selected icon name, if
full_path is true, it returns the full path to the icon,
if none is selected it returns NULL</para>
<para>

</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>gis</parameter>&nbsp;:</entry>
<entry> GnomeIconSelection to work with
</entry></row>
<row><entry align="right"><parameter>full_path</parameter>&nbsp;:</entry>
<entry> boolean
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> internal string, it must not be changed or freed
or NULL
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-icon-selection-select-icon">gnome_icon_selection_select_icon ()</title>
<programlisting>void        gnome_icon_selection_select_icon
                                            (<link linkend="GnomeIconSelection">GnomeIconSelection</link> *gis,
                                             const <link linkend="gchar">gchar</link> *filename);</programlisting>
<para>
Selects the icon <parameter>filename</parameter>. This icon must have
already been added and shown * (see <parameter>gnome_icon_selection_show_icons</parameter>)</para>
<para>

</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>gis</parameter>&nbsp;:</entry>
<entry> GnomeIconSelection to work with
</entry></row>
<row><entry align="right"><parameter>filename</parameter>&nbsp;:</entry>
<entry> icon filename
</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>



<refsect1>
<title>See Also</title>
<para>
<link linkend="GnomeIconEntry">GnomeIconEntry</link> widget; 
</para>
</refsect1>

</refentry>
