4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
10 * Full author contact details are available in file CREDITS.
17 #include "insetcommand.h"
18 #include "bufferparams.h"
21 /** Used to insert citations
23 class InsetCitation : public InsetCommand {
26 InsetCitation(InsetCommandParams const &);
28 lyx::docstring const getScreenLabel(Buffer const &) const;
30 EDITABLE editable() const { return IS_EDITABLE; }
32 InsetBase::Code lyxCode() const { return InsetBase::CITE_CODE; }
34 int plaintext(Buffer const &, lyx::odocstream &, OutputParams const &) const;
36 int latex(Buffer const &, lyx::odocstream &,
37 OutputParams const &) const;
39 int docbook(Buffer const &, lyx::odocstream &,
40 OutputParams const &) const;
41 /// the string that is passed to the TOC
42 virtual int textString(Buffer const &, lyx::odocstream &,
43 OutputParams const &) const;
45 void validate(LaTeXFeatures &) const;
47 void replaceContents(std::string const & from, std::string const & to);
50 virtual std::auto_ptr<InsetBase> doClone() const
52 return std::auto_ptr<InsetBase>(new InsetCitation(params()));
55 /// This function does the donkey work of creating the pretty label
56 lyx::docstring const generateLabel(Buffer const &) const;
61 Cache() : engine(lyx::biblio::ENGINE_BASIC), params("cite") {}
63 lyx::biblio::CiteEngine engine;
65 InsetCommandParams params;
67 lyx::docstring generated_label;
69 lyx::docstring screen_label;
75 #endif // INSET_CITE_H