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"
19 /** Used to insert citations
21 class InsetCitation : public InsetCommand {
24 InsetCitation(InsetCommandParams const &);
28 std::auto_ptr<InsetBase> clone() const {
29 return std::auto_ptr<InsetBase>(new InsetCitation(params()));
32 std::string const getScreenLabel(Buffer const &) const;
34 EDITABLE editable() const { return IS_EDITABLE; }
36 InsetOld::Code lyxCode() const { return InsetOld::CITE_CODE; }
38 int ascii(Buffer const &, std::ostream &, int linelen) const;
40 int latex(Buffer const &, std::ostream &,
41 LatexRunParams const &) const;
43 DispatchResult localDispatch(FuncRequest const & cmd);
45 void validate(LaTeXFeatures &) const;
50 priv_dispatch(FuncRequest const & cmd, idx_type &, pos_type &);
63 Cache() : style(BASIC) {}
67 InsetCommandParams params;
69 std::string generated_label;
71 std::string screen_label;
74 /// This function does the donkey work of creating the pretty label
75 std::string const generateLabel(Buffer const &) const;
77 Cache::Style getStyle(Buffer const & buffer) const;
83 #endif // INSET_CITE_H