1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
2002-09-25 14:26:13 +00:00
|
|
|
/**
|
2003-02-21 09:20:18 +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
|
|
|
|
|
|
|
|
2000-06-07 08:53:40 +00:00
|
|
|
#include <vector>
|
2003-09-03 17:40:58 +00:00
|
|
|
#include "insetcommand.h"
|
1999-09-27 18:44:28 +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
|
|
|
///
|
2003-02-25 14:51:38 +00:00
|
|
|
~InsetBibtex();
|
|
|
|
///
|
2003-07-28 23:53:36 +00:00
|
|
|
std::auto_ptr<InsetBase> clone() const;
|
2003-09-03 17:40:58 +00:00
|
|
|
///
|
|
|
|
void metrics(MetricsInfo &, Dimension &) const;
|
|
|
|
///
|
|
|
|
void draw(PainterInfo & pi, int x, int y) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
std::string 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
|
|
|
///
|
2003-07-25 21:20:24 +00:00
|
|
|
InsetOld::Code lyxCode() const { return InsetOld::BIBTEX_CODE; }
|
2000-08-04 13:12:30 +00:00
|
|
|
///
|
2003-10-22 10:22:09 +00:00
|
|
|
bool display() const { return true; }
|
|
|
|
///
|
2003-08-28 07:41:31 +00:00
|
|
|
int latex(Buffer const &, std::ostream &,
|
2003-05-23 08:59:47 +00:00
|
|
|
LatexRunParams const &) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2003-08-28 07:41:31 +00:00
|
|
|
void fillWithBibKeys(Buffer const & buffer,
|
2003-10-06 15:43:21 +00:00
|
|
|
std::vector<std::pair<std::string,std::string> > & keys) const;
|
2001-07-20 14:18:48 +00:00
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
std::vector<std::string> 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 &);
|
2003-10-17 18:01:15 +00:00
|
|
|
protected:
|
|
|
|
///
|
|
|
|
virtual
|
2003-10-29 10:47:21 +00:00
|
|
|
DispatchResult
|
2003-10-17 18:01:15 +00:00
|
|
|
priv_dispatch(FuncRequest const & cmd, idx_type &, pos_type &);
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
|
|
|
|
2003-02-21 09:20:18 +00:00
|
|
|
#endif // INSET_BIBTEX_H
|