2
* Copyright (C) 2001 Philip Langdale
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2, or (at your option)
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
#ifndef __filepicker_h
20
#define __filepicker_h
23
* FilePickerMode: What mode FilePicker should run in
35
/* description of the file format */
37
/* tipical sufixes, NULL terminated */
41
////////////////////////////////////////////////////////////////////////////////
43
* show_file_picker: Shows a file picker. Can be configured to select a
44
* file or a directory.
45
* @parentWidget: Parent Widget for file picker.
46
* @title: Title for file picker.
47
* @directory: Initial directory to start in.
48
* @file: Initial filename to show in filepicker.
49
* @mode: Mode to run filepicker in (modeOpen, modeSave, modeGetFolder)
50
* @ret_fullpath: On a successful return, will hold the full path to selected
52
* @ret_save_content: If this arg is not NULL, then the file picker will
53
* contain a checkbox to indicate whether document content should
54
* be saved along with the document. It will contain the value
55
* of the checkbox on return.
56
* @file_formats: an array of FileFormat structures to fill the format chooser
57
* optionmenu. NULL if not needed. The last item must have
58
* description == NULL;
59
* @ret_file_format: where to store the index of the format selected (can be
61
* returns: TRUE for success, FALSE for failure.
63
////////////////////////////////////////////////////////////////////////////////
68
show_file_picker (GtkWidget *parentWidget, const char* title,
69
const char* directory, const char* file, FilePickerMode mode,
70
char * *ret_fullpath, gboolean* ret_save_content,
71
FileFormat *file_formats, gint *ret_file_format);