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