]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/BCView.C
Add a buffer_path arg to InsetGraphicsMailer's params2string, string2params.
[lyx.git] / src / frontends / controllers / BCView.C
1 /**
2  * \file BCView.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 "BCView.h"
14 #include "ButtonController.h"
15
16
17 CheckedWidget::~CheckedWidget()
18 {}
19
20
21 BCView::BCView(ButtonController const & p)
22         : parent(p)
23 {}
24
25
26 ButtonPolicy & BCView::bp() const
27 {
28         return parent.bp();
29 }
30
31
32 void BCView::addCheckedWidget(CheckedWidget * ptr)
33 {
34         if (ptr)
35                 checked_widgets.push_back(checked_widget_ptr(ptr));
36 }
37
38
39 bool BCView::checkWidgets() const
40 {
41         bool valid = true;
42
43         checked_widget_list::const_iterator it  = checked_widgets.begin();
44         checked_widget_list::const_iterator end = checked_widgets.end();
45
46         for (; it != end; ++it) {
47                 valid &= (*it)->check();
48         }
49
50         // return valid status after checking ALL widgets
51         return valid;
52 }