lyx_mirror/src/insets/inset.C
Angus Leeming e22c5f4d97 Asger's commentary, const-correct and bug-squashing little beauty.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9558 a592a061-630c-0410-9148-cb99ea01b6c8
2005-01-31 16:29:48 +00:00

84 lines
1.4 KiB
C

/**
* \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ürgen Vigna
* \author Lars Gullik Bjø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"
#include "metricsinfo.h"
#include "coordcache.h"
using std::string;
InsetOld::InsetOld()
: scx(0),
//background_color_(LColor::inherit)
background_color_(LColor::background)
{}
InsetOld::InsetOld(InsetOld const & in)
: InsetBase(in), scx(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_);
}
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) const
{
return scx;
}
void InsetOld::setPosCache(PainterInfo const &, int x, int y) const
{
//lyxerr << "InsetOld:: position cache to " << x << " " << y << std::endl;
theCoords.insets().add(this, x, y);
}