2001-08-20 16:37:35 +00:00
|
|
|
|
// -*- C++ -*-
|
2003-08-19 13:00:56 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file math_kerninset.h
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
|
|
|
|
|
2001-08-20 16:37:35 +00:00
|
|
|
|
#ifndef MATH_CHEATINSET_H
|
|
|
|
|
#define MATH_CHEATINSET_H
|
|
|
|
|
|
2003-05-28 13:22:36 +00:00
|
|
|
|
#include "math_inset.h"
|
2002-03-27 10:51:46 +00:00
|
|
|
|
#include "vspace.h"
|
2003-09-05 17:23:11 +00:00
|
|
|
|
#include "support/std_string.h"
|
2001-08-20 16:37:35 +00:00
|
|
|
|
|
|
|
|
|
|
2002-03-27 10:51:46 +00:00
|
|
|
|
/// The \kern primitive
|
2002-03-25 12:11:25 +00:00
|
|
|
|
/// Some hack for visual effects
|
2001-08-20 16:37:35 +00:00
|
|
|
|
|
2003-05-28 13:22:36 +00:00
|
|
|
|
class MathKernInset : public MathInset {
|
2001-08-20 16:37:35 +00:00
|
|
|
|
public:
|
|
|
|
|
///
|
2001-08-21 14:20:50 +00:00
|
|
|
|
MathKernInset();
|
|
|
|
|
///
|
2002-03-27 10:51:46 +00:00
|
|
|
|
explicit MathKernInset(LyXLength const & wid);
|
|
|
|
|
///
|
|
|
|
|
explicit MathKernInset(string const & wid);
|
|
|
|
|
///
|
2003-07-25 17:11:25 +00:00
|
|
|
|
virtual std::auto_ptr<InsetBase> clone() const;
|
2001-08-20 16:37:35 +00:00
|
|
|
|
///
|
2003-06-02 10:03:27 +00:00
|
|
|
|
void metrics(MetricsInfo & mi, Dimension & dim) const;
|
2003-05-28 13:22:36 +00:00
|
|
|
|
///
|
|
|
|
|
void draw(PainterInfo & pi, int x, int y) const;
|
2001-08-20 16:37:35 +00:00
|
|
|
|
///
|
2001-11-09 08:35:57 +00:00
|
|
|
|
void write(WriteStream & os) const;
|
2001-08-20 16:37:35 +00:00
|
|
|
|
///
|
2002-03-25 12:11:25 +00:00
|
|
|
|
void normalize(NormalStream & ns) const;
|
2002-03-27 10:51:46 +00:00
|
|
|
|
private:
|
|
|
|
|
/// width in em
|
|
|
|
|
LyXLength wid_;
|
2001-08-20 16:37:35 +00:00
|
|
|
|
};
|
|
|
|
|
#endif
|