## GnomePixmapEntry

GnomePixmapEntry —

## Synopsis

    #include <libgnomeui/libgnomeui.h>

    struct      GnomePixmapEntry;
    GtkWidget*  gnome_pixmap_entry_new          (const gchar *history_id,
                                                 const gchar *browse_dialog_title,
                                                 gboolean do_preview);
    void        gnome_pixmap_entry_construct    (GnomePixmapEntry *pentry,
                                                 const gchar *history_id,
                                                 const gchar *browse_dialog_title,
                                                 gboolean do_preview);
    void        gnome_pixmap_entry_set_pixmap_subdir
                                                (GnomePixmapEntry *pentry,
                                                 const gchar *subdir);
    GtkWidget*  gnome_pixmap_entry_gnome_file_entry
                                                (GnomePixmapEntry *pentry);
    GtkWidget*  gnome_pixmap_entry_gnome_entry  (GnomePixmapEntry *pentry);
    GtkWidget*  gnome_pixmap_entry_gtk_entry    (GnomePixmapEntry *pentry);
    GtkWidget*  gnome_pixmap_entry_scrolled_window
                                                (GnomePixmapEntry *pentry);
    GtkWidget*  gnome_pixmap_entry_preview_widget
                                                (GnomePixmapEntry *pentry);
    void        gnome_pixmap_entry_set_preview  (GnomePixmapEntry *pentry,
                                                 gboolean do_preview);
    void        gnome_pixmap_entry_set_preview_size
                                                (GnomePixmapEntry *pentry,
                                                 gint preview_w,
                                                 gint preview_h);
    gchar*      gnome_pixmap_entry_get_filename (GnomePixmapEntry *pentry);

## Object Hierarchy

      GObject
       +----GtkObject
             +----GtkWidget
                   +----GtkContainer
                         +----GtkBox
                               +----GtkVBox
                                     +----GnomeFileEntry
                                           +----GnomePixmapEntry

## Implemented Interfaces

GnomePixmapEntry implements AtkImplementorIface and GtkEditable.

## Properties

      "do-preview"           gboolean              : Read / Write

## Description

## Details

### struct GnomePixmapEntry

    struct GnomePixmapEntry;

### gnome_pixmap_entry_new ()

    GtkWidget*  gnome_pixmap_entry_new          (const gchar *history_id,
                                                 const gchar *browse_dialog_title,
                                                 gboolean do_preview);

Creates a new pixmap entry widget, if do_preview is false, there is no preview, the files are not loaded and thus are not checked to be real image files.

`history_id` : | The id given to gnome_entry_new
`browse_dialog_title` : | Title of the browse dialog
`do_preview` : | boolean
Returns : | New GnomePixmapEntry object.

### gnome_pixmap_entry_construct ()

    void        gnome_pixmap_entry_construct    (GnomePixmapEntry *pentry,
                                                 const gchar *history_id,
                                                 const gchar *browse_dialog_title,
                                                 gboolean do_preview);

Constructs the `pentry` object. If do_preview is `FALSE`, there is no preview, the files are not loaded and thus are not checked to be real image files.

`pentry` : | A GnomePixmapEntry object to construct
`history_id` : | The id given to gnome_entry_new
`browse_dialog_title` : | Title of the browse dialog
`do_preview` : | `TRUE` if preview is desired, `FALSE` if not.

### gnome_pixmap_entry_set_pixmap_subdir ()

    void        gnome_pixmap_entry_set_pixmap_subdir
                                                (GnomePixmapEntry *pentry,
                                                 const gchar *subdir);

Sets the default path for the file entry. The new subdirectory should be specified relative to the default GNOME pixmap directory.

`pentry` : | Pointer to GnomePixmapEntry widget
`subdir` : | Subdirectory

### gnome_pixmap_entry_gnome_file_entry ()

    GtkWidget*  gnome_pixmap_entry_gnome_file_entry
                                                (GnomePixmapEntry *pentry);

### Warning

`gnome_pixmap_entry_gnome_file_entry` is deprecated and should not be used in newly-written code.

Get the GnomeFileEntry component of the GnomePixmapEntry widget for lower-level manipulation.

`pentry` : | Pointer to GnomePixmapEntry widget
Returns : | GnomeFileEntry widget

### gnome_pixmap_entry_gnome_entry ()

    GtkWidget*  gnome_pixmap_entry_gnome_entry  (GnomePixmapEntry *pentry);

### Warning

`gnome_pixmap_entry_gnome_entry` is deprecated and should not be used in newly-written code.

Get the GnomeEntry component of the GnomePixmapEntry widget for lower-level manipulation.

`pentry` : | Pointer to GnomePixmapEntry widget
Returns : | GnomeEntry widget

### gnome_pixmap_entry_gtk_entry ()

    GtkWidget*  gnome_pixmap_entry_gtk_entry    (GnomePixmapEntry *pentry);

### Warning

`gnome_pixmap_entry_gtk_entry` is deprecated and should not be used in newly-written code.

Get the GtkEntry component of the GnomePixmapEntry for Gtk+-level manipulation.

`pentry` : | Pointer to GnomePixmapEntry widget
Returns : | GtkEntry widget

### gnome_pixmap_entry_scrolled_window ()

    GtkWidget*  gnome_pixmap_entry_scrolled_window
                                                (GnomePixmapEntry *pentry);

Get the GtkScrolledWindow widget that the preview is contained in. Could be `NULL`

`pentry` : | Pointer to GnomePixmapEntry widget
Returns : | GtkScrolledWindow widget or `NULL`

### gnome_pixmap_entry_preview_widget ()

    GtkWidget*  gnome_pixmap_entry_preview_widget
                                                (GnomePixmapEntry *pentry);

Get the widget that is the preview. Don't assume any type of widget. Currently either GnomePixmap or GtkLabel, but it could change in the future. Could be `NULL`

`pentry` : | Pointer to GnomePixmapEntry widget
Returns : | the preview widget pointer or `NULL`

### gnome_pixmap_entry_set_preview ()

    void        gnome_pixmap_entry_set_preview  (GnomePixmapEntry *pentry,
                                                 gboolean do_preview);

Sets whether or not the preview box is shown above the entry. If the preview is on, we also load the files and check for them being real images. If it is off, we don't check files to be real image files.

`pentry` : | Pointer to GnomePixmapEntry widget
`do_preview` : | `TRUE` to show previews, `FALSE` to not show them.

### gnome_pixmap_entry_set_preview_size ()

    void        gnome_pixmap_entry_set_preview_size
                                                (GnomePixmapEntry *pentry,
                                                 gint preview_w,
                                                 gint preview_h);

Sets the minimum size of the preview frame in pixels. This works only if the preview is enabled.

`pentry` : | Pointer to GnomePixmapEntry widget
`preview_w` : | Preview width in pixels
`preview_h` : | Preview height in pixels

### gnome_pixmap_entry_get_filename ()

    gchar*      gnome_pixmap_entry_get_filename (GnomePixmapEntry *pentry);

Gets the filename of the image if the preview successfully loaded if preview is disabled. If the preview is disabled, the file is only checked if it exists or not.

`pentry` : | Pointer to GnomePixmapEntry widget
Returns : | Newly allocated string containing path, or `NULL` on error.

## Properties

### The "`do-preview`" property

      "do-preview"           gboolean              : Read / Write

Whether the pixmap entry should have a preview.