]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlEmbeddedFiles.h
Embedding: move manifest to .lyx file, as a separate section between header and body
[lyx.git] / src / frontends / controllers / ControlEmbeddedFiles.h
1 // -*- C++ -*-
2 /**
3  * \file ControlEmbeddedFiles.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Bo Peng
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef CONTROLEMBEDDEDFILES_H
13 #define CONTROLEMBEDDEDFILES_H
14
15 #include "Dialog.h"
16 #include "EmbeddedFiles.h"
17
18 namespace lyx {
19
20 namespace frontend {
21
22 class ControlEmbeddedFiles : public Controller {
23 public:
24         ///
25         ControlEmbeddedFiles(Dialog &);
26         ///
27         virtual ~ControlEmbeddedFiles() {}
28         ///
29         EmbeddedFiles & embeddedFiles();
30         ///
31         virtual bool initialiseParams(std::string const &);
32         /// obtain embedded files from buffer
33         void updateEmbeddedFiles();
34         ///
35         virtual void clearParams() {};
36         ///
37         virtual bool isBufferDependent() const { return true; }
38         ///
39         bool canApply() const { return true; }
40         ///
41         virtual bool canApplyToReadOnly() const { return true; }
42         ///
43         void dispatchMessage(std::string const & msg);
44         ///
45         void dispatchParams() {};
46         ///
47         void goTo(EmbeddedFile const & item, int idx);
48         ///
49         void view(EmbeddedFile const & item);
50         ///
51         void setEmbed(EmbeddedFile & item, bool embed);
52         ///
53         docstring const browseFile();
54         ///
55         bool extract(EmbeddedFile const & item);
56         ///
57         bool update(EmbeddedFile const & item);
58
59 protected:
60         //
61         std::string message_;
62 };
63
64 } // namespace frontend
65 } // namespace lyx
66
67 #endif // CONTROLEMBEDDEDFILES_H