2001-02-13 17:08:51 +00:00
|
|
|
// -*- C++ -*-
|
2001-06-25 00:06:33 +00:00
|
|
|
#ifndef MATH_MACROTEMPLATE_H
|
|
|
|
#define MATH_MACROTEMPLATE_H
|
2001-02-13 17:08:51 +00:00
|
|
|
|
2001-04-24 16:13:38 +00:00
|
|
|
#include <set>
|
2001-03-01 14:07:43 +00:00
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
#include "math_inset.h"
|
2001-02-13 17:08:51 +00:00
|
|
|
|
2001-02-26 12:53:35 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2001-02-13 17:08:51 +00:00
|
|
|
class MathMacro;
|
|
|
|
|
2001-02-16 09:25:43 +00:00
|
|
|
/** This class contains the macro definition
|
|
|
|
\author Alejandro Aguilar Sierra
|
|
|
|
*/
|
2001-06-25 00:06:33 +00:00
|
|
|
//class MathMacroTemplate : public MathInset, boost::noncopyable
|
2001-04-24 16:13:38 +00:00
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
class MathMacroTemplate : public MathInset {
|
2001-02-15 12:22:01 +00:00
|
|
|
public:
|
|
|
|
///
|
2001-04-24 16:13:38 +00:00
|
|
|
MathMacroTemplate();
|
2001-02-15 12:22:01 +00:00
|
|
|
///
|
2001-05-02 08:18:00 +00:00
|
|
|
MathMacroTemplate(string const & name, int nargs);
|
2001-02-15 12:22:01 +00:00
|
|
|
///
|
2001-06-27 15:57:57 +00:00
|
|
|
MathInset * Clone() const;
|
2001-06-25 00:06:33 +00:00
|
|
|
///
|
|
|
|
void Write(std::ostream &, bool fragile) const;
|
2001-02-15 12:22:01 +00:00
|
|
|
/// Number of arguments
|
2001-06-25 00:06:33 +00:00
|
|
|
int numargs() const;
|
|
|
|
///
|
|
|
|
void numargs(int);
|
2001-02-15 12:22:01 +00:00
|
|
|
///
|
2001-04-24 16:13:38 +00:00
|
|
|
void draw(Painter &, int, int);
|
2001-02-15 12:22:01 +00:00
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
void Metrics(MathStyles st);
|
2001-02-13 17:08:51 +00:00
|
|
|
private:
|
2001-02-15 12:22:01 +00:00
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
int numargs_;
|
2001-02-15 12:22:01 +00:00
|
|
|
///
|
2001-04-24 16:13:38 +00:00
|
|
|
std::set<MathMacro *> users_;
|
|
|
|
|
|
|
|
/// unimplemented
|
|
|
|
void operator=(MathMacroTemplate const &);
|
|
|
|
/// unimplemented
|
2001-06-25 00:06:33 +00:00
|
|
|
//MathMacroTemplate(MathMacroTemplate const &);
|
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
|