2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 2001 The LyX Team.
9 * ======================================================
11 * \file ControlCitation.h
12 * \author Angus Leeming <a.leeming@ic.ac.uk>
15 #ifndef CONTROLCITATION_H
16 #define CONTROLCITATION_H
22 #include "ControlCommand.h"
23 #include "biblio.h" // biblio::InfoMap
25 /** A controller for Citation dialogs.
27 class ControlCitation : public ControlCommand
31 ControlCitation(LyXView &, Dialogs &);
33 /// Returns a reference to the map of stored keys
34 biblio::InfoMap const & bibkeysInfo() const;
37 bool usingNatbib() const;
38 /// Possible citations based on this key
39 std::vector<string> const getCiteStrings(string const & key) const;
41 /// available CiteStyle-s (depends on availability of Natbib
42 static std::vector<biblio::CiteStyle> const & getCiteStyles()
43 { return citeStyles_; }
46 /// create the InfoMap of keys and data
47 virtual void setDaughterParams();
49 virtual void clearDaughterParams();
51 /** disconnect from the inset when the Apply button is pressed.
52 Allows easy insertion of multiple citations. */
53 virtual bool disconnectOnApply() { return true; }
55 /// The info associated with each key
56 biblio::InfoMap bibkeysInfo_;
59 static std::vector<biblio::CiteStyle> citeStyles_;
63 #endif // CONTROLCITATION_H