GnomeIconEntry

Name

GnomeIconEntry -- A widget to select an icon.

Synopsis


#include <gnome.h>


struct      GnomeIconEntry;
GtkWidget*  gnome_icon_entry_new            (char *history_id,
                                             char *browse_dialog_title);
void        gnome_icon_entry_set_pixmap_subdir
                                            (GnomeIconEntry *ientry,
                                             const char *subdir);
GtkWidget*  gnome_icon_entry_gnome_file_entry
                                            (GnomeIconEntry *ientry);
GtkWidget*  gnome_icon_entry_gnome_entry    (GnomeIconEntry *ientry);
GtkWidget*  gnome_icon_entry_gtk_entry      (GnomeIconEntry *ientry);
char*       gnome_icon_entry_get_filename   (GnomeIconEntry *ientry);

Object Hierarchy


  GtkObject
   +----GtkWidget
         +----GtkContainer
               +----GtkBox
                     +----GtkVBox
                           +----GnomeIconEntry

Description

This widget provides the facilities to select an icon. An icon is displayed inside a button, when the button is pressed, an Icon selector (a dialog with a GnomeIconSel widget) pops up to let the user choose an icon. It also allows one to Drag and Drop the images to and from the preview button.

Details

struct GnomeIconEntry

struct GnomeIconEntry;


gnome_icon_entry_new ()

GtkWidget*  gnome_icon_entry_new            (char *history_id,
                                             char *browse_dialog_title);

Creates a new icon entry widget

history_id : the id given to gnome_entry_new
browse_dialog_title : title of the browse dialog and icon selection dialog
Returns : Returns the new object


gnome_icon_entry_set_pixmap_subdir ()

void        gnome_icon_entry_set_pixmap_subdir
                                            (GnomeIconEntry *ientry,
                                             const char *subdir);

Sets the subdirectory below gnome's default pixmap directory to use as the default path for the file entry.

ientry : the GnomeIconEntry to work with
subdir : subdirectory


gnome_icon_entry_gnome_file_entry ()

GtkWidget*  gnome_icon_entry_gnome_file_entry
                                            (GnomeIconEntry *ientry);

Get the GnomeFileEntry widget that's part of the entry

ientry : the GnomeIconEntry to work with
Returns : Returns GnomeFileEntry widget


gnome_icon_entry_gnome_entry ()

GtkWidget*  gnome_icon_entry_gnome_entry    (GnomeIconEntry *ientry);

Get the GnomeEntry widget that's part of the entry

ientry : the GnomeIconEntry to work with
Returns : Returns GnomeEntry widget


gnome_icon_entry_gtk_entry ()

GtkWidget*  gnome_icon_entry_gtk_entry      (GnomeIconEntry *ientry);

Get the GtkEntry widget that's part of the entry

ientry : the GnomeIconEntry to work with
Returns : Returns GtkEntry widget


gnome_icon_entry_get_filename ()

char*       gnome_icon_entry_get_filename   (GnomeIconEntry *ientry);

Gets the file name of the image if it was possible to load it into the preview. That is, it will only return a filename if the image exists and it was possible to load it as an image.

ientry : the GnomeIconEntry to work with
Returns : a newly allocated string with the path or NULL if it couldn't load the file

See Also

GnomeEntry, GnomeFileEntry, GnomeNumberEntry, GnomePixmapEntry