2001-02-13 17:08:51 +00:00
|
|
|
|
// -*- C++ -*-
|
2003-08-19 13:00:56 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file math_macroarg.h
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author Alejandro Aguilar Sierra
|
|
|
|
|
* \author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
|
|
|
|
|
2001-02-13 17:08:51 +00:00
|
|
|
|
#ifndef MATHMACROARGUMENT_H
|
|
|
|
|
#define MATHMACROARGUMENT_H
|
|
|
|
|
|
2001-09-11 15:46:51 +00:00
|
|
|
|
#include "math_nestinset.h"
|
2001-02-13 17:08:51 +00:00
|
|
|
|
|
2001-02-26 12:53:35 +00:00
|
|
|
|
|
2003-08-19 13:00:56 +00:00
|
|
|
|
/// A macro argument.
|
2001-09-11 15:46:51 +00:00
|
|
|
|
class MathMacroArgument : public MathNestInset {
|
2001-02-13 17:08:51 +00:00
|
|
|
|
public:
|
2001-02-26 12:53:35 +00:00
|
|
|
|
///
|
2002-05-30 07:09:54 +00:00
|
|
|
|
explicit MathMacroArgument(int);
|
2001-02-26 12:53:35 +00:00
|
|
|
|
///
|
2003-07-25 17:11:25 +00:00
|
|
|
|
virtual std::auto_ptr<InsetBase> clone() const;
|
2001-02-26 12:53:35 +00:00
|
|
|
|
///
|
2001-11-09 14:23:44 +00:00
|
|
|
|
bool isActive() const { return false; }
|
|
|
|
|
///
|
2003-06-02 10:03:27 +00:00
|
|
|
|
void metrics(MetricsInfo & mi, Dimension & dim) const;
|
2001-02-26 12:53:35 +00:00
|
|
|
|
///
|
2003-03-21 14:20:48 +00:00
|
|
|
|
void draw(PainterInfo &, int x, int y) const;
|
2001-02-26 12:53:35 +00:00
|
|
|
|
///
|
2001-11-09 14:23:44 +00:00
|
|
|
|
void substitute(MathMacro const & macro);
|
|
|
|
|
|
2001-02-26 12:53:35 +00:00
|
|
|
|
///
|
2001-11-09 08:35:57 +00:00
|
|
|
|
void normalize(NormalStream &) const;
|
2001-04-25 15:43:57 +00:00
|
|
|
|
///
|
2001-11-09 14:23:44 +00:00
|
|
|
|
void write(WriteStream & os) const;
|
2001-04-24 16:13:38 +00:00
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
/// A number between 1 and 9
|
2001-02-26 12:53:35 +00:00
|
|
|
|
int number_;
|
2001-08-03 17:55:10 +00:00
|
|
|
|
///
|
|
|
|
|
char str_[3];
|
2001-09-11 15:46:51 +00:00
|
|
|
|
///
|
|
|
|
|
bool expanded_;
|
2001-02-13 17:08:51 +00:00
|
|
|
|
};
|
2001-04-24 16:13:38 +00:00
|
|
|
|
|
2001-02-13 17:08:51 +00:00
|
|
|
|
#endif
|