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"
17 #include "Biblio_typedefs.h"
22 /** Used to insert bibitem's information (key and label)
24 Must be automatically inserted as the first object in a
25 bibliography paragraph.
27 class InsetBibitem : public InsetCommand {
30 InsetBibitem(InsetCommandParams const &);
32 void read(Buffer const &, Lexer & lex);
34 docstring const getScreenLabel(Buffer const &) const;
36 EDITABLE editable() const { return IS_EDITABLE; }
38 Inset::Code lyxCode() const { return Inset::BIBITEM_CODE; }
42 int getCounter() const { return counter; }
44 docstring const getBibLabel() const;
46 int plaintext(Buffer const &, odocstream &, OutputParams const &) const;
48 virtual void fillWithBibKeys(Buffer const &,
49 biblio::BibKeyList &, 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