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