]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlBibtex.h
46994272927132b9893c297670814688e45d114a
[lyx.git] / src / frontends / controllers / ControlBibtex.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 2000 The LyX Team.
8  *
9  * ======================================================
10  *
11  * \file ControlBibtex.h
12  * \author Angus Leeming <a.leeming@ic.ac.uk>
13  */
14
15 #ifndef CONTROLBIBTEX_H
16 #define CONTROLBIBTEX_H
17
18 #ifdef __GNUG__
19 #pragma interface
20 #endif
21
22 #include "ControlCommand.h"
23 #include "ButtonController.h"
24 #include "ViewBase.h"
25
26 /** A controller for Bibtex dialogs.
27  */
28 class ControlBibtex : public ControlCommand
29 {
30 public:
31         ///
32         ControlBibtex(LyXView &, Dialogs &);
33
34 protected:
35         /// Get changed parameters and Dispatch them to the kernel.
36         virtual void apply();
37 };
38
39 /** This class instantiates and makes available the GUI-specific
40     ButtonController and View.
41  */
42 template <class GUIview, class GUIbc>
43 class GUIBibtex : public ControlBibtex {
44 public:
45         ///
46         GUIBibtex(LyXView &, Dialogs &);
47         ///
48         virtual ButtonControllerBase & bc() { return bc_; }
49         ///
50         virtual ViewBase & view() { return view_; }
51
52 private:
53         ///
54         ButtonController<OkCancelReadOnlyPolicy, GUIbc> bc_;
55         ///
56         GUIview view_;
57 };
58
59 template <class GUIview, class GUIbc>
60 GUIBibtex<GUIview, GUIbc>::GUIBibtex(LyXView & lv, Dialogs & d)
61         : ControlBibtex(lv, d),
62           view_(*this)
63 {}
64
65 #endif // CONTROLBIBTEX_H