2 * \file xforms/FileDialog.C
3 * Read the file COPYING
7 * Full author contact details are available in file CREDITS
13 #pragma implementation
16 #include "FormFiledialog.h"
17 #include "frontends/FileDialog.h"
18 // temp. hack until Allow/prohibitInput is not
19 // needed any more in src/ - for now it's simplest
21 #include "frontends/LyXView.h"
22 #include "bufferview_funcs.h"
24 #include "commandtags.h"
26 #include "support/lstrings.h"
34 FileDialog::FileDialog(LyXView *lv, string const &t, kb_action s, Button b1, Button b2)
35 : private_(0), lv_(lv), title_(t), success_(s)
37 private_ = new FileDialog::Private(lv->getDialogs());
39 private_->SetButton(0, b1.first, b1.second);
40 private_->SetButton(1, b2.first, b2.second);
44 FileDialog::~FileDialog()
50 FileDialog::Result const FileDialog::Select(string const & path, string const & mask, string const & suggested)
57 rsplit(mask, filter, '|');
62 lyxerr[Debug::GUI] << "Select with path \"" << path << "\", mask \"" << filter << "\", suggested \"" << suggested << "\"" << endl;
64 // no support for asynchronous selection yet
68 FileDialog::Result result;
70 result.first = FileDialog::Chosen;
71 result.second = private_->Select(title_, path, filter, suggested);