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
16 #include "support/docstream.h"
20 class InsetExternalParams;
27 /// A shorthand, helper function
28 Template const * getTemplatePtr(InsetExternalParams const & params);
31 /// Invoke the external editor.
32 void editExternal(InsetExternalParams const & params,
33 Buffer const & buffer);
42 /** Substitute meta-variables in string \p s, making use of \p params and
44 If \p external_in_tmpdir is true, all files are assumed to be in the
45 master buffers temp path, and the mangled filename is used.
46 Otherwise, the output filename (absolute or relative to the parent
47 document, as written in the .lyx file) is used.
49 std::string const doSubstitution(InsetExternalParams const & params,
50 Buffer const & buffer,
51 std::string const & s,
53 bool external_in_tmpdir = false,
54 Substitute what = ALL);
57 /** Write the output for a specific file format
58 and generate any external data files.
59 If \p external_in_tmpdir == true, then the generated file is
60 place in the buffer's temporary directory.
62 int writeExternal(InsetExternalParams const &,
63 std::string const & format,
67 bool external_in_tmpdir,
68 bool external_in_comment);
70 } // namespace external
73 #endif // NOT EXTERNALSUPPORT_H