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
|
|
|
*
|
2002-09-25 14:26:13 +00:00
|
|
|
* Full author contact details are available in file CREDITS
|
|
|
|
*/
|
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>
|
2000-08-04 13:12:30 +00:00
|
|
|
#include "insetcommand.h"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2000-02-25 12:06:15 +00:00
|
|
|
class Buffer;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2002-03-21 17:09:55 +00:00
|
|
|
/** Used to insert BibTeX's information
|
1999-09-27 18:44:28 +00:00
|
|
|
*/
|
2000-07-15 23:51:46 +00:00
|
|
|
class InsetBibtex : public InsetCommand {
|
1999-09-27 18:44:28 +00:00
|
|
|
public:
|
|
|
|
///
|
2001-07-06 15:57:54 +00:00
|
|
|
InsetBibtex(InsetCommandParams const &, bool same_id = false);
|
2000-03-20 14:49:54 +00:00
|
|
|
///
|
2001-07-06 15:57:54 +00:00
|
|
|
Inset * clone(Buffer const &, bool same_id = false) const {
|
|
|
|
return new InsetBibtex(params(), same_id);
|
2000-10-10 11:50:43 +00:00
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2001-07-28 12:24:16 +00:00
|
|
|
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
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
Inset::Code lyxCode() const { return Inset::BIBTEX_CODE; }
|
2000-08-04 13:12:30 +00:00
|
|
|
///
|
2002-05-26 17:33:14 +00:00
|
|
|
void edit(BufferView *, int x, int y, mouse_button::state button);
|
2001-07-20 14:18:48 +00:00
|
|
|
///
|
|
|
|
void edit(BufferView * bv, bool front = true);
|
2002-03-21 17:09:55 +00:00
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
int latex(Buffer const *, std::ostream &,
|
2002-03-21 17:09:55 +00:00
|
|
|
bool fragile, bool freespace) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2003-02-18 13:25:18 +00:00
|
|
|
void fillWithBibKeys(Buffer const *,
|
|
|
|
std::vector<std::pair<string,string> > &) const;
|
2001-07-20 14:18:48 +00:00
|
|
|
///
|
2001-08-20 13:42:29 +00:00
|
|
|
std::vector<string> const getFiles(Buffer const &) const;
|
|
|
|
///
|
2001-07-20 14:18:48 +00:00
|
|
|
bool addDatabase(string const &);
|
|
|
|
///
|
|
|
|
bool delDatabase(string const &);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2002-03-21 17:09:55 +00:00
|
|
|
bool display() const { return true; }
|
2000-07-15 23:51:46 +00:00
|
|
|
///
|
2002-03-21 17:09:55 +00:00
|
|
|
struct Holder {
|
2000-03-20 14:49:54 +00:00
|
|
|
InsetBibtex * inset;
|
|
|
|
BufferView * view;
|
|
|
|
};
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
private:
|
2000-03-20 14:49:54 +00:00
|
|
|
///
|
|
|
|
Holder holder;
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
|
|
|
|
2003-02-21 09:20:18 +00:00
|
|
|
#endif // INSET_BIBTEX_H
|