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"
22 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);
43 /** Substitute meta-variables in string \p s, making use of \p params and
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.
50 std::string const doSubstitution(InsetExternalParams const & params,
51 Buffer const & buffer,
52 std::string const & s,
54 bool external_in_tmpdir = false,
55 Substitute what = ALL);
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.
63 int writeExternal(InsetExternalParams const &,
64 std::string const & format,
68 bool external_in_tmpdir,
69 bool external_in_comment);
71 } // namespace external
74 #endif // NOT EXTERNALSUPPORT_H