2003-03-10 03:13:28 +00:00
|
|
|
/**
|
|
|
|
* \file BCView.C
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Angus Leeming
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "BCView.h"
|
|
|
|
#include "ButtonController.h"
|
|
|
|
|
|
|
|
|
|
|
|
CheckedWidget::~CheckedWidget()
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
BCView::BCView(ButtonController const & p)
|
|
|
|
: parent(p)
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
ButtonPolicy & BCView::bp() const
|
|
|
|
{
|
|
|
|
return parent.bp();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void BCView::addCheckedWidget(CheckedWidget * ptr)
|
|
|
|
{
|
|
|
|
if (ptr)
|
|
|
|
checked_widgets.push_back(checked_widget_ptr(ptr));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-03-14 00:20:42 +00:00
|
|
|
bool BCView::checkWidgets() const
|
2003-03-10 03:13:28 +00:00
|
|
|
{
|
|
|
|
bool valid = true;
|
|
|
|
|
|
|
|
checked_widget_list::const_iterator it = checked_widgets.begin();
|
|
|
|
checked_widget_list::const_iterator end = checked_widgets.end();
|
|
|
|
|
|
|
|
for (; it != end; ++it) {
|
|
|
|
valid &= (*it)->check();
|
|
|
|
}
|
|
|
|
|
|
|
|
// return valid status after checking ALL widgets
|
|
|
|
return valid;
|
|
|
|
}
|