X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetBibtex.h;h=ec783d857bfc4e0edaf33aaa307f15594083f668;hb=22e6659780390a19174d1bf896317a5baf9e40d7;hp=82defd4fd72c3380c178708ebdf43ad08afec513;hpb=8a221dc70c53b950697f8440ec4894f2cede7cfa;p=lyx.git diff --git a/src/insets/InsetBibtex.h b/src/insets/InsetBibtex.h index 82defd4fd7..ec783d857b 100644 --- a/src/insets/InsetBibtex.h +++ b/src/insets/InsetBibtex.h @@ -12,48 +12,95 @@ #ifndef INSET_BIBTEX_H #define INSET_BIBTEX_H - -#include #include "InsetCommand.h" -#include "support/FileName.h" +namespace lyx { +class BiblioInfo; +class docstring_list; -namespace lyx { +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 const getScreenLabel(Buffer const &) const; + ~InsetBibtex(); + /// - EDITABLE editable() const { return IS_EDITABLE; } + docstring_list getBibFiles() const; /// - Inset::Code lyxCode() const { return Inset::BIBTEX_CODE; } + bool addDatabase(docstring const &); /// - DisplayType display() const { return AlignCenter; } + bool delDatabase(docstring const &); /// - int latex(Buffer const &, odocstream &, OutputParams const &) const; + void write(std::ostream &) const; + + /// \name Public functions inherited from Inset class + //@{ /// - virtual void fillWithBibKeys(Buffer const &, - std::vector > &, - InsetIterator const &) const; + docstring toolTip(BufferView const & bv, int x, int y) const; /// - std::vector const getFiles(Buffer const &) const; + bool hasSettings() const { return true; } /// - bool addDatabase(std::string const &); + InsetCode lyxCode() const { return BIBTEX_CODE; } /// - bool delDatabase(std::string const &); + DisplayType display() const { return AlignCenter; } + /// + void latex(otexstream &, OutputParams const &) const; + /// + int plaintext(odocstringstream & ods, OutputParams const & op, + size_t max_length = INT_MAX) const; + /// + void collectBibKeys(InsetIterator const &, support::FileNameList &) const; /// void validate(LaTeXFeatures &) const; -protected: - virtual void doDispatch(Cursor & cur, FuncRequest & cmd); + /// + docstring xhtml(XHTMLStream &, OutputParams const &) const; + /// + std::string contextMenuName() const; + //@} + + /// \name Static public methods obligated for InsetCommand derived classes + //@{ + /// + static ParamInfo const & findInfo(std::string const &); + /// + static std::string defaultCommand() { return "bibtex"; } + /// + static bool isCompatibleCommand(std::string const & s) + { return s == "bibtex"; } + //@} + private: - virtual std::auto_ptr doClone() const; + /// + void editDatabases() const; + /// + void parseBibTeXFiles(support::FileNameList &) const; + /// + bool usingBiblatex() const; + + /// \name Private functions inherited from Inset class + //@{ + /// + bool getStatus(Cursor & cur, FuncRequest const & cmd, + FuncStatus & flag) const; + /// + void doDispatch(Cursor & cur, FuncRequest & cmd); + /// + Inset * clone() const { return new InsetBibtex(*this); } + //@} + /// \name Private functions inherited from InsetCommand class + //@{ + /// + docstring screenLabel() const; + //@} };