// -*- C++ -*-
-#ifndef MATHMACROTEMPLATE
-#define MATHMACROTEMPLATE
+#ifndef MATH_MACROTEMPLATE_H
+#define MATH_MACROTEMPLATE_H
-#include <vector>
-
-#include <boost/utility.hpp>
-//#include <boost/smart_ptr.hpp>
-
-#include "math_parinset.h"
-#include "math_macroarg.h"
+#include "math_inset.h"
#ifdef __GNUG__
#pragma interface
/** This class contains the macro definition
\author Alejandro Aguilar Sierra
*/
-class MathMacroTemplate : public MathParInset, public noncopyable {
+//class MathMacroTemplate : public MathInset, boost::noncopyable
+
+class MathMacroTemplate : public MathInset {
public:
- friend class MathMacro;
-
- /// A template constructor needs all the data
- explicit
- MathMacroTemplate(string const &, int na);
///
- void draw(Painter &, int, int);
+ MathMacroTemplate();
///
- void Metrics();
+ MathMacroTemplate(string const & name, int nargs);
///
- void WriteDef(std::ostream &, bool fragile);
- /// useful for special insets
- void setTCode(MathedTextCodes t);
+ MathInset * clone() const;
///
- MathedTextCodes getTCode() const;
+ void Write(std::ostream &, bool fragile) const;
/// Number of arguments
- int getNoArgs() const;
- ///
- void GetMacroXY(int, int &, int &) const;
+ int numargs() const;
///
- MathParInset * getMacroPar(int) const;
+ void numargs(int);
///
- void SetMacroFocus(int &, int, int);
+ void draw(Painter &, int, int);
///
- void setEditMode(bool);
-
- /// Replace the appropriate arguments with a specific macro's data
- void update(MathMacro const & m);
+ void Metrics(MathStyles st, int asc = 0, int des = 0);
private:
- /// Are we in edit mode or not?
- bool edit_;
- ///
- MathedTextCodes tcode_;
///
- //std::vector<boost::shared_ptr<MathMacroArgument> > args_;
- std::vector<MathMacroArgument> args_;
- ///
- int nargs_;
+ int numargs_;
+ /// unimplemented
+ void operator=(MathMacroTemplate const &);
};
+
#endif