]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ViewBase.C
Small clean-up.
[lyx.git] / src / frontends / controllers / ViewBase.C
1 /**
2  * \file ViewBase.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Angus Leeming
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "ViewBase.h"
14 #include "ControlButtons.h"
15
16
17 ViewBase::ViewBase(string const & t)
18         : controller_ptr_(0), title_(t)
19 {}
20
21
22 void ViewBase::setController(ControlButtons & c)
23 {
24         controller_ptr_ = &c;
25 }
26
27
28 void ViewBase::setTitle(string const & newtitle)
29 {
30         title_ = newtitle;
31 }
32
33
34 string const & ViewBase::getTitle() const
35 {
36         return title_;
37 }
38
39
40 ControlButtons & ViewBase::getController()
41 {
42         BOOST_ASSERT(controller_ptr_);
43         return *controller_ptr_;
44 }
45
46
47 ControlButtons const & ViewBase::getController() const
48 {
49         BOOST_ASSERT(controller_ptr_);
50         return *controller_ptr_;
51 }
52
53
54 ButtonController & ViewBase::bc()
55 {
56         return getController().bc();
57 }