lyx_mirror/src/mathed/math_macrotemplate.h
Lars Gullik Bjønnes 53cf203fb9 use LFUN_MESSAGE, inhritprivately from noncpopyable, remove warnings
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1932 a592a061-630c-0410-9148-cb99ea01b6c8
2001-04-17 14:20:21 +00:00

63 lines
1.2 KiB
C++

// -*- C++ -*-
#ifndef MATHMACROTEMPLATE
#define MATHMACROTEMPLATE
#include <vector>
#include <boost/utility.hpp>
//#include <boost/smart_ptr.hpp>
#include "math_parinset.h"
#include "math_macroarg.h"
#ifdef __GNUG__
#pragma interface
#endif
class MathMacro;
/** This class contains the macro definition
\author Alejandro Aguilar Sierra
*/
class MathMacroTemplate : public MathParInset, boost::noncopyable {
public:
friend class MathMacro;
/// A template constructor needs all the data
explicit
MathMacroTemplate(string const &, int na);
///
void draw(Painter &, int, int);
///
void Metrics();
///
void WriteDef(std::ostream &, bool fragile);
/// useful for special insets
void setTCode(MathedTextCodes t);
///
MathedTextCodes getTCode() const;
/// Number of arguments
int getNoArgs() const;
///
void GetMacroXY(int, int &, int &) const;
///
MathParInset * getMacroPar(int) const;
///
void setMacroPar(int, MathedArray const &);
///
void SetMacroFocus(int &, int, int);
///
void setEditMode(bool);
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_;
};
#endif