*
* Dependencies: Xlib, XForms
*
- * Copyright: (c) 1996, 1997 Alejandro Aguilar Sierra
+ * Copyright: 1996, 1997 Alejandro Aguilar Sierra
*
* Version: 0.8beta, Mathed & Lyx project.
*
#include "symbol_def.h"
#include "LString.h"
-
/**
Functions or LaTeX names for objects that I don't know how to draw.
*/
class MathFuncInset: public MathedInset {
public:
///
- MathFuncInset(char const * nm,
+ explicit
+ MathFuncInset(string const & nm,
short ot = LM_OT_FUNC, short st = LM_ST_TEXT);
///
~MathFuncInset();
///
void draw(Painter &, int, int);
///
- void Write(ostream &);
-#ifndef USE_OSTREAM_ONLY
- ///
- void Write(string & file);
-#endif
+ void Write(std::ostream &, bool fragile);
///
void Metrics();
///
///
bool lims;
///
- char * fname;
+ string fname;
};
///
void draw(Painter &, int, int);
///
- void Write(ostream &);
-#ifndef USE_OSTREAM_ONLY
- ///
- void Write(string & file);
-#endif
+ void Write(std::ostream &, bool fragile);
///
void Metrics();
///
class MathDotsInset: public MathedInset {
public:
///
- MathDotsInset(char const *, int, short st = LM_ST_TEXT);
+ MathDotsInset(string const &, int, short st = LM_ST_TEXT);
///
MathedInset * Clone();
///
void draw(Painter &, int, int);
///
- void Write(ostream &);
-#ifndef USE_OSTREAM_ONLY
- ///
- void Write(string & file);
-#endif
+ void Write(std::ostream &, bool fragile);
///
void Metrics();
protected:
///
void draw(Painter &, int, int);
///
- void Write(ostream &);
-#ifndef USE_OSTREAM_ONLY
- ///
- void Write(string & file);
-#endif
+ void Write(std::ostream &, bool fragile);
///
inline void Metrics();
///
class MathBigopInset: public MathedInset {
public:
///
- MathBigopInset(char const *, int, short st = LM_ST_TEXT);
+ MathBigopInset(string const &, int, short st = LM_ST_TEXT);
///
MathedInset * Clone();
///
void draw(Painter &, int, int);
///
- void Write(ostream &);
-#ifndef USE_OSTREAM_ONLY
- ///
- void Write(string & file);
-#endif
+ void Write(std::ostream &, bool fragile);
///
void Metrics();
///
///
void draw(Painter &, int x, int baseline);
///
- void Write(ostream &);
-#ifndef USE_OSTREAM_ONLY
- ///
- void Write(string & file);
-#endif
+ void Write(std::ostream &, bool fragile);
///
void Metrics();
///
///
void draw(Painter &, int x, int baseline);
///
- void Write(ostream &);
-#ifndef USE_OSTREAM_ONLY
- ///
- void Write(string & file);
-#endif
+ void Write(std::ostream &, bool fragile);
///
void Metrics();
///
void draw(Painter &, int, int);
///
- void Write(ostream &);
-#ifndef USE_OSTREAM_ONLY
- ///
- void Write(string & file);
-#endif
+ void Write(std::ostream &, bool fragile);
///
void Metrics();
protected:
///
void draw(Painter &, int, int);
///
- void Write(ostream &);
-#ifndef USE_OSTREAM_ONLY
- ///
- void Write(string & file);
-#endif
+ void Write(std::ostream &, bool fragile);
///
void Metrics();
///
inline
MathFuncInset::~MathFuncInset()
-{
- if (fname && GetType() == LM_OT_UNDEF) delete[] fname;
-}
+{}
inline
inline
-void MathFuncInset::Write(ostream & os)
+void MathFuncInset::Write(std::ostream & os, bool /* fragile */)
{
os << "\\" << name << ' ';
}
-#ifndef USE_OSTREAM_ONLY
-inline
-void MathFuncInset::Write(string & file)
-{
- file += '\\';
- file += name;
- file += ' ';
-}
-#endif
-
-
inline
void MathSpaceInset::Metrics()
{