]> git.lyx.org Git - lyx.git/blob - src/insets/ExternalSupport.h
#5502 add binding for full screen toggle on mac
[lyx.git] / src / insets / ExternalSupport.h
1 // -*- C++ -*-
2 /**
3  * \file ExternalSupport.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Asger Alstrup Nielsen
8  * \author Angus Leeming
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef EXTERNALSUPPORT_H
14 #define EXTERNALSUPPORT_H
15
16 #include "texstream.h"
17
18 namespace lyx {
19
20 class Buffer;
21 class ExportData;
22 class InsetExternalParams;
23
24 namespace external {
25
26 class Template;
27
28 /// A shorthand, helper function
29 Template const * getTemplatePtr(InsetExternalParams const & params);
30
31
32 /// Invoke the external editor.
33 void editExternal(InsetExternalParams const & params,
34                   Buffer const & buffer);
35
36
37 enum Substitute {
38         ALL,
39         PATHS,
40         ALL_BUT_PATHS
41 };
42
43 /** Substitute meta-variables in string \p s, making use of \p params and
44     \p buffer.
45     If \p external_in_tmpdir is true, all files are assumed to be in the
46     master buffers temp path, and the mangled filename is used.
47     Otherwise, the output filename (absolute or relative to the parent
48     document, as written in the .lyx file) is used.
49 */
50 std::string const doSubstitution(InsetExternalParams const & params,
51                                  Buffer const & buffer,
52                                  std::string const & s,
53                                  bool use_latex_path,
54                                  bool external_in_tmpdir = false,
55                                  Substitute what = ALL);
56
57
58 /** Write the output for a specific file format
59     and generate any external data files.
60     If \p external_in_tmpdir == true, then the generated file is
61     place in the buffer's temporary directory.
62 */
63 void writeExternal(InsetExternalParams const &,
64                    std::string const & format,
65                    Buffer const &,
66                    otexstream &,
67                    ExportData &,
68                    bool external_in_tmpdir,
69                    bool dryrun);
70
71 } // namespace external
72 } // namespace lyx
73
74 #endif // NOT EXTERNALSUPPORT_H