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