lyx_mirror/src/insets/inset.C

88 lines
1.4 KiB
C++
Raw Normal View History

/**
* \file inset.C
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Alejandro Aguilar Sierra
* \author J<EFBFBD>rgen Vigna
* \author Lars Gullik Bj<EFBFBD>nnes
* \author Matthias Ettrich
*
* Full author contact details are available in file CREDITS.
*/
#include <config.h>
#include "inset.h"
#include "updatableinset.h"
#include "BufferView.h"
#include "debug.h"
#include "gettext.h"
#include "lyxtext.h"
#include "LColor.h"
using std::string;
InsetOld::InsetOld()
: InsetBase(),
xo_(0), yo_(0), scx(0), owner_(0),
//background_color_(LColor::inherit)
background_color_(LColor::background)
{}
InsetOld::InsetOld(InsetOld const & in)
: InsetBase(),
xo_(0), yo_(0), scx(0), owner_(0), name_(in.name_),
background_color_(in.background_color_)
{}
void InsetOld::setBackgroundColor(LColor_color color)
{
background_color_ = color;
}
LColor_color InsetOld::backgroundColor() const
{
return LColor::color(background_color_);
}
bool InsetOld::forceDefaultParagraphs(InsetBase const * inset) const
{
if (owner())
return owner()->forceDefaultParagraphs(inset);
return false;
}
int InsetOld::ascent() const
{
return dim_.asc;
}
int InsetOld::descent() const
{
return dim_.des;
}
int InsetOld::width() const
{
return dim_.wid;
}
int InsetOld::scroll(bool recursive) const
{
if (!recursive || !owner_)
return scx;
return 0;
}