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 "frontends/controllers/biblio.h"
20 /** Used to insert citations
22 class InsetCitation : public InsetCommand {
25 InsetCitation(InsetCommandParams const &);
27 std::auto_ptr<InsetBase> clone() const {
28 return std::auto_ptr<InsetBase>(new InsetCitation(params()));
31 std::string const getScreenLabel(Buffer const &) const;
33 EDITABLE editable() const { return IS_EDITABLE; }
35 InsetOld::Code lyxCode() const { return InsetOld::CITE_CODE; }
37 int plaintext(Buffer const &, std::ostream &, int linelen) const;
39 int latex(Buffer const &, std::ostream &,
40 OutputParams const &) const;
42 void validate(LaTeXFeatures &) const;
45 /// This function does the donkey work of creating the pretty label
46 std::string const generateLabel(Buffer const &) const;
50 Cache() : engine(biblio::ENGINE_BASIC) {}
52 biblio::CiteEngine engine;
54 InsetCommandParams params;
56 std::string generated_label;
58 std::string screen_label;
64 #endif // INSET_CITE_H