]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlCopyright.h
Controller-view split of Graphics and Index popups.
[lyx.git] / src / frontends / controllers / ControlCopyright.h
1 /*
2  * \file ControlCopyright.C
3  * Copyright 2000-2001 The LyX Team.
4  * See the file COPYING.
5  *
6  * \author Allan Rae
7  * \author Angus Leeming, a.leeming@.ac.uk
8  */
9
10 #ifndef CONTROLCOPYRIGHT_H
11 #define CONTROLCOPYRIGHT_H
12
13 #ifdef __GNUG__
14 #pragma interface
15 #endif
16
17 #include "ControlDialogs.h"
18
19 /** A controller for Copyright dialogs.
20  */
21 class ControlCopyright : public ControlDialog<ControlConnectBI> {
22 public:
23         ///
24         ControlCopyright(LyXView &, Dialogs &);
25
26         ///
27         string const getCopyright() const;
28         ///
29         string const getLicence() const;
30         ///
31         string const getDisclaimer() const;
32
33 private:
34         /// not needed.
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 GUICopyright : public ControlCopyright {
43 public:
44         ///
45         GUICopyright(LyXView &, Dialogs &);
46         ///
47         virtual ButtonControllerBase & bc() { return bc_; }
48         ///
49         virtual ViewBase & view() { return view_; }
50
51 private:
52         ///
53         ButtonController<OkCancelPolicy, GUIbc> bc_;
54         ///
55         GUIview view_;
56 };
57
58 template <class GUIview, class GUIbc>
59 GUICopyright<GUIview, GUIbc>::GUICopyright(LyXView & lv, Dialogs & d)
60         : ControlCopyright(lv, d),
61           view_(*this)
62 {}
63 #endif // CONTROLCOPYRIGHT_H
64