2001-02-26 12:53:35 +00:00
|
|
|
// -*- C++ -*-
|
2001-02-13 13:28:32 +00:00
|
|
|
#ifndef MATH_DECORATIONINSET_H
|
|
|
|
#define MATH_DECORATIONINSET_H
|
|
|
|
|
2001-08-03 17:10:22 +00:00
|
|
|
#include "math_nestinset.h"
|
2001-09-03 15:22:55 +00:00
|
|
|
#include "LString.h"
|
2001-02-13 13:28:32 +00:00
|
|
|
|
2001-02-26 12:53:35 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2001-07-13 07:55:55 +00:00
|
|
|
/** Decorations and accents over (below) a math object
|
2001-02-16 09:25:43 +00:00
|
|
|
\author Alejandro Aguilar Sierra
|
|
|
|
*/
|
2001-07-26 16:14:23 +00:00
|
|
|
|
2001-08-03 17:10:22 +00:00
|
|
|
class MathDecorationInset : public MathNestInset {
|
2001-02-13 13:28:32 +00:00
|
|
|
public:
|
|
|
|
///
|
2001-09-03 15:22:55 +00:00
|
|
|
explicit MathDecorationInset(string const & name);
|
2001-02-13 13:28:32 +00:00
|
|
|
///
|
2001-07-05 14:48:45 +00:00
|
|
|
MathInset * clone() const;
|
2001-02-13 13:28:32 +00:00
|
|
|
///
|
2001-08-06 17:20:26 +00:00
|
|
|
void draw(Painter &, int x, int y) const;
|
2001-02-13 13:28:32 +00:00
|
|
|
///
|
2001-10-19 11:25:48 +00:00
|
|
|
void write(MathWriteInfo & os) const;
|
2001-02-13 13:28:32 +00:00
|
|
|
///
|
2001-10-19 11:25:48 +00:00
|
|
|
void metrics(MathMetricsInfo const & st) const;
|
2001-07-13 07:55:55 +00:00
|
|
|
///
|
2001-11-08 12:06:56 +00:00
|
|
|
void writeNormal(NormalStream & os) const;
|
2001-09-11 10:58:17 +00:00
|
|
|
///
|
|
|
|
bool isScriptable() const;
|
2001-08-15 06:53:25 +00:00
|
|
|
|
2001-02-16 09:25:43 +00:00
|
|
|
private:
|
2001-02-13 13:28:32 +00:00
|
|
|
///
|
2001-08-15 06:53:25 +00:00
|
|
|
bool upper() const;
|
2001-02-13 13:28:32 +00:00
|
|
|
///
|
2001-08-15 06:53:25 +00:00
|
|
|
bool protect() const;
|
2001-09-12 15:56:09 +00:00
|
|
|
/// is it a wide decoration?
|
|
|
|
bool wide() const;
|
2001-08-15 06:53:25 +00:00
|
|
|
|
|
|
|
///
|
2001-09-03 15:22:55 +00:00
|
|
|
string const name_;
|
2001-08-06 17:20:26 +00:00
|
|
|
/// height cache of deco
|
|
|
|
mutable int dh_;
|
|
|
|
/// vertical offset cache of deco
|
|
|
|
mutable int dy_;
|
2001-10-22 15:37:49 +00:00
|
|
|
///
|
|
|
|
mutable MathMetricsInfo size_;
|
2001-02-13 13:28:32 +00:00
|
|
|
};
|
|
|
|
#endif
|