2 * \file ControlEmbeddedFiles.cpp
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "ControlEmbeddedFiles.h"
17 #include "FuncRequest.h"
22 #include "frontends/LyXView.h"
23 #include "support/convert.h"
30 ControlEmbeddedFiles::ControlEmbeddedFiles(Dialog & parent)
31 : Dialog::Controller(parent), embedded_files(NULL)
35 bool ControlEmbeddedFiles::initialiseParams(string const &)
41 void ControlEmbeddedFiles::updateEmbeddedFiles()
43 // copy buffer embeddedFiles to a local copy
44 kernel().buffer().embeddedFiles().update();
45 embedded_files = &kernel().buffer().embeddedFiles();
49 void ControlEmbeddedFiles::dispatchParams()
51 // lyx view will only be updated if we do something to the main window. :-)
52 kernel().dispatch(FuncRequest(LFUN_MESSAGE, message_));
56 void ControlEmbeddedFiles::goTo(EmbeddedFile const & item)
58 string const tmp = convert<string>(item.parID());
59 kernel().lyxview().dispatch(FuncRequest(LFUN_PARAGRAPH_GOTO, tmp));
63 void ControlEmbeddedFiles::view(EmbeddedFile const & item)
65 formats.view(kernel().buffer(), item, formats.getFormatFromFile(item));
68 } // namespace frontend