]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlCitation.h
dont use pragma impementation and interface anymore
[lyx.git] / src / frontends / controllers / ControlCitation.h
1 // -*- C++ -*-
2 /**
3  * \file ControlCitation.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef CONTROLCITATION_H
13 #define CONTROLCITATION_H
14
15
16 #include "ControlCommand.h"
17 #include "biblio.h" // biblio::InfoMap
18
19 /** A controller for Citation dialogs.
20  */
21 class ControlCitation : public ControlCommand {
22 public:
23         ///
24         ControlCitation(LyXView &, Dialogs &);
25
26         /// Returns a reference to the map of stored keys
27         biblio::InfoMap const & bibkeysInfo() const;
28
29         ///
30         bool usingNatbib() const;
31         /// Possible citations based on this key
32         std::vector<string> const getCiteStrings(string const & key) const;
33
34         /// available CiteStyle-s (depends on availability of Natbib
35         static std::vector<biblio::CiteStyle> const & getCiteStyles() {
36                 return citeStyles_;
37         }
38 private:
39         /// create the InfoMap of keys and data
40         virtual void setDaughterParams();
41         ///
42         virtual void clearDaughterParams();
43
44         /** disconnect from the inset when the Apply button is pressed.
45          Allows easy insertion of multiple citations. */
46         virtual bool disconnectOnApply() { return true; }
47
48         /// The info associated with each key
49         biblio::InfoMap bibkeysInfo_;
50
51         ///
52         static std::vector<biblio::CiteStyle> citeStyles_;
53 };
54
55
56 #endif // CONTROLCITATION_H