]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlBibtex.h
Implementation of controller-view split for FormCharacter.
[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
25 /** A controller for Bibtex dialogs.
26  */
27 class ControlBibtex : public ControlCommand
28 {
29 public:
30         ///
31         ControlBibtex(LyXView &, Dialogs &);
32
33 protected:
34         /// Get changed parameters and Dispatch them to the kernel.
35         virtual void apply();
36 };
37
38 /** This class instantiates and makes available the GUI-specific
39     ButtonController and View.
40  */
41 template <class GUIview, class GUIbc>
42 class GUIBibtex : public ControlBibtex {
43 public:
44         ///
45         GUIBibtex(LyXView &, Dialogs &);
46         ///
47         virtual ButtonControllerBase & bc() { return bc_; }
48         ///
49         virtual ViewBase & view() { return view_; }
50
51 private:
52         ///
53         ButtonController<OkCancelReadOnlyPolicy, GUIbc> bc_;
54         ///
55         GUIview view_;
56 };
57
58 template <class GUIview, class GUIbc>
59 GUIBibtex<GUIview, GUIbc>::GUIBibtex(LyXView & lv, Dialogs & d)
60         : ControlBibtex(lv, d),
61           view_(*this)
62 {}
63
64 #endif // CONTROLBIBTEX_H