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"
18 /** Used to insert bibitem's information (key and label)
20 Must be automatically inserted as the first object in a
21 bibliography paragraph.
23 class InsetBibitem : public InsetCommand {
26 InsetBibitem(InsetCommandParams const &);
28 void read(Buffer const &, LyXLex & lex);
30 lyx::docstring const getScreenLabel(Buffer const &) const;
32 EDITABLE editable() const { return IS_EDITABLE; }
34 InsetBase::Code lyxCode() const { return InsetBase::BIBITEM_CODE; }
38 int getCounter() const { return counter; }
40 lyx::docstring const getBibLabel() const;
42 int plaintext(Buffer const &, lyx::odocstream &,
43 OutputParams const &) const;
46 virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
48 virtual std::auto_ptr<InsetBase> doClone() const;
53 static int key_counter;
57 /// Return the widest label in the Bibliography.
58 lyx::docstring const bibitemWidest(Buffer const &);
60 #endif // INSET_BIBITEM_H