X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FExternalTemplate.h;h=23f1f78802ffb9d98d7977ac36a10fce38e41ad1;hb=850e4d80c0ec8df578c4ab5d73952e435141b7d6;hp=99cededd1275575c552506f499d4bc78949abe4b;hpb=958bd96f539bcca03283e144b935abf7e3747af1;p=lyx.git diff --git a/src/insets/ExternalTemplate.h b/src/insets/ExternalTemplate.h index 99cededd12..23f1f78802 100644 --- a/src/insets/ExternalTemplate.h +++ b/src/insets/ExternalTemplate.h @@ -15,11 +15,20 @@ #include "ExternalTransforms.h" -#include - -class LyXLex; +#include namespace lyx { + +namespace support { class FileName; } + +class Lexer; + +enum PreviewMode { + PREVIEW_OFF = 0, + PREVIEW_GRAPHICS, + PREVIEW_INSTANT +}; + namespace external { class Template { @@ -27,7 +36,7 @@ public: /// We have to have default commands for safety reasons! Template(); /// - void readTemplate(LyXLex &); + void readTemplate(Lexer &); /// void dumpFormats(std::ostream &) const; @@ -53,6 +62,8 @@ public: std::string fileRegExp; /// Should we do automatic production of the output? bool automaticProduction; + /// How should we preview the data in LyX? + PreviewMode preview_mode; /// A collection of transforms that we can use to transform the data. std::vector transformIds; @@ -61,7 +72,7 @@ public: public: Format(); /// - void readFormat(LyXLex &); + void readFormat(Lexer &); /// The text that should be inserted into the exported file std::string product; @@ -81,7 +92,7 @@ public: std::map option_transformers; typedef std::map > FileMap; + std::vector > FileMap; /// Referenced files for some formats FileMap referencedFiles; }; @@ -116,7 +127,7 @@ public: std::string const getPreambleDefByName(std::string const & name) const; private: TemplateManager(); - void readTemplates(std::string const & path); + void readTemplates(support::FileName const & path); void dumpTemplates(std::ostream &) const; void dumpPreambleDefs(std::ostream &) const;