#pragma interface
#endif
-#include <iosfwd>
+#include "LString.h"
+#include "mathed/formulabase.h"
+#include "math_defs.h"
-#include "insets/lyxinset.h"
-
-class MathParInset;
-class MathedCursor;
-class Buffer;
+class MathMatrixInset;
///
-class InsetFormula: public UpdatableInset {
+class InsetFormula : public InsetFormulaBase {
public:
///
- explicit
- InsetFormula(bool display = false);
+ InsetFormula();
///
- explicit
- InsetFormula(MathParInset *);
+ explicit InsetFormula(MathInsetTypes);
///
- ~InsetFormula();
+ explicit InsetFormula(string const &);
///
int ascent(BufferView *, LyXFont const &) const;
///
///
int width(BufferView *, LyXFont const &) const;
///
- void draw(BufferView *,LyXFont const &, int, float &, bool) const;
+ void draw(BufferView *, LyXFont const &, int, float &, bool) const;
+
///
- void Write(Buffer const *, std::ostream &) const;
+ void write(std::ostream &) const;
///
- void Read(Buffer const *, LyXLex & lex);
+ void read(LyXLex & lex);
///
- int Latex(Buffer const *, std::ostream &,
+ int latex(std::ostream &,
bool fragile, bool free_spc) const;
///
- int Ascii(Buffer const *, std::ostream &, int linelen) const;
- ///
- int Linuxdoc(Buffer const *, std::ostream &) const;
- ///
- int DocBook(Buffer const *, std::ostream &) const;
- ///
- void Validate(LaTeXFeatures &) const;
- ///
- Inset * Clone(Buffer const &) const;
- ///
- Inset::Code LyxCode() const;
- ///
- LyXFont const ConvertFont(LyXFont const & f) const;
- /// what appears in the minibuffer when opening
- string const EditMessage() const;
- ///
- void Edit(BufferView *, int x, int y, unsigned int button);
- ///
- bool display() const;
- ///
- void display(bool);
- ///
- void ToggleInsetCursor(BufferView *);
- ///
- void ShowInsetCursor(BufferView *, bool show = true);
- ///
- void HideInsetCursor(BufferView *);
+ int ascii(std::ostream &, int linelen) const;
///
- void GetCursorPos(BufferView *, int &, int &) const;
+ int linuxdoc(std::ostream &) const;
///
- void ToggleInsetSelection(BufferView * bv);
- ///
- void InsetButtonPress(BufferView *, int x, int y, int button);
- ///
- void InsetButtonRelease(BufferView *, int x, int y, int button);
- ///
- void InsetKeyPress(XKeyEvent * ev);
+ int docBook(std::ostream &) const;
+
///
- void InsetMotionNotify(BufferView *, int x, int y, int state);
+ Inset * clone(Buffer const &) const;
///
- void InsetUnlock(BufferView *);
-
- /// To allow transparent use of math editing functions
- virtual RESULT LocalDispatch(BufferView *, kb_action, string const &);
-
+ void validate(LaTeXFeatures & features) const;
///
- void InsertSymbol(BufferView *, string const &);
+ Inset::Code lyxCode() const;
///
- bool SetNumber(bool);
+ virtual RESULT localDispatch(BufferView *, kb_action, string const &);
///
std::vector<string> const getLabelList() const;
-
-protected:
///
- void UpdateLocal(BufferView * bv);
+ void handleExtern(string const & arg, BufferView * bv);
///
- MathParInset * par;
+ MathMatrixInset * par() const;
///
- static MathedCursor * mathcursor;
-
-private:
- ///
- bool disp_flag_;
+ bool display() const;
///
- string label_;
+ bool ams() const;
+private:
+ /// Safe setting of contents
+ void par(MathInset *);
};
-
-
-inline
-Inset::Code InsetFormula::LyxCode() const
-{
- return Inset::MATH_CODE;
-}
-
-
-inline
-LyXFont const InsetFormula::ConvertFont(LyXFont const & f) const
-{
- // We have already discussed what was here
- LyXFont font(f);
- font.setLatex(LyXFont::OFF);
- return font;
-}
-
-
-inline
-bool InsetFormula::display() const
-{
- return (disp_flag_) ? true : false;
-}
#endif