]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBibtex.h
Merge branch 'master' into features/indexmacros
[lyx.git] / src / insets / InsetBibtex.h
index e54dd7ab4f987018f4b6ad71ec55d708765dd0b9..55451f564186da57ba64ecd804f1b17f136c731a 100644 (file)
 #ifndef INSET_BIBTEX_H
 #define INSET_BIBTEX_H
 
-#include "BiblioInfo.h"
-#include "EmbeddedFiles.h"
 #include "InsetCommand.h"
 
-#include "support/FileNameList.h"
-
-#include <map>
-
 namespace lyx {
 
+class docstring_list;
+
+namespace support {
+       class FileName;
+} // namespace support
 
 /** Used to insert BibTeX's information
   */
 class InsetBibtex : public InsetCommand {
 public:
        ///
-       InsetBibtex(InsetCommandParams const &);
+       InsetBibtex(Buffer *, InsetCommandParams const &);
+
+       ///
+       docstring_list getBibFiles() const;
+       ///
+       bool addDatabase(docstring const &);
+       ///
+       bool delDatabase(docstring const &);
        ///
-       docstring screenLabel() const;
+       void write(std::ostream &) const override;
+
+       /// \name Public functions inherited from Inset class
+       //@{
        ///
-       EDITABLE editable() const { return IS_EDITABLE; }
+       docstring toolTip(BufferView const & bv, int x, int y) const override;
        ///
-       InsetCode lyxCode() const { return BIBTEX_CODE; }
+       bool hasSettings() const override { return true; }
        ///
-       DisplayType display() const { return AlignCenter; }
+       InsetCode lyxCode() const override { return BIBTEX_CODE; }
        ///
-       int latex(odocstream &, OutputParams const &) const;
+       int rowFlags() const override { return Display; }
        ///
-       void fillWithBibKeys(BiblioInfo &, InsetIterator const &) const;
+       void latex(otexstream &, OutputParams const &) const override;
        ///
-       support::FileNameList getBibFiles() const;
+       int plaintext(odocstringstream & ods, OutputParams const & op,
+                     size_t max_length = INT_MAX) const override;
        ///
-       bool addDatabase(docstring const &);
+       void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override;
        ///
-       bool delDatabase(docstring const &);
+       void addToToc(DocIterator const & di, bool output_active,
+                                 UpdateType utype, TocBackend & backend) const override;
+       ///
+       void collectBibKeys(InsetIterator const &, support::FileNameList &) const override;
+       ///
+       void validate(LaTeXFeatures &) const override;
        ///
-       void validate(LaTeXFeatures &) const;
+       docstring xhtml(XMLStream &, OutputParams const &) const override;
+       ///
+       void docbook(XMLStream &, OutputParams const &) const override;
+       ///
+       std::string contextMenuName() const override;
+       //@}
+
+       /// \name Static public methods obligated for InsetCommand derived classes
+       //@{
        ///
        static ParamInfo const & findInfo(std::string const &);
        ///
-       static std::string defaultCommand() { return "bibtex"; };
+       static std::string defaultCommand() { return "bibtex"; }
        ///
-       static bool isCompatibleCommand(std::string const & s) 
+       static bool isCompatibleCommand(std::string const & s)
                { return s == "bibtex"; }
-       /// look up the path to the file using TeX
-       static support::FileName 
-               getBibTeXPath(docstring const & filename, Buffer const & buf);
+       //@}
+
 private:
        ///
-       void doDispatch(Cursor & cur, FuncRequest & cmd);
+       void editDatabases(docstring const & db = docstring()) const;
+       ///
+       void parseBibTeXFiles(support::FileNameList &) const;
+       ///
+       bool usingBiblatex() const;
+       ///
+       docstring getRefLabel() const;
+       ///
+       std::map<std::string, std::string> getFileEncodings() const;
+
+       /// \name Private functions inherited from Inset class
+       //@{
+       ///
+       bool getStatus(Cursor & cur, FuncRequest const & cmd,
+               FuncStatus & flag) const override;
+       ///
+       void doDispatch(Cursor & cur, FuncRequest & cmd) override;
+       ///
+       Inset * clone() const override { return new InsetBibtex(*this); }
+       //@}
+
+       /// \name Private functions inherited from InsetCommand class
+       //@{
        ///
-       Inset * clone() const { return new InsetBibtex(*this); }
+       docstring screenLabel() const override;
+       //@}
 };