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