]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/GUI.h
Finish the task of removing all cruft from the header files.
[lyx.git] / src / frontends / controllers / GUI.h
1 // -*- C++ -*-
2 /**
3  * \file GUI.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GUI_H
13 #define GUI_H
14
15 #include <boost/utility.hpp>
16
17 class LyXView;
18 class Dialogs;
19
20 /** This class makes a whole out of the disparate parts of a dialog.
21  */
22 template <typename Controller, typename GUIview,
23           typename Policy,     typename GUIbc>
24 class GUI : boost::noncopyable {
25 public:
26         ///
27         GUI(LyXView & lv, Dialogs & d);
28         ///
29         Controller & controller() { return controller_; }
30         ///
31         Controller const & controller() const { return controller_; }
32 private:
33         ///
34         Controller controller_;
35         ///
36         GUIview view_;
37 };
38
39
40 template <typename Controller, typename GUIview,
41           typename Policy,     typename GUIbc>
42 GUI<Controller, GUIview, Policy, GUIbc>::GUI(LyXView & lv, Dialogs & d)
43         : controller_(lv, d),
44           view_()
45 {
46         controller_.setView(view_);
47         view_.setController(controller_);
48         controller_.bc().view(new GUIbc(controller_.bc()));
49         controller_.bc().bp(new Policy);
50 }
51
52 #endif // GUI_H