3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
10 #pragma implementation
17 #include "commandtags.h"
19 #include "support/lstrings.h"
21 // temp. hack until Allow/prohibitInput is not
22 // needed any more in src/ - for now it's simplest
25 #include "bufferview_funcs.h"
27 #include "frontends/FileDialog.h"
29 #include "FormFiledialog.h"
37 FileDialog::FileDialog(LyXView *lv, string const &t, kb_action s, Button b1, Button b2)
38 : private_(0), lv_(lv), title_(t), success_(s)
40 private_ = new FileDialog::Private();
42 private_->SetButton(0, b1.first, b1.second);
43 private_->SetButton(1, b2.first, b2.second);
47 FileDialog::~FileDialog()
54 FileDialog::Result const FileDialog::Select(string const & path, string const & mask, string const & suggested)
61 rsplit(mask, filter, '|');
66 lyxerr[Debug::GUI] << "Select with path \"" << path << "\", mask \"" << filter << "\", suggested \"" << suggested << "\"" << endl;
68 // no support for asynchronous selection yet
72 FileDialog::Result result;
74 result.first = FileDialog::Chosen;
75 result.second = private_->Select(title_, path, filter, suggested);