#ifndef INSET_FORMULA_H
#define INSET_FORMULA_H
-
#include "formulabase.h"
#include "math_atom.h"
#include <boost/scoped_ptr.hpp>
+
/// The main LyX math inset
class InsetFormula : public InsetFormulaBase {
public:
///
- InsetFormula();
+ InsetFormula(bool chemistry = false);
///
explicit InsetFormula(BufferView *);
///
- explicit InsetFormula(const string & data);
+ explicit InsetFormula(string const & data);
///
InsetFormula(InsetFormula const &);
///
~InsetFormula();
///
- int ascent(BufferView *, LyXFont const &) const;
- ///
- int descent(BufferView *, LyXFont const &) const;
- ///
- int width(BufferView *, LyXFont const &) const;
+ void metrics(MetricsInfo & mi, Dimension & dim) const;
///
- void draw(BufferView *, LyXFont const &, int, float &) const;
+ void draw(PainterInfo & pi, int x, int y) const;
///
void write(Buffer const *, std::ostream &) const;
///
void read(Buffer const *, LyXLex & lex);
///
- int latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const;
+ int latex(Buffer const *, std::ostream &,
+ LatexRunParams const &) const;
///
int ascii(Buffer const *, std::ostream &, int linelen) const;
///
int docbook(Buffer const *, std::ostream &, bool mixcont) const;
///
- Inset * clone(Buffer const &, bool same_id = false) const;
+ virtual std::auto_ptr<InsetBase> clone() const;
///
void validate(LaTeXFeatures & features) const;
///
- Inset::Code lyxCode() const;
+ InsetOld::Code lyxCode() const;
///
- bool insetAllowed(Inset::Code code) const;
+ bool insetAllowed(InsetOld::Code code) const;
///
- std::vector<string> const getLabelList() const;
+ void getLabelList(std::vector<string> &) const;
///
MathAtom const & par() const { return par_; }
///
///
void generatePreview() const;
///
- void addPreview(grfx::PreviewLoader &) const;
+ void addPreview(lyx::graphics::PreviewLoader &) const;
///
- //void mutate(string const & type);
+ void mutate(string const & type);
private:
/// available in AMS only?