#ifndef INSET_FORMULABASE_H
#define INSET_FORMULABASE_H
-
#include "insets/updatableinset.h"
-#include "frontends/mouse_state.h"
-#include "lyxfont.h"
+#include "dimension.h"
#include <boost/weak_ptr.hpp>
#include <iosfwd>
class BufferView;
class MathAtom;
+
/// An abstract base class for all math related LyX insets
class InsetFormulaBase : public UpdatableInset {
public:
///
InsetFormulaBase();
- ///
- virtual int ascent(BufferView *, LyXFont const &) const = 0;
- ///
- virtual int descent(BufferView *, LyXFont const &) const = 0;
- ///
- virtual int width(BufferView *, LyXFont const &) const = 0;
- ///
- virtual void draw(BufferView *,LyXFont const &, int, float &) const = 0;
/// lowest x coordinate
virtual int xlow() const;
/// highest x coordinate
// user-accessible way to override "false positives"
virtual void validate(LaTeXFeatures &) const;
///
- virtual Inset * clone(Buffer const &, bool same_id = false) const = 0;
- ///
- virtual Inset::Code lyxCode() const;
+ virtual InsetOld::Code lyxCode() const;
/// what appears in the minibuffer when opening
virtual string const editMessage() const;
///
- virtual void edit(BufferView *, int x, int y, mouse_button::state button);
- ///
- virtual void edit(BufferView *, bool front = true);
- ///
virtual void fitInsetCursor(BufferView *) const;
/// FIXME
virtual void getCursorPos(BufferView *, int &, int &) const;
/// To allow transparent use of math editing functions
//virtual void status(FuncRequest const &);
- ///
- virtual std::vector<string> const getLabelList() const;
///
virtual MathAtom const & par() const = 0;
///
protected:
///
- mutable boost::weak_ptr<BufferView> view_;
- ///
- mutable LyXFont font_;
+ //mutable boost::weak_ptr<BufferView> view_;
+ mutable BufferView * view_;
protected:
- ///
- void metrics(BufferView * bv, LyXFont const & font) const;
- ///
- void metrics(BufferView * bv = 0) const;
///
void handleFont(BufferView * bv, string const & arg, string const & font);