]> git.lyx.org Git - lyx.git/blob - src/insets/insetbibtex.h
Convert most of the bibtex machinery to docstring.
[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 #include "support/filename.h"
20
21
22 namespace lyx {
23
24 /** Used to insert BibTeX's information
25   */
26 class InsetBibtex : public InsetCommand {
27 public:
28         ///
29         InsetBibtex(InsetCommandParams const &);
30         ///
31         docstring const getScreenLabel(Buffer const &) const;
32         ///
33         EDITABLE editable() const { return IS_EDITABLE; }
34         ///
35         InsetBase::Code lyxCode() const { return InsetBase::BIBTEX_CODE; }
36         ///
37         bool display() const { return true; }
38         ///
39         int latex(Buffer const &, odocstream &, OutputParams const &) const;
40         ///
41         void fillWithBibKeys(Buffer const & buffer,
42                 std::vector<std::pair<std::string, docstring> > & keys) const;
43         ///
44         std::vector<support::FileName> const getFiles(Buffer const &) const;
45         ///
46         bool addDatabase(std::string const &);
47         ///
48         bool delDatabase(std::string const &);
49         ///
50         void validate(LaTeXFeatures &) const;
51 protected:
52         virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
53 private:
54         virtual std::auto_ptr<InsetBase> doClone() const;
55
56 };
57
58
59 } // namespace lyx
60
61 #endif // INSET_BIBTEX_H