2001-06-13 14:33:31 +00:00
|
|
|
// -*- C++ -*-
|
2001-03-15 13:37:04 +00:00
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
2001-03-21 13:27:03 +00:00
|
|
|
* Copyright 2001 The LyX Team.
|
2001-03-15 13:37:04 +00:00
|
|
|
*
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* \file ControlCitation.h
|
|
|
|
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONTROLCITATION_H
|
|
|
|
#define CONTROLCITATION_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#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
|
|
|
*/
|
|
|
|
class ControlCitation : public ControlCommand
|
|
|
|
{
|
|
|
|
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
|
|
|
|
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();
|
|
|
|
///
|
2001-03-23 17:09:34 +00:00
|
|
|
virtual void clearDaughterParams();
|
2001-03-28 12:59:29 +00:00
|
|
|
|
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
|