]> git.lyx.org Git - lyx.git/blob - src/insets/insetbibitem.h
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[lyx.git] / src / insets / insetbibitem.h
1 // -*- C++ -*-
2 /**
3  * \file insetbibitem.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Alejandro Aguilar Sierra
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef INSET_BIBITEM_H
13 #define INSET_BIBITEM_H
14
15
16 #include "insetcommand.h"
17
18
19 namespace lyx {
20
21 /** Used to insert bibitem's information (key and label)
22
23   Must be automatically inserted as the first object in a
24   bibliography paragraph.
25   */
26 class InsetBibitem : public InsetCommand {
27 public:
28         ///
29         InsetBibitem(InsetCommandParams const &);
30         ///
31         void read(Buffer const &, LyXLex & lex);
32         ///
33         docstring const getScreenLabel(Buffer const &) const;
34         ///
35         EDITABLE editable() const { return IS_EDITABLE; }
36         ///
37         InsetBase::Code lyxCode() const { return InsetBase::BIBITEM_CODE; }
38         ///
39         void setCounter(int);
40         ///
41         int getCounter() const { return counter; }
42         ///
43         docstring const getBibLabel() const;
44         ///
45         int plaintext(Buffer const &, odocstream &, OutputParams const &) const;
46 protected:
47         ///
48         virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
49 private:
50         virtual std::auto_ptr<InsetBase> doClone() const;
51
52         ///
53         int counter;
54         ///
55         static int key_counter;
56 };
57
58
59 /// Return the widest label in the Bibliography.
60 docstring const bibitemWidest(Buffer const &);
61
62
63 } // namespace lyx
64
65 #endif // INSET_BIBITEM_H