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
|
|
|
*
|
2002-09-05 14:10:50 +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"
|
2001-03-28 12:59:29 +00:00
|
|
|
#include "biblio.h" // biblio::InfoMap
|
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:
|
|
|
|
///
|
|
|
|
ControlCitation(LyXView &, Dialogs &);
|
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
|
|
|
///
|
|
|
|
bool usingNatbib() const;
|
|
|
|
/// Possible citations based on this key
|
|
|
|
std::vector<string> const getCiteStrings(string const & key) const;
|
|
|
|
|
|
|
|
/// available CiteStyle-s (depends on availability of Natbib
|
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:
|
2001-03-28 12:59:29 +00:00
|
|
|
/// create the InfoMap of keys and data
|
|
|
|
virtual void setDaughterParams();
|
2002-03-21 21:21:28 +00:00
|
|
|
///
|
2001-03-23 17:09:34 +00:00
|
|
|
virtual void clearDaughterParams();
|
2001-03-28 12:59:29 +00:00
|
|
|
|
2001-09-12 09:35:25 +00:00
|
|
|
/** disconnect from the inset when the Apply button is pressed.
|
|
|
|
Allows easy insertion of multiple citations. */
|
|
|
|
virtual bool disconnectOnApply() { return true; }
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
/// 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
|