3 * \file ExternalSupport.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Asger Alstrup Nielsen
8 * \author Angus Leeming
10 * Full author contact details are available in file CREDITS.
13 #ifndef EXTERNALSUPPORT_H
14 #define EXTERNALSUPPORT_H
23 class InsetExternalParams;
37 /// A shorthand, helper function
38 Template const * getTemplatePtr(InsetExternalParams const & params);
41 /// Invoke the external editor.
42 void editExternal(InsetExternalParams const & params,
43 Buffer const & buffer);
53 /** Substitute meta-variables in string \p s, making use of \p params and
55 If \p external_in_tmpdir is true, all files are assumed to be in the
56 master buffers temp path, and the mangled filename is used.
57 Otherwise, the output filename (absolute or relative to the parent
58 document, as written in the .lyx file) is used.
60 std::string const doSubstitution(InsetExternalParams const & params,
61 Buffer const & buffer,
62 std::string const & s,
64 bool external_in_tmpdir = false,
65 Substitute what = ALL);
68 /** Write the output for a specific file format
69 and generate any external data files.
70 If \p external_in_tmpdir == true, then the generated file is
71 place in the buffer's temporary directory.
73 RetVal writeExternal(InsetExternalParams const &,
74 std::string const & format,
78 bool external_in_tmpdir,
81 } // namespace external
84 #endif // NOT EXTERNALSUPPORT_H