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"
20 /** Used to insert bibitem's information (key and label)
22 Must be automatically inserted as the first object in a
23 bibliography paragraph.
25 class InsetBibitem : public InsetCommand {
28 InsetBibitem(InsetCommandParams const &);
32 Inset * clone(Buffer const &, bool same_id = false) const;
33 /** Currently \bibitem is used as a LyX2.x command,
34 so we need this method.
36 void write(Buffer const *, std::ostream &) const;
38 void read(Buffer const *, LyXLex & lex);
40 virtual string const getScreenLabel(Buffer const *) const;
42 void edit(BufferView *, int x, int y, mouse_button::state button);
44 void edit(BufferView * bv, bool front = true);
46 EDITABLE editable() const { return IS_EDITABLE; }
48 Inset::Code lyxCode() const { return Inset::BIBITEM_CODE; }
49 /// keep .lyx format compatible
50 bool directWrite() const { return true; }
54 int getCounter() const { return counter; }
56 string const getBibLabel() const;
69 static int key_counter;
72 #endif // INSET_BIBITEM_H