]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/formula.h
small cleanup, doxygen, formatting changes
[lyx.git] / src / mathed / formula.h
index 511439f38582aa75bef7236f4fc776f8342ef5c9..aa350a3f853eb7336f4473ddeb657b33f3a2f000 100644 (file)
 #pragma interface
 #endif
 
+#include <iosfwd>
+
 #include "insets/lyxinset.h"
-#include "support/LOstream.h"
 
 class MathParInset;
 class MathedCursor;
+class Buffer;
 
 ///
 class InsetFormula: public UpdatableInset {
 public:
        ///
+       explicit
        InsetFormula(bool display = false);
        ///
+       explicit
        InsetFormula(MathParInset *);
        ///
        ~InsetFormula();
        ///
-       int ascent(Painter &, LyXFont const &) const;
+       int ascent(BufferView *, LyXFont const &) const;
+       ///
+       int descent(BufferView *, LyXFont const &) const;
        ///
-       int descent(Painter &, LyXFont const &) const;
+       int width(BufferView *, LyXFont const &) const;
        ///
-       int width(Painter &, LyXFont const &) const;
+       void draw(BufferView *,LyXFont const &, int, float &, bool) const;
        ///
-       void draw(Painter &, LyXFont const &, int baseline, float & x) const;
+       void Write(Buffer const *, std::ostream &) const;
        ///
-       void Write(ostream &) const;
+       void Read(Buffer const *, LyXLex & lex);
        ///
-       void Read(LyXLex & lex);
+       int Latex(Buffer const *, std::ostream &,
+                 bool fragile, bool free_spc) const;
        ///
-       int Latex(ostream &, signed char fragile, bool free_spc) const;
+       int Ascii(Buffer const *, std::ostream &, int linelen) const;
        ///
-       int Linuxdoc(ostream &) const;
+       int Linuxdoc(Buffer const *, std::ostream &) const;
        ///
-       int DocBook(ostream &) const;
+       int DocBook(Buffer const *, std::ostream &) const;
        ///
        void Validate(LaTeXFeatures &) const;
        ///
-       Inset * Clone() const;
+       Inset * Clone(Buffer const &) const;
        ///
        Inset::Code LyxCode() const { return Inset::MATH_CODE; }
        ///
-       LyXFont ConvertFont(LyXFont font) {
+       LyXFont const ConvertFont(LyXFont const & f) const {
                // We have already discussed what was here
+               LyXFont font(f);
                font.setLatex(LyXFont::OFF);
                return font;
        }
 
        /// what appears in the minibuffer when opening
-       const char * EditMessage() const {return _("Math editor mode");}
+       string const EditMessage() const;
        ///
        void Edit(BufferView *, int x, int y, unsigned int button);
        ///
@@ -78,11 +86,11 @@ public:
        ///
        void ToggleInsetCursor(BufferView *);
        ///
-       void ShowInsetCursor(BufferView *);
+       void ShowInsetCursor(BufferView *, bool show=true);
        ///
        void HideInsetCursor(BufferView *);
        ///
-       void GetCursorPos(int &, int &) const;
+       void GetCursorPos(BufferView *, int &, int &) const;
        ///
        void ToggleInsetSelection(BufferView * bv);
        ///
@@ -100,27 +108,24 @@ public:
        virtual RESULT LocalDispatch(BufferView *, int, string const &);
     
        ///
-       void InsertSymbol(BufferView *, char const *);
+       void InsertSymbol(BufferView *, string const &);
        ///
        bool SetNumber(bool);
        ///
-       int GetNumberOfLabels() const;
-       ///
-       string getLabel(int) const;
+       std::vector<string> const getLabelList() const;
    
 protected:
+       ///
        void UpdateLocal(BufferView * bv);
+       ///
        MathParInset * par;
+       ///
        static MathedCursor * mathcursor;
     
 private:
+       ///
        bool disp_flag;
+       ///
        string label;
 };
-
-
-// If a mathinset exist at cursor pos, just lock it.
-// Otherwise create a new one, and lock it.
-bool OpenMathInset(Buffer *);
-
 #endif