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
21 class InsetExternalParams;
28 /// A shorthand, helper function
29 Template const * getTemplatePtr(InsetExternalParams const & params);
32 /// Invoke the external editor.
33 void editExternal(InsetExternalParams const & params,
34 Buffer const & buffer);
37 /** Substitute meta-variables in string \p s, making use of \p params and
39 If \p external_in_tmpdir is true, all files are assumed to be in the
40 master buffers temp path, and the mangled filename is used.
41 Otherwise, the output filename (absolute or relative to the parent
42 document, as written in the .lyx file) is used.
44 std::string const doSubstitution(InsetExternalParams const & params,
45 Buffer const & buffer,
46 std::string const & s,
47 bool external_in_tmpdir = false);
50 /** Write the output for a specific file format
51 and generate any external data files.
52 If \param external_in_tmpdir == true, then the generated file is
53 place in the buffer's temporary directory.
55 int writeExternal(InsetExternalParams const &,
56 std::string const & format,
60 bool external_in_tmpdir = false);
62 } // namespace external
65 #endif // NOT EXTERNALSUPPORT_H