| GIMP Widgets Library Reference Manual |
|---|
GimpFileSelection — Widget for entering a filename.
struct GimpFileSelection;GtkWidget * gimp_file_selection_new (constgchar *title, constgchar *filename,gboolean dir_only,gboolean check_valid);gchar * gimp_file_selection_get_filename (GimpFileSelection *selection); void gimp_file_selection_set_filename (GimpFileSelection *selection, constgchar *filename);
GObject +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkHBox +----GimpFileSelection
GimpFileSelection implements
"filename-changed" void user_function (GimpFileSelection *gimpfileselection,gpointer user_data);
This widget is used to enter filenames or directories.
There is a
You can restrict the GimpFileSelection to directories. In this case
the filename listbox of the
If you specify check_valid as
Whenever the user changes the filename, the "filename_changed" signal will be emitted.
GtkWidget * gimp_file_selection_new (constgchar *title, constgchar *filename,gboolean dir_only,gboolean check_valid);
Creates a new GimpFileSelection widget.
| title : | The title of the |
| filename : | The initial filename. |
| dir_only : | TRUE if the file selection should accept directories only. |
| check_valid : | TRUE if the widget should check if the entered file really exists. |
| Returns : | A pointer to the new GimpFileSelection widget. |
gchar * gimp_file_selection_get_filename (GimpFileSelection *selection);
Note that you have to
| selection : | The file selection you want to know the filename from. |
| Returns : | The file or directory the user has entered. |
void gimp_file_selection_set_filename
(GimpFileSelection *selection,
const gchar *filename);If you specified check_valid as TRUE in gimp_file_selection_new() the GimpFileSelection will immediately check the validity of the file name.
| selection : | The file selection you want to set the filename for. |
| filename : | The new filename. |
void user_function (GimpFileSelection *gimpfileselection,gpointer user_data);
This signal is emitted whenever the user changes the filename.
| gimpfileselection : | the object which received the signal. |
| user_data : | user data set when the signal handler was connected. |
| << GimpColorScale | GimpMemsizeEntry >> |