>GnomePixmapEntry

GnomePixmapEntry

Name

GnomePixmapEntry -- Entry widget for selection of large images.

Synopsis


#include <gnome.h>


struct      GnomePixmapEntry;
GtkWidget*  gnome_pixmap_entry_new          (char *history_id,
                                             char *browse_dialog_title,
                                             int do_preview);
void        gnome_pixmap_entry_set_pixmap_subdir
                                            (GnomePixmapEntry *pentry,
                                             const char *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);
void        gnome_pixmap_entry_set_preview  (GnomePixmapEntry *pentry,
                                             int do_preview);
void        gnome_pixmap_entry_set_preview_size
                                            (GnomePixmapEntry *pentry,
                                             int preview_w,
                                             int preview_h);
char*       gnome_pixmap_entry_get_filename (GnomePixmapEntry *pentry);

Object Hierarchy


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

Description

Entry for large images with a preview. Unlike GnomeIconEntry, 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 GnomeEntry functionality as well.

Details

struct GnomePixmapEntry

struct GnomePixmapEntry;


gnome_pixmap_entry_new ()

GtkWidget*  gnome_pixmap_entry_new          (char *history_id,
                                             char *browse_dialog_title,
                                             int do_preview);

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 GnomeFileEntry widget..

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_set_pixmap_subdir ()

void        gnome_pixmap_entry_set_pixmap_subdir
                                            (GnomePixmapEntry *pentry,
                                             const char *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);

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);

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);

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

pentry : Pointer to GnomePixmapEntry widget
Returns : GtkEntry widget


gnome_pixmap_entry_set_preview ()

void        gnome_pixmap_entry_set_preview  (GnomePixmapEntry *pentry,
                                             int do_preview);

Sets whether or not previews of the currently selected pixmap should be shown in the file selector.

pentry : Pointer to GnomePixmapEntry widget
do_preview : TRUE to show previews, FALSE to hide.


gnome_pixmap_entry_set_preview_size ()

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

Sets the minimum size of the preview frame in pixels.

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


gnome_pixmap_entry_get_filename ()

char*       gnome_pixmap_entry_get_filename (GnomePixmapEntry *pentry);

Gets the filename of the image if the preview successfully loaded.

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

See Also

GnomeEntry, GnomeFileEntry, GnomeIconEntry, GnomeNumberEntry