// -*- C++ -*-
-/* This file is part of*
- * ======================================================
+/**
+ * \file insetbib.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * LyX, The Document Processor
- *
- * Copyright 1995 Matthias Ettrich
- * Copyright 1995-2001 The LyX Team.
- *
- * ====================================================== */
+ * \author Alejandro Aguilar Sierra
+ *
+ * Full author contact details are available in file CREDITS
+ */
#ifndef INSET_BIB_H
#define INSET_BIB_H
class Buffer;
/** Used to insert bibitem's information (key and label)
-
+
Must be automatically inserted as the first object in a
- bibliography paragraph.
+ bibliography paragraph.
*/
class InsetBibKey : public InsetCommand {
public:
///
void read(Buffer const *, LyXLex & lex);
///
- virtual string const getScreenLabel() const;
+ virtual string const getScreenLabel(Buffer const *) const;
///
- void edit(BufferView *, int x, int y, unsigned int button);
+ void edit(BufferView *, int x, int y, mouse_button::state button);
///
void edit(BufferView * bv, bool front = true);
///
- EDITABLE editable() const { return IS_EDITABLE; }
+ EDITABLE editable() const { return IS_EDITABLE; }
/// A user can't neither insert nor delete this inset
bool deletable() const {
return false;
InsetBibKey * inset;
BufferView * view;
};
-
+
private:
///
int counter;
};
-/** Used to insert BibTeX's information
+/** Used to insert BibTeX's information
*/
class InsetBibtex : public InsetCommand {
public:
return new InsetBibtex(params(), same_id);
}
///
- string const getScreenLabel() const;
+ string const getScreenLabel(Buffer const *) const;
///
EDITABLE editable() const { return IS_EDITABLE; }
///
Inset::Code lyxCode() const { return Inset::BIBTEX_CODE; }
///
- void edit(BufferView *, int x, int y, unsigned int button);
+ void edit(BufferView *, int x, int y, mouse_button::state button);
///
void edit(BufferView * bv, bool front = true);
- ///
+ ///
int latex(Buffer const *, std::ostream &,
- bool fragile, bool freespace) const;
+ bool fragile, bool freespace) const;
///
std::vector<std::pair<string,string> > const getKeys(Buffer const *) const;
///
+ std::vector<string> const getFiles(Buffer const &) const;
+ ///
bool addDatabase(string const &);
///
bool delDatabase(string const &);
///
- bool display() const { return true; }
+ bool display() const { return true; }
///
- struct Holder {
+ struct Holder {
InsetBibtex * inset;
BufferView * view;
};