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 &);
30 std::auto_ptr<InsetBase> clone() const;
31 /** Currently \bibitem is used as a LyX2.x command,
32 so we need this method.
34 void write(Buffer const &, std::ostream &) const;
36 void read(Buffer const &, LyXLex & lex);
38 virtual std::string const getScreenLabel(Buffer const &) const;
40 EDITABLE editable() const { return IS_EDITABLE; }
42 InsetOld::Code lyxCode() const { return InsetOld::BIBITEM_CODE; }
43 /// keep .lyx format compatible
44 bool directWrite() const { return true; }
48 int getCounter() const { return counter; }
50 std::string const getBibLabel() const;
53 virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
58 static int key_counter;
61 #endif // INSET_BIBITEM_H