4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Alejandro Aguilar Sierra
9 * Full author contact details are available in file CREDITS.
12 #ifndef INSET_BIBTEX_H
13 #define INSET_BIBTEX_H
15 #include "BiblioInfo.h"
16 #include "InsetCommand.h"
18 #include "support/FileNameList.h"
24 /** Used to insert BibTeX's information
26 class InsetBibtex : public InsetCommand {
29 InsetBibtex(Buffer *, InsetCommandParams const &);
34 support::FileNameList getBibFiles() const;
36 bool addDatabase(docstring const &);
38 bool delDatabase(docstring const &);
40 /// \name Public functions inherited from Inset class
43 docstring toolTip(BufferView const & bv, int x, int y) const;
45 bool hasSettings() const { return true; }
47 InsetCode lyxCode() const { return BIBTEX_CODE; }
49 DisplayType display() const { return AlignCenter; }
51 int latex(odocstream &, OutputParams const &) const;
53 void fillWithBibKeys(BiblioInfo &, InsetIterator const &) const;
55 void validate(LaTeXFeatures &) const;
57 docstring xhtml(XHTMLStream &, OutputParams const &) const;
59 docstring contextMenu(BufferView const &, int, int) const;
62 /// \name Static public methods obligated for InsetCommand derived classes
65 static ParamInfo const & findInfo(std::string const &);
67 static std::string defaultCommand() { return "bibtex"; }
69 static bool isCompatibleCommand(std::string const & s)
70 { return s == "bibtex"; }
74 /// look up the path to the file using TeX
75 static support::FileName
76 getBibTeXPath(docstring const & filename, Buffer const & buf);
78 void editDatabases() const;
80 /// \name Private functions inherited from Inset class
83 bool getStatus(Cursor & cur, FuncRequest const & cmd,
84 FuncStatus & flag) const;
86 void doDispatch(Cursor & cur, FuncRequest & cmd);
88 Inset * clone() const { return new InsetBibtex(*this); }
91 /// \name Private functions inherited from InsetCommand class
94 docstring screenLabel() const;
101 #endif // INSET_BIBTEX_H