]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ViewBase.C
std:: changes, stupid stuff
[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 using std::string;
18
19
20 ViewBase::ViewBase(string const & t)
21         : controller_ptr_(0), title_(t)
22 {}
23
24
25 void ViewBase::setController(ControlButtons & c)
26 {
27         controller_ptr_ = &c;
28 }
29
30
31 void ViewBase::setTitle(string const & newtitle)
32 {
33         title_ = newtitle;
34 }
35
36
37 string const & ViewBase::getTitle() const
38 {
39         return title_;
40 }
41
42
43 ControlButtons & ViewBase::getController()
44 {
45         BOOST_ASSERT(controller_ptr_);
46         return *controller_ptr_;
47 }
48
49
50 ControlButtons const & ViewBase::getController() const
51 {
52         BOOST_ASSERT(controller_ptr_);
53         return *controller_ptr_;
54 }
55
56
57 ButtonController & ViewBase::bc()
58 {
59         return getController().bc();
60 }