4 * Read the file COPYING
9 * Full author contact details are available in file CREDITS
21 #include "commandtags.h"
29 * \brief GUI-I definition of file dialog interface
34 /// label, directory path button
35 typedef std::pair<string, string> Button;
39 Later, /**< modeless chooser, no result */
40 Chosen /**< string contains filename */
44 typedef std::pair<FileDialog::ResultType, string> Result;
47 * Constructs a file dialog attached to LyXView \param lv, with
48 * title \param title. If \param a is \const LFUN_SELECT_FILE_SYNC
49 * then a value will be returned immediately upon performing a Select(),
50 * otherwise a callback Dispatch() will be invoked with the filename as
51 * argument, of action \param a.
53 * Up to two optional extra buttons are allowed for specifying
54 * additional directories in the navigation (an empty
55 * directory is interpreted as getcwd())
57 FileDialog(LyXView * lv, string const & title,
58 kb_action a = LFUN_SELECT_FILE_SYNC,
59 Button b1 = Button(string(), string()),
60 Button b2 = Button(string(), string()));
66 * Choose a file for selection, starting in directory \param
67 * path, with the file selection \param mask. The \param mask
68 * string is of the form :
70 * <glob to match> | <description>
72 * for example, "*.ps | PostScript files (*.ps)".
74 * FIXME: should support multiple lines of these for different file types.
76 Result const Select(string const & path = string(),
77 string const & mask = string(),
78 string const & suggested = string());
81 /* This *has* to be public because there is no way to specify extern "C" functions
82 * as friends of Private implementation for the xforms implementation ... grr
95 /// success action to perform if not synchronous
100 #endif // FILEDIALOG_H