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 const &, InsetCommandParams const &);
31 virtual ~InsetBibtex();
33 docstring screenLabel() const;
35 docstring toolTip(BufferView const & bv, int x, int y) const;
37 bool hasSettings() const { return true; }
39 InsetCode lyxCode() const { return BIBTEX_CODE; }
41 DisplayType display() const { return AlignCenter; }
43 int latex(odocstream &, OutputParams const &) const;
45 void fillWithBibKeys(BiblioInfo &, InsetIterator const &) const;
47 support::FileNameList getBibFiles() const;
49 bool addDatabase(docstring const &);
51 bool delDatabase(docstring const &);
53 void validate(LaTeXFeatures &) const;
55 docstring xhtml(odocstream &, OutputParams const &) const;
57 static ParamInfo const & findInfo(std::string const &);
59 static std::string defaultCommand() { return "bibtex"; };
61 static bool isCompatibleCommand(std::string const & s)
62 { return s == "bibtex"; }
63 /// look up the path to the file using TeX
64 static support::FileName
65 getBibTeXPath(docstring const & filename, Buffer const & buf);
67 docstring contextMenu(BufferView const &, int, int) const;
70 void doDispatch(Cursor & cur, FuncRequest & cmd);
72 bool getStatus(Cursor & cur, FuncRequest const & cmd,
73 FuncStatus & flag) const;
75 void editDatabases() const;
77 Inset * clone() const { return new InsetBibtex(*this); }
83 #endif // INSET_BIBTEX_H