mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 05:33:33 +00:00
e22c5f4d97
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9558 a592a061-630c-0410-9148-cb99ea01b6c8
84 lines
1.4 KiB
C
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);
|
|
}
|