#include <map>
#include "InsetCommand.h"
#include "BiblioInfo.h"
-
-#include "support/FileName.h"
-
+#include "EmbeddedFiles.h"
namespace lyx {
+
/** Used to insert BibTeX's information
*/
class InsetBibtex : public InsetCommand {
///
InsetBibtex(InsetCommandParams const &);
///
- docstring const getScreenLabel(Buffer const &) const;
+ void setBuffer(Buffer & buffer);
+ ///
+ docstring screenLabel() const;
///
EDITABLE editable() const { return IS_EDITABLE; }
///
///
DisplayType display() const { return AlignCenter; }
///
- int latex(Buffer const &, odocstream &, OutputParams const &) const;
+ int latex(odocstream &, OutputParams const &) const;
///
- virtual void fillWithBibKeys(Buffer const &,
- BiblioInfo &, InsetIterator const &) const;
+ void fillWithBibKeys(BiblioInfo &, InsetIterator const &) const;
///
- std::vector<support::FileName> const getFiles(Buffer const &) const;
+ EmbeddedFileList embeddedFiles() const;
///
bool addDatabase(std::string const &);
///
///
void validate(LaTeXFeatures &) const;
///
- static CommandInfo const * findInfo(std::string const &);
+ static ParamInfo const & findInfo(std::string const &);
///
static std::string defaultCommand() { return "bibtex"; };
///
static bool isCompatibleCommand(std::string const & s)
{ return s == "bibtex"; }
-protected:
- virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
+ /// create bibfiles_ from params bibfiles and embed
+ /**
+ \param bibfiles comma separated bib files
+ \param embed comma separated embed status
+ */
+ void createBibFiles(docstring const & bibfiles, docstring const & embed) const;
+ /// update bibfiles and embed from bibfiles_
+ void updateParam();
private:
- virtual Inset * clone() const;
-
+ ///
+ void registerEmbeddedFiles(EmbeddedFileList &) const;
+ ///
+ void updateEmbeddedFile(EmbeddedFile const & file);
+ /// embedded bib files
+ mutable EmbeddedFileList bibfiles_;
+ ///
+ void doDispatch(Cursor & cur, FuncRequest & cmd);
+ ///
+ Inset * clone() const { return new InsetBibtex(*this); }
};