]> git.lyx.org Git - lyx.git/blob - src/insets/InsetBibtex.h
InsetTabular.cpp: fix #6585 also for wrapped floats - thanks Vincent
[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(Buffer *, InsetCommandParams const &);
30         ///
31         ~InsetBibtex();
32
33         ///
34         support::FileNameList getBibFiles() const;
35         ///
36         bool addDatabase(docstring const &);
37         ///
38         bool delDatabase(docstring const &);
39
40         /// \name Public functions inherited from Inset class
41         //@{
42         ///
43         docstring toolTip(BufferView const & bv, int x, int y) const;
44         ///
45         bool hasSettings() const { return true; }
46         ///
47         InsetCode lyxCode() const { return BIBTEX_CODE; }
48         ///
49         DisplayType display() const { return AlignCenter; }
50         ///
51         int latex(odocstream &, OutputParams const &) const;
52         ///
53         void fillWithBibKeys(BiblioInfo &, InsetIterator const &) const;
54         ///
55         void validate(LaTeXFeatures &) const;
56         ///
57         docstring xhtml(XHTMLStream &, OutputParams const &) const;
58         ///
59         docstring contextMenu(BufferView const &, int, int) const;
60         //@}
61
62         /// \name Static public methods obligated for InsetCommand derived classes
63         //@{
64         ///
65         static ParamInfo const & findInfo(std::string const &);
66         ///
67         static std::string defaultCommand() { return "bibtex"; }
68         ///
69         static bool isCompatibleCommand(std::string const & s) 
70                 { return s == "bibtex"; }
71         //@}
72
73 private:
74         /// look up the path to the file using TeX
75         static support::FileName 
76                 getBibTeXPath(docstring const & filename, Buffer const & buf);
77         ///
78         void editDatabases() const;
79
80         /// \name Private functions inherited from Inset class
81         //@{
82         ///
83         bool getStatus(Cursor & cur, FuncRequest const & cmd,
84                 FuncStatus & flag) const;
85         ///
86         void doDispatch(Cursor & cur, FuncRequest & cmd);
87         ///
88         Inset * clone() const { return new InsetBibtex(*this); }
89         //@}
90
91         /// \name Private functions inherited from InsetCommand class
92         //@{
93         ///
94         docstring screenLabel() const;
95         //@}
96 };
97
98
99 } // namespace lyx
100
101 #endif // INSET_BIBTEX_H