]> git.lyx.org Git - lyx.git/blob - src/insets/InsetBibtex.h
25ce300c9b2854a2d7614b8a8fbc15c5df528702
[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 #include <map>
16 #include "InsetCommand.h"
17 #include "BiblioInfo.h"
18
19 namespace lyx {
20
21 namespace support {
22 class FileNameList;
23 }
24
25
26 /** Used to insert BibTeX's information
27   */
28 class InsetBibtex : public InsetCommand {
29 public:
30         ///
31         InsetBibtex(InsetCommandParams const &);
32         ///
33         docstring const getScreenLabel(Buffer const &) const;
34         ///
35         EDITABLE editable() const { return IS_EDITABLE; }
36         ///
37         InsetCode lyxCode() const { return BIBTEX_CODE; }
38         ///
39         DisplayType display() const { return AlignCenter; }
40         ///
41         int latex(Buffer const &, odocstream &, OutputParams const &) const;
42         ///
43         virtual void fillWithBibKeys(Buffer const &,
44                 BiblioInfo &, InsetIterator const &) const;
45         ///
46         support::FileNameList const getFiles(Buffer const &) const;
47         ///
48         bool addDatabase(std::string const &);
49         ///
50         bool delDatabase(std::string const &);
51         ///
52         void validate(LaTeXFeatures &) const;
53         ///
54         static CommandInfo const * findInfo(std::string const &);
55         ///
56         static std::string defaultCommand() { return "bibtex"; };
57         ///
58         static bool isCompatibleCommand(std::string const & s) 
59                 { return s == "bibtex"; }
60 protected:
61         virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
62 private:
63         virtual Inset * clone() const;
64
65 };
66
67
68 } // namespace lyx
69
70 #endif // INSET_BIBTEX_H