2001-02-13 13:28:32 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
#ifndef MATH_DELIMINSET_H
|
|
|
|
#define MATH_DELIMINSET_H
|
|
|
|
|
2001-08-03 17:10:22 +00:00
|
|
|
#include "math_nestinset.h"
|
2001-08-09 15:19:31 +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-02-16 09:25:43 +00:00
|
|
|
/** A delimiter
|
|
|
|
\author Alejandro Aguilar Sierra
|
|
|
|
*/
|
2001-08-09 15:19:31 +00:00
|
|
|
|
2001-08-03 17:10:22 +00:00
|
|
|
class MathDelimInset : public MathNestInset {
|
2001-02-13 13:28:32 +00:00
|
|
|
public:
|
|
|
|
///
|
2002-02-14 12:38:02 +00:00
|
|
|
MathDelimInset(string const & left, string const & right);
|
2001-02-13 13:28:32 +00:00
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
MathInset * clone() const;
|
2001-02-13 13:28:32 +00:00
|
|
|
///
|
2001-11-09 08:35:57 +00:00
|
|
|
MathDelimInset * asDelimInset() { return this; }
|
2001-02-13 13:28:32 +00:00
|
|
|
///
|
2001-11-09 08:35:57 +00:00
|
|
|
MathDelimInset const * asDelimInset() const { return this; }
|
2001-11-09 10:44:24 +00:00
|
|
|
/// is it (...)?
|
|
|
|
bool isParanthesis() const;
|
|
|
|
/// is it [...]?
|
|
|
|
bool isBrackets() const;
|
|
|
|
/// is it |...|?
|
|
|
|
bool isAbs() const;
|
2001-02-13 13:28:32 +00:00
|
|
|
///
|
2002-05-30 07:09:54 +00:00
|
|
|
void metrics(MathMetricsInfo & st) const;
|
2001-11-07 08:51:35 +00:00
|
|
|
///
|
2002-05-30 07:09:54 +00:00
|
|
|
void draw(MathPainterInfo &, int x, int y) const;
|
2001-11-09 08:35:57 +00:00
|
|
|
|
|
|
|
///
|
|
|
|
void write(WriteStream & os) const;
|
|
|
|
/// write normalized content
|
|
|
|
void normalize(NormalStream &) const;
|
2001-11-07 10:21:51 +00:00
|
|
|
///
|
2001-11-07 17:30:26 +00:00
|
|
|
void maplize(MapleStream &) const;
|
2001-11-07 18:15:24 +00:00
|
|
|
///
|
|
|
|
void mathmlize(MathMLStream &) const;
|
|
|
|
///
|
|
|
|
void octavize(OctaveStream &) const;
|
2001-02-13 13:28:32 +00:00
|
|
|
///
|
2001-09-12 12:51:55 +00:00
|
|
|
string left_;
|
|
|
|
///
|
|
|
|
string right_;
|
2001-11-09 08:35:57 +00:00
|
|
|
private:
|
|
|
|
///
|
|
|
|
int dw() const;
|
2001-02-13 13:28:32 +00:00
|
|
|
};
|
|
|
|
#endif
|