]> git.lyx.org Git - lyx.git/blob - src/insets/InsetBibtex.h
* GuiView.{cpp, h}:
[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 "BiblioInfo.h"
16 #include "InsetCommand.h"
17
18 #include "support/FileNameList.h"
19
20 #include <map>
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 screenLabel() const;
32         ///
33         EDITABLE editable() const { return IS_EDITABLE; }
34         ///
35         InsetCode lyxCode() const { return BIBTEX_CODE; }
36         ///
37         DisplayType display() const { return AlignCenter; }
38         ///
39         int latex(odocstream &, OutputParams const &) const;
40         ///
41         void fillWithBibKeys(BiblioInfo &, InsetIterator const &) const;
42         ///
43         support::FileNameList getBibFiles() const;
44         ///
45         bool addDatabase(docstring const &);
46         ///
47         bool delDatabase(docstring const &);
48         ///
49         void validate(LaTeXFeatures &) const;
50         ///
51         static ParamInfo const & findInfo(std::string const &);
52         ///
53         static std::string defaultCommand() { return "bibtex"; };
54         ///
55         static bool isCompatibleCommand(std::string const & s) 
56                 { return s == "bibtex"; }
57         /// look up the path to the file using TeX
58         static support::FileName 
59                 getBibTeXPath(docstring const & filename, Buffer const & buf);
60 private:
61         ///
62         void doDispatch(Cursor & cur, FuncRequest & cmd);
63         ///
64         Inset * clone() const { return new InsetBibtex(*this); }
65 };
66
67
68 } // namespace lyx
69
70 #endif // INSET_BIBTEX_H