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 &, LyXLex & lex);
33 docstring const getScreenLabel(Buffer const &) const;
35 EDITABLE editable() const { return IS_EDITABLE; }
37 InsetBase::Code lyxCode() const { return InsetBase::BIBITEM_CODE; }
41 int getCounter() const { return counter; }
43 docstring const getBibLabel() const;
45 int plaintext(Buffer const &, odocstream &, OutputParams const &) const;
48 virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
50 virtual std::auto_ptr<InsetBase> doClone() const;
55 static int key_counter;
59 /// Return the widest label in the Bibliography.
60 docstring const bibitemWidest(Buffer const &);
65 #endif // INSET_BIBITEM_H