4 * Copyright 2001 the LyX Team
5 * 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
53 * additional directories in the navigation (an empty
54 * directory is interpreted as getcwd())
56 FileDialog(LyXView * lv, string const & title,
57 kb_action a = LFUN_SELECT_FILE_SYNC,
58 Button b1 = Button(string(), string()),
59 Button b2 = Button(string(), string()));
65 * Choose a file for selection, starting in directory \param
66 * path, with the file selection \param mask. The \param mask
67 * string is of the form :
69 * <regular expression to match> | <description>
71 * for example, "*.ps | PostScript files (*.ps)".
73 * FIXME: should support multiple lines of these for different file types.
75 Result const Select(string const & path = string(),
76 string const & mask = string(),
77 string const & suggested = string());
80 /* This *has* to be public because there is no way to specify extern "C" functions
81 * as friends of Private implementation for the xforms implementation ... grr
94 /// success action to perform if not synchronous
99 #endif // FILEDIALOG_H