<refentry id="GnomePixmapEntry">
<refmeta>
<refentrytitle>GnomePixmapEntry</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GNOMEUI Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GnomePixmapEntry</refname><refpurpose>Entry widget for selection of large images.</refpurpose>
</refnamediv>

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

#include &lt;gnome.h&gt;


struct      <link linkend="GnomePixmapEntry-struct">GnomePixmapEntry</link>;
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gnome-pixmap-entry-new">gnome_pixmap_entry_new</link>          (char *history_id,
                                             char *browse_dialog_title,
                                             int do_preview);
void        <link linkend="gnome-pixmap-entry-set-pixmap-subdir">gnome_pixmap_entry_set_pixmap_subdir</link>
                                            (<link linkend="GnomePixmapEntry">GnomePixmapEntry</link> *pentry,
                                             const char *subdir);
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gnome-pixmap-entry-gnome-file-entry">gnome_pixmap_entry_gnome_file_entry</link>
                                            (<link linkend="GnomePixmapEntry">GnomePixmapEntry</link> *pentry);
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gnome-pixmap-entry-gnome-entry">gnome_pixmap_entry_gnome_entry</link>  (<link linkend="GnomePixmapEntry">GnomePixmapEntry</link> *pentry);
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gnome-pixmap-entry-gtk-entry">gnome_pixmap_entry_gtk_entry</link>    (<link linkend="GnomePixmapEntry">GnomePixmapEntry</link> *pentry);
void        <link linkend="gnome-pixmap-entry-set-preview">gnome_pixmap_entry_set_preview</link>  (<link linkend="GnomePixmapEntry">GnomePixmapEntry</link> *pentry,
                                             int do_preview);
void        <link linkend="gnome-pixmap-entry-set-preview-size">gnome_pixmap_entry_set_preview_size</link>
                                            (<link linkend="GnomePixmapEntry">GnomePixmapEntry</link> *pentry,
                                             int preview_w,
                                             int preview_h);
char*       <link linkend="gnome-pixmap-entry-get-filename">gnome_pixmap_entry_get_filename</link> (<link linkend="GnomePixmapEntry">GnomePixmapEntry</link> *pentry);

</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>
                           +----GnomePixmapEntry
</synopsis>

</refsect1>




<refsect1>
<title>Description</title>
<para>
  Entry for large images with a preview.  Unlike <link linkend="GnomeIconEntry">GnomeIconEntry</link>, it does
  not scale the images to a specific size and shows them 1:1.  This is
  perfect for selection of backgrounds and such.  It also allows DND to
  be performed on the preview box.  It also provides all the <link linkend="GnomeEntry">GnomeEntry</link>
  functionality as well.
</para>
</refsect1>

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

</para></refsect2>
<refsect2>
<title><anchor id="gnome-pixmap-entry-new">gnome_pixmap_entry_new ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gnome_pixmap_entry_new          (char *history_id,
                                             char *browse_dialog_title,
                                             int do_preview);</programlisting>
<para>
Creates a new pixmap entry widget, if do_preview is false,
the preview is hidden but the files are still loaded so that it's easy
to show it. For a pixmap entry without preview, use the
<link linkend="GnomeFileEntry">GnomeFileEntry</link> widget..</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>history_id</parameter>&nbsp;:</entry>
<entry> The id given to <link linkend="gnome-entry-new">gnome_entry_new</link>
</entry></row>
<row><entry align="right"><parameter>browse_dialog_title</parameter>&nbsp;:</entry>
<entry> Title of the browse dialog
</entry></row>
<row><entry align="right"><parameter>do_preview</parameter>&nbsp;:</entry>
<entry> boolean
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> New GnomePixmapEntry object.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-pixmap-entry-set-pixmap-subdir">gnome_pixmap_entry_set_pixmap_subdir ()</title>
<programlisting>void        gnome_pixmap_entry_set_pixmap_subdir
                                            (<link linkend="GnomePixmapEntry">GnomePixmapEntry</link> *pentry,
                                             const char *subdir);</programlisting>
<para>
Sets the default path for the file entry. The new
subdirectory should be specified relative to the default GNOME
pixmap directory.</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>pentry</parameter>&nbsp;:</entry>
<entry> Pointer to GnomePixmapEntry widget
</entry></row>
<row><entry align="right"><parameter>subdir</parameter>&nbsp;:</entry>
<entry> Subdirectory
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-pixmap-entry-gnome-file-entry">gnome_pixmap_entry_gnome_file_entry ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gnome_pixmap_entry_gnome_file_entry
                                            (<link linkend="GnomePixmapEntry">GnomePixmapEntry</link> *pentry);</programlisting>
<para>
Get the GnomeFileEntry component of the
GnomePixmapEntry widget for lower-level manipulation.</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>pentry</parameter>&nbsp;:</entry>
<entry> Pointer to GnomePixmapEntry widget
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> GnomeFileEntry widget
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-pixmap-entry-gnome-entry">gnome_pixmap_entry_gnome_entry ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gnome_pixmap_entry_gnome_entry  (<link linkend="GnomePixmapEntry">GnomePixmapEntry</link> *pentry);</programlisting>
<para>
Get the GnomeEntry component of the
GnomePixmapEntry widget for lower-level manipulation.</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>pentry</parameter>&nbsp;:</entry>
<entry> Pointer to GnomePixmapEntry widget
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> GnomeEntry widget
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-pixmap-entry-gtk-entry">gnome_pixmap_entry_gtk_entry ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gnome_pixmap_entry_gtk_entry    (<link linkend="GnomePixmapEntry">GnomePixmapEntry</link> *pentry);</programlisting>
<para>
Get the GtkEntry component of the
GnomePixmapEntry for Gtk+-level manipulation.</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>pentry</parameter>&nbsp;:</entry>
<entry> Pointer to GnomePixmapEntry widget
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> GtkEntry widget
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-pixmap-entry-set-preview">gnome_pixmap_entry_set_preview ()</title>
<programlisting>void        gnome_pixmap_entry_set_preview  (<link linkend="GnomePixmapEntry">GnomePixmapEntry</link> *pentry,
                                             int do_preview);</programlisting>
<para>
Sets whether or not previews of the currently selected 
pixmap should be shown in the file selector.</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>pentry</parameter>&nbsp;:</entry>
<entry> Pointer to GnomePixmapEntry widget
</entry></row>
<row><entry align="right"><parameter>do_preview</parameter>&nbsp;:</entry>
<entry> <literal>TRUE</literal> to show previews, <literal>FALSE</literal> to hide.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-pixmap-entry-set-preview-size">gnome_pixmap_entry_set_preview_size ()</title>
<programlisting>void        gnome_pixmap_entry_set_preview_size
                                            (<link linkend="GnomePixmapEntry">GnomePixmapEntry</link> *pentry,
                                             int preview_w,
                                             int preview_h);</programlisting>
<para>
Sets the minimum size of the preview frame in pixels.</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>pentry</parameter>&nbsp;:</entry>
<entry> Pointer to GnomePixmapEntry widget
</entry></row>
<row><entry align="right"><parameter>preview_w</parameter>&nbsp;:</entry>
<entry> Preview width in pixels
</entry></row>
<row><entry align="right"><parameter>preview_h</parameter>&nbsp;:</entry>
<entry> Preview height in pixels
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-pixmap-entry-get-filename">gnome_pixmap_entry_get_filename ()</title>
<programlisting>char*       gnome_pixmap_entry_get_filename (<link linkend="GnomePixmapEntry">GnomePixmapEntry</link> *pentry);</programlisting>
<para>
Gets the filename of the image if the preview
successfully loaded.</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>pentry</parameter>&nbsp;:</entry>
<entry> Pointer to GnomePixmapEntry widget
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> Newly allocated string containing path, or <literal>NULL</literal> on error. 
</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>



<refsect1>
<title>See Also</title>
<para>
  <link linkend="GnomeEntry">GnomeEntry</link>, <link linkend="GnomeFileEntry">GnomeFileEntry</link>, <link linkend="GnomeIconEntry">GnomeIconEntry</link>, <link linkend="GnomeNumberEntry">GnomeNumberEntry</link>
</para>
</refsect1>

</refentry>
