2001-02-13 17:08:51 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
#ifndef MATHMACROTEMPLATE
|
|
|
|
#define MATHMACROTEMPLATE
|
|
|
|
|
2001-04-24 16:13:38 +00:00
|
|
|
#include <set>
|
2001-03-01 14:07:43 +00:00
|
|
|
|
2001-02-13 17:08:51 +00:00
|
|
|
#include "math_parinset.h"
|
|
|
|
|
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-04-24 16:13:38 +00:00
|
|
|
//class MathMacroTemplate : public MathParInset, boost::noncopyable
|
|
|
|
|
|
|
|
class MathMacroTemplate : public MathParInset {
|
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-04-24 16:13:38 +00:00
|
|
|
MathMacroTemplate(std::string const & name, int nargs);
|
2001-02-15 12:22:01 +00:00
|
|
|
///
|
2001-04-24 16:13:38 +00:00
|
|
|
void WriteDef(std::ostream &, bool fragile) const;
|
2001-02-15 12:22:01 +00:00
|
|
|
/// Number of arguments
|
2001-04-24 16:13:38 +00:00
|
|
|
int nargs() const;
|
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-04-24 16:13:38 +00:00
|
|
|
void Metrics();
|
2001-02-13 17:08:51 +00:00
|
|
|
private:
|
2001-02-15 12:22:01 +00:00
|
|
|
///
|
2001-04-24 16:13:38 +00:00
|
|
|
int na_;
|
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
|
|
|
|
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
|