]> git.lyx.org Git - lyx.git/blob - src/insets/insetbibtex.h
Rename LatexRunParams::fragile as moving_arg.
[lyx.git] / src / insets / insetbibtex.h
1 // -*- C++ -*-
2 /**
3  * \file insetbibtex.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_BIBTEX_H
13 #define INSET_BIBTEX_H
14
15
16 #include <vector>
17 #include "insetcommand.h"
18
19 class Buffer;
20
21 /** Used to insert BibTeX's information
22   */
23 class InsetBibtex : public InsetCommand {
24 public:
25         ///
26         InsetBibtex(InsetCommandParams const &, bool same_id = false);
27         ///
28         ~InsetBibtex();
29         ///
30         Inset * clone(Buffer const &, bool same_id = false) const {
31                 return new InsetBibtex(params(), same_id);
32         }
33         /// small wrapper for the time being
34         virtual dispatch_result localDispatch(FuncRequest const & cmd);
35         ///
36         string const getScreenLabel(Buffer const *) const;
37         ///
38         EDITABLE editable() const { return IS_EDITABLE; }
39         ///
40         Inset::Code lyxCode() const { return Inset::BIBTEX_CODE; }
41         ///
42         int latex(Buffer const *, std::ostream &,
43                   LatexRunParams const &) const;
44         ///
45         void fillWithBibKeys(Buffer const *,
46                 std::vector<std::pair<string,string> > &) const;
47         ///
48         std::vector<string> const getFiles(Buffer const &) const;
49         ///
50         bool addDatabase(string const &);
51         ///
52         bool delDatabase(string const &);
53         ///
54         bool display() const { return true; }
55         ///
56         struct Holder {
57                 InsetBibtex * inset;
58                 BufferView * view;
59         };
60
61 private:
62         ///
63         Holder holder;
64 };
65
66 #endif // INSET_BIBTEX_H