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 "InsetCommand.h"
26 /** Used to insert BibTeX's information
28 class InsetBibtex : public InsetCommand {
31 InsetBibtex(Buffer *, InsetCommandParams const &);
36 support::FileNameList getBibFiles() const;
38 bool addDatabase(docstring const &);
40 bool delDatabase(docstring const &);
42 /// \name Public functions inherited from Inset class
45 docstring toolTip(BufferView const & bv, int x, int y) const;
47 bool hasSettings() const { return true; }
49 InsetCode lyxCode() const { return BIBTEX_CODE; }
51 DisplayType display() const { return AlignCenter; }
53 void latex(otexstream &, OutputParams const &) const;
55 void collectBibKeys(InsetIterator const &) const;
57 void validate(LaTeXFeatures &) const;
59 docstring xhtml(XHTMLStream &, OutputParams const &) const;
61 std::string contextMenuName() const;
64 /// \name Static public methods obligated for InsetCommand derived classes
67 static ParamInfo const & findInfo(std::string const &);
69 static std::string defaultCommand() { return "bibtex"; }
71 static bool isCompatibleCommand(std::string const & s)
72 { return s == "bibtex"; }
76 /// look up the path to the file using TeX
77 static support::FileName
78 getBibTeXPath(docstring const & filename, Buffer const & buf);
80 void editDatabases() const;
82 void parseBibTeXFiles() const;
84 /// \name Private functions inherited from Inset class
87 bool getStatus(Cursor & cur, FuncRequest const & cmd,
88 FuncStatus & flag) const;
90 void doDispatch(Cursor & cur, FuncRequest & cmd);
92 Inset * clone() const { return new InsetBibtex(*this); }
95 /// \name Private functions inherited from InsetCommand class
98 docstring screenLabel() const;
105 #endif // INSET_BIBTEX_H