lyx_mirror/src/frontends/controllers/ViewBase.C
Alfredo Braunstein 0062cd3408 move the title_ string to the base class Dialog::View
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7003 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-22 15:42:50 +00:00

59 lines
913 B
C

/**
* \file ViewBase.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 "ViewBase.h"
#include "ControlButtons.h"
#include "support/LAssert.h"
ViewBase::ViewBase(string const & t)
: controller_ptr_(0), title_(t)
{}
void ViewBase::setController(ControlButtons & c)
{
controller_ptr_ = &c;
}
void ViewBase::setTitle(string const & newtitle)
{
title_ = newtitle;
}
string const & ViewBase::getTitle() const
{
return title_;
}
ControlButtons & ViewBase::getController()
{
lyx::Assert(controller_ptr_);
return *controller_ptr_;
}
ControlButtons const & ViewBase::getController() const
{
lyx::Assert(controller_ptr_);
return *controller_ptr_;
}
ButtonController & ViewBase::bc()
{
return getController().bc();
}