4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
10 * Full author contact details are available in file CREDITS
22 #include "commandtags.h"
30 * \brief GUI-I definition of file dialog interface
35 /// label, directory path button
36 typedef std::pair<string, string> Button;
40 Later, /**< modeless chooser, no result */
41 Chosen /**< string contains filename */
45 typedef std::pair<FileDialog::ResultType, string> Result;
48 * Constructs a file dialog attached to LyXView \param lv, with
49 * title \param title. If \param a is \const LFUN_SELECT_FILE_SYNC
50 * then a value will be returned immediately upon performing a open(),
51 * otherwise a callback Dispatch() will be invoked with the filename as
52 * argument, of action \param a.
54 * Up to two optional extra buttons are allowed for specifying
55 * additional directories in the navigation (an empty
56 * directory is interpreted as getcwd())
58 FileDialog(LyXView * lv, string const & title,
59 kb_action a = LFUN_SELECT_FILE_SYNC,
60 Button b1 = Button(string(), string()),
61 Button b2 = Button(string(), string()));
67 * Choose a file for opening, starting in directory \param
68 * path, with the file selection \param mask. The \param mask
69 * string is of the form :
71 * <glob to match> | <description>
73 * for example, "*.ps | PostScript files (*.ps)".
75 * FIXME: should support multiple lines of these for different file types.
77 Result const open(string const & path = string(),
78 string const & mask = string(),
79 string const & suggested = string());
82 * Choose a file for saving, starting in directory \param
83 * path, with the file selection \param mask. The \param mask
84 * string is of the form :
86 * <glob to match> | <description>
88 * for example, "*.ps | PostScript files (*.ps)".
90 Result const save(string const & path = string(),
91 string const & mask = string(),
92 string const & suggested = string());
95 /* This *has* to be public because there is no way to specify extern "C" functions
96 * as friends of Private implementation for the xforms implementation ... grr
109 /// success action to perform if not synchronous
114 #endif // FILEDIALOG_H