]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/formula.h
mathed95.diff
[lyx.git] / src / mathed / formula.h
index abc3325396fb179ca8bcddea475e3a0b3aed9a02..eb629c90e11c852e60b2c1ac42c043c360685ce9 100644 (file)
 #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;
        ///
@@ -47,85 +43,42 @@ public:
        ///
        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;
+       int ascii(std::ostream &, int linelen) const;
        ///
-       Inset * Clone(Buffer const &) const;
+       int linuxdoc(std::ostream &) const;
        ///
-       Inset::Code LyxCode() const { return Inset::MATH_CODE; }
-       ///
-       LyXFont const ConvertFont(LyXFont const & f) const {
-               // We have already discussed what was here
-               LyXFont font(f);
-               font.setLatex(LyXFont::OFF);
-               return font;
-       }
+       int docBook(std::ostream &) 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 { return (disp_flag) ? true: false; }
-       ///
-       void display(bool);
-       ///
-       void ToggleInsetCursor(BufferView *);
        ///
-       void ShowInsetCursor(BufferView *, bool show=true);
+       Inset * clone(Buffer const &) const;
        ///
-       void HideInsetCursor(BufferView *);
+       void validate(LaTeXFeatures & features) const;
        ///
-       void GetCursorPos(BufferView *, int &, int &) const;
+       Inset::Code lyxCode() 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);
-       ///
-       void InsetMotionNotify(BufferView *, int x, int y, int state);
-       ///
-       void InsetUnlock(BufferView *);
-   
-       ///  To allow transparent use of math editing functions
-       virtual RESULT LocalDispatch(BufferView *, kb_action, string const &);
-    
-       ///
-       void InsertSymbol(BufferView *, string 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 display() const;
        ///
-       bool disp_flag;
-       ///
-       string label;
+       bool ams() const;
+private:
+       /// Safe setting of contents
+       void par(MathInset *);
 };
 #endif