2001-06-13 14:33:31 +00:00
|
|
|
// -*- C++ -*-
|
2002-09-05 14:10:50 +00:00
|
|
|
/**
|
|
|
|
* \file ControlCitation.h
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-03-15 13:37:04 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author Angus Leeming
|
2001-03-15 13:37:04 +00:00
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2001-03-15 13:37:04 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONTROLCITATION_H
|
|
|
|
#define CONTROLCITATION_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "ControlCommand.h"
|
2004-05-14 13:13:20 +00:00
|
|
|
#include "biblio.h"
|
2001-03-15 13:37:04 +00:00
|
|
|
|
2001-04-03 14:30:58 +00:00
|
|
|
/** A controller for Citation dialogs.
|
2001-03-15 13:37:04 +00:00
|
|
|
*/
|
2002-10-21 17:38:09 +00:00
|
|
|
class ControlCitation : public ControlCommand {
|
2001-03-15 13:37:04 +00:00
|
|
|
public:
|
|
|
|
///
|
2003-02-25 14:51:38 +00:00
|
|
|
ControlCitation(Dialog &);
|
|
|
|
|
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
virtual bool initialiseParams(std::string const & data);
|
2003-02-25 14:51:38 +00:00
|
|
|
/// clean-up on hide.
|
|
|
|
virtual void clearParams();
|
|
|
|
|
|
|
|
/** Disconnect from the inset when the Apply button is pressed.
|
|
|
|
* Allows easy insertion of multiple citations.
|
|
|
|
*/
|
|
|
|
virtual bool disconnectOnApply() const { return true; }
|
2001-03-28 12:59:29 +00:00
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
/// Returns a reference to the map of stored keys
|
2001-03-28 12:59:29 +00:00
|
|
|
biblio::InfoMap const & bibkeysInfo() const;
|
|
|
|
|
2001-07-19 14:12:37 +00:00
|
|
|
///
|
2004-05-14 13:13:20 +00:00
|
|
|
biblio::CiteEngine_enum getEngine() const;
|
2004-05-10 20:55:00 +00:00
|
|
|
|
2001-07-19 14:12:37 +00:00
|
|
|
/// Possible citations based on this key
|
2003-10-06 15:43:21 +00:00
|
|
|
std::vector<std::string> const getCiteStrings(std::string const & key) const;
|
2001-07-19 14:12:37 +00:00
|
|
|
|
2004-03-07 14:33:17 +00:00
|
|
|
/// available CiteStyle-s (depends on availability of Natbib/Jurabib)
|
2002-10-21 17:38:09 +00:00
|
|
|
static std::vector<biblio::CiteStyle> const & getCiteStyles() {
|
|
|
|
return citeStyles_;
|
|
|
|
}
|
2001-03-15 13:37:04 +00:00
|
|
|
private:
|
|
|
|
/// The info associated with each key
|
2001-03-28 12:59:29 +00:00
|
|
|
biblio::InfoMap bibkeysInfo_;
|
2001-07-19 14:12:37 +00:00
|
|
|
|
|
|
|
///
|
|
|
|
static std::vector<biblio::CiteStyle> citeStyles_;
|
2001-03-15 13:37:04 +00:00
|
|
|
};
|
|
|
|
|
2001-07-19 14:12:37 +00:00
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
#endif // CONTROLCITATION_H
|