4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Alejandro Aguilar Sierra
9 * Full author contact details are available in file CREDITS.
12 #ifndef INSET_BIBITEM_H
13 #define INSET_BIBITEM_H
16 #include "InsetCommand.h"
21 /** Used to insert bibitem's information (key and label)
23 Must be automatically inserted as the first object in a
24 bibliography paragraph.
26 class InsetBibitem : public InsetCommand {
29 InsetBibitem(InsetCommandParams const &);
31 void read(Buffer const &, Lexer & lex);
33 docstring const getScreenLabel(Buffer const &) const;
35 EDITABLE editable() const { return IS_EDITABLE; }
37 Inset::Code lyxCode() const { return Inset::BIBITEM_CODE; }
41 int getCounter() const { return counter; }
43 docstring const getBibLabel() const;
45 int plaintext(Buffer const &, odocstream &, OutputParams const &) const;
47 virtual void fillWithBibKeys(Buffer const &,
48 std::vector<std::pair<std::string, docstring> > &,
49 InsetIterator const &) const;
53 virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
55 virtual std::auto_ptr<Inset> doClone() const;
60 static int key_counter;
64 /// Return the widest label in the Bibliography.
65 docstring const bibitemWidest(Buffer const &);
70 #endif // INSET_BIBITEM_H