]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathParser.h
Remove hardcoded values
[lyx.git] / src / mathed / MathParser.h
index aa798e7ccaefd3d9e6a2fe2d6c496520daa3478a..9ff6db1a91a2cb9f0f48932a99dfcda0972dc76d 100644 (file)
@@ -5,7 +5,7 @@
  * Licence details can be found in the file COPYING.
  *
  * \author Alejandro Aguilar Sierra
- * \author André Pönitz
+ * \author André Pönitz
  *
  * Full author contact details are available in file CREDITS.
  */
 #ifndef MATH_PARSER_H
 #define MATH_PARSER_H
 
-#include "mathparser_flags.h"
+#include "MathParser_flags.h"
 
-#include "support/types.h"
 #include "support/docstring.h"
 
 
 namespace lyx {
 
+class Buffer;
 class MathAtom;
 class MathData;
 class InsetMathGrid;
@@ -30,10 +30,14 @@ class Lexer;
 ///
 class latexkeys {
 public:
+       ///
+       latexkeys() : hidden(false) {}
+       ///
+       char const * MathMLtype() const;
        /// name of the macro or primitive
        docstring name;
        /// name of a inset that handles that macro
-       docstring inset;
+       std::string inset;
        /**
         * The string or symbol to draw.
         * This is a string of length 1 if \p name is a known symbol, and
@@ -53,7 +57,10 @@ public:
        /// how is this called as XML entity in MathML?
        docstring xmlname;
        /// required LaTeXFeatures
-       docstring requires;
+       std::string requires;
+       /// Should this macro be hidden from autocompletion (since it requires
+       /// user preamble code)?
+       bool hidden;
 };
 
 
@@ -61,17 +68,25 @@ public:
 latexkeys const * in_word_set(docstring const & str);
 
 /// parse formula from a string
-bool mathed_parse_normal(MathAtom &, docstring const &, Parse::flags f = Parse::NORMAL);
-/// ... the LyX lexxer
-bool mathed_parse_normal(MathAtom &, Lexer &, Parse::flags f = Parse::NORMAL);
+bool mathed_parse_normal(Buffer * buf, MathAtom &, docstring const &,
+               Parse::flags f = Parse::NORMAL);
+
+/// parse formula from the LyX lexxer
+bool mathed_parse_normal(Buffer * buf, MathAtom &, Lexer &,
+               Parse::flags f = Parse::NORMAL);
+
 /// parse formula from a string into a grid
-bool mathed_parse_normal(InsetMathGrid &, docstring const &, Parse::flags f = Parse::NORMAL);
+bool mathed_parse_normal(InsetMathGrid &, docstring const &,
+               Parse::flags f = Parse::NORMAL);
 
 /// parse a single cell from a string
-bool mathed_parse_cell(MathData & ar, docstring const &, Parse::flags f = Parse::NORMAL);
+bool mathed_parse_cell(MathData & ar, docstring const &,
+               Parse::flags f = Parse::NORMAL);
+
 /// parse a single cell from a stream. Only use this for reading from .lyx
 /// file format, for the reason see Parser::tokenize(std::istream &).
-bool mathed_parse_cell(MathData & ar, std::istream &, Parse::flags f = Parse::NORMAL);
+bool mathed_parse_cell(MathData & ar, std::istream &,
+               Parse::flags f = Parse::NORMAL);
 
 void initParser();