]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlEmbeddedFiles.cpp
Embedding feature patch 3: basic gui support
[lyx.git] / src / frontends / controllers / ControlEmbeddedFiles.cpp
1 /**
2  * \file ControlEmbeddedFiles.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Bo Peng
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "ControlEmbeddedFiles.h"
14
15 #include "Buffer.h"
16
17 #include "FuncRequest.h"
18 #include "gettext.h"
19 #include "debug.h"
20
21
22 using std::string;
23
24 namespace lyx {
25 namespace frontend {
26
27 ControlEmbeddedFiles::ControlEmbeddedFiles(Dialog & parent)
28         : Dialog::Controller(parent), embedded_files(NULL)
29 {}
30
31
32 bool ControlEmbeddedFiles::initialiseParams(string const &)
33 {
34         return true;
35 }
36
37
38 void ControlEmbeddedFiles::updateEmbeddedFiles()
39 {
40         // copy buffer embeddedFiles to a local copy
41         kernel().buffer().embeddedFiles().update();
42         embedded_files = &kernel().buffer().embeddedFiles();
43 }
44
45
46 void ControlEmbeddedFiles::dispatchParams()
47 {
48         // lyx view will only be updated if we do something to the main window. :-)
49         kernel().dispatch(FuncRequest(LFUN_MESSAGE, message_));
50 }
51
52
53 } // namespace frontend
54 } // namespace lyx