]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/formulamacro.h
small cleanup, doxygen, formatting changes
[lyx.git] / src / mathed / formulamacro.h
index 1a95390f977ecc0bf9c41a9ab8717fdea519cb2c..5eb113fb7215f0505e83101d582e17e00ed53657 100644 (file)
@@ -6,7 +6,7 @@
  *  Created:     January 1996
  *  Description: Allows the edition of math paragraphs inside Lyx. 
  *
- *  Copyright: (c) 1996, Alejandro Aguilar Sierra
+ *  Copyright: 1996, Alejandro Aguilar Sierra
  *
  *  Version: 0.4, Lyx project.
  *
@@ -23,9 +23,6 @@
 
 #include "formula.h"
 
-
-
-
 class MathMacroTemplate;
 
 
@@ -35,52 +32,49 @@ public:
        ///
        InsetFormulaMacro();
        ///
-       InsetFormulaMacro(string name, int na= 0, bool env= false);
+       explicit
+       InsetFormulaMacro(string name, int na = 0, bool env = false);
        ///
        ~InsetFormulaMacro();
        ///
-       int Ascent(LyXFont const &font) const;
+       int ascent(BufferView *, LyXFont const &) const;
        ///
-       int Descent(LyXFont const &font) const;
+       int descent(BufferView *, LyXFont const &) const;
        ///
-       int Width(LyXFont const &font) const;
+       int width(BufferView *, LyXFont const &) const;
        ///
-       void Draw(LyXFont font, LyXScreen &scr, int baseline, float &x);
+       void draw(BufferView *,LyXFont const &, int, float &, bool) const;
        ///
-       void Read(LyXLex &lex);
+       void Read(Buffer const *, LyXLex & lex);
         ///
-       void Write(FILE *file);
-       ///
-//     void Read(LyXLex &lex);
+       void Write(Buffer const *, std::ostream & os) const;
        ///
-       int Latex(FILE *file, signed char fragile);
+       int Latex(Buffer const *, std::ostream & os, bool fragile,
+                 bool free_spc) const;
        ///
-       int Latex(string &file, signed char fragile);
+       int Linuxdoc(Buffer const *, std::ostream & os) const;
        ///
-       int Linuxdoc(string &file);
+       int DocBook(Buffer const *, std::ostream &) const;
        ///
-       int DocBook(string &file);
+       Inset * Clone(Buffer const &) const;
        ///
-       Inset* Clone();
-
+       Inset::Code LyxCode() const { return Inset::MATHMACRO_CODE; }
        /// what appears in the minibuffer when opening
-       char const* EditMessage() {return "Math macro editor mode";}
+       string const EditMessage() const;
+       ///
+       void Edit(BufferView *, int x, int y, unsigned int button);
        ///
-       void Edit(int x, int y);
+       void InsetUnlock(BufferView *);
        ///
-       void InsetUnlock();
-   
-       bool LocalDispatch(int, char const*);
-   
-protected:
-       void UpdateLocal();
+       RESULT LocalDispatch(BufferView *, int, string const &);
+
 private:
+       ///
         bool opened;
-        string name; 
-        class MathMacroTemplate* tmacro;
-
+       ///
+        string name;
+       ///
+        MathMacroTemplate * tmacro;
 };
 
-
 #endif
-