3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
20 #include "commandtags.h"
28 * \brief GUI-I definition of file dialog interface
33 /// label, directory path button
34 typedef std::pair<string, string> Button;
38 Later, /**< modeless chooser, no result */
39 Chosen /**< string contains filename */
43 typedef std::pair<FileDialog::ResultType, string> Result;
46 * Constructs a file dialog attached to LyXView \param lv, with
47 * title \param title. If param \a is \const LFUN_SELECT_FILE_SYNC
48 * then a value will be returned immediately upon performing a Select(),
49 * otherwise a callback Dispatch() will be invoked with the filename as
50 * argument, of action \param a.
52 * Up to two optional extra buttons are allowed for specifying addtional
53 * directories in the navigation.
55 FileDialog(LyXView * lv, string const & title, kb_action a = LFUN_SELECT_FILE_SYNC,
56 Button b1 = Button(string(), string()),
57 Button b2 = Button(string(), string()));
63 * Choose a file for selection, starting in directory \param path, with the file
64 * selection \param mask. The \param mask string is of the form :
66 * <regular expression to match> | <description>
68 * for example, "*.ps | PostScript files (*.ps)".
70 * FIXME: should support multiple lines of these for different file types.
72 Result const Select(string const & path = string(),
73 string const & mask = string(),
74 string const & suggested = string());
77 /* This *has* to be public because there is no way to specify extern "C" functions
78 * as friends of Private implementation for the xforms implementation ... grr
91 /// success action to perform if not synchronous
96 #endif // FILEDIALOG_H