1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
2002-09-25 14:26:13 +00:00
|
|
|
/**
|
2007-04-25 01:24:38 +00:00
|
|
|
* \file InsetBibtex.h
|
2002-09-25 14:26:13 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
1999-09-27 18:44:28 +00:00
|
|
|
*
|
2002-09-25 14:26:13 +00:00
|
|
|
* \author Alejandro Aguilar Sierra
|
2002-03-21 17:09:55 +00:00
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-09-25 14:26:13 +00:00
|
|
|
*/
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2003-02-21 09:20:18 +00:00
|
|
|
#ifndef INSET_BIBTEX_H
|
|
|
|
#define INSET_BIBTEX_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2007-08-16 01:59:20 +00:00
|
|
|
#include <map>
|
2007-04-25 01:24:38 +00:00
|
|
|
#include "InsetCommand.h"
|
2007-08-20 17:04:36 +00:00
|
|
|
#include "BiblioInfo.h"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2007-12-05 10:32:49 +00:00
|
|
|
namespace lyx {
|
2006-12-01 20:09:08 +00:00
|
|
|
|
2007-12-05 10:32:49 +00:00
|
|
|
namespace support {
|
|
|
|
class FileNameList;
|
|
|
|
}
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
2003-09-03 17:40:58 +00:00
|
|
|
/** Used to insert BibTeX's information
|
|
|
|
*/
|
|
|
|
class InsetBibtex : public InsetCommand {
|
1999-09-27 18:44:28 +00:00
|
|
|
public:
|
|
|
|
///
|
2003-09-03 17:40:58 +00:00
|
|
|
InsetBibtex(InsetCommandParams const &);
|
2003-05-26 09:13:55 +00:00
|
|
|
///
|
2006-10-21 00:16:43 +00:00
|
|
|
docstring const getScreenLabel(Buffer const &) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
EDITABLE editable() const { return IS_EDITABLE; }
|
2000-08-04 13:12:30 +00:00
|
|
|
///
|
2007-10-13 09:04:52 +00:00
|
|
|
InsetCode lyxCode() const { return BIBTEX_CODE; }
|
2000-08-04 13:12:30 +00:00
|
|
|
///
|
2007-05-18 14:32:29 +00:00
|
|
|
DisplayType display() const { return AlignCenter; }
|
2003-10-22 10:22:09 +00:00
|
|
|
///
|
2006-10-21 00:16:43 +00:00
|
|
|
int latex(Buffer const &, odocstream &, OutputParams const &) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2007-08-14 16:50:51 +00:00
|
|
|
virtual void fillWithBibKeys(Buffer const &,
|
2007-08-20 16:30:02 +00:00
|
|
|
BiblioInfo &, InsetIterator const &) const;
|
2001-07-20 14:18:48 +00:00
|
|
|
///
|
2007-12-05 10:32:49 +00:00
|
|
|
support::FileNameList const getFiles(Buffer const &) const;
|
2001-08-20 13:42:29 +00:00
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
bool addDatabase(std::string const &);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
bool delDatabase(std::string const &);
|
2004-03-29 13:17:25 +00:00
|
|
|
///
|
|
|
|
void validate(LaTeXFeatures &) const;
|
2007-10-25 04:13:56 +00:00
|
|
|
///
|
|
|
|
static CommandInfo const * findInfo(std::string const &);
|
|
|
|
///
|
|
|
|
static std::string defaultCommand() { return "bibtex"; };
|
|
|
|
///
|
|
|
|
static bool isCompatibleCommand(std::string const & s)
|
|
|
|
{ return s == "bibtex"; }
|
2003-10-17 18:01:15 +00:00
|
|
|
protected:
|
2007-04-26 14:56:30 +00:00
|
|
|
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
|
2004-11-23 23:04:52 +00:00
|
|
|
private:
|
2007-08-30 18:03:17 +00:00
|
|
|
virtual Inset * clone() const;
|
2004-11-23 23:04:52 +00:00
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
2003-02-21 09:20:18 +00:00
|
|
|
#endif // INSET_BIBTEX_H
|