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