X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FMacroTable.h;h=bc445d43974fef7f7314160a5a8f1f43ad2d4dd3;hb=5fdc577badb1cb133d6a0dc7d831bb1f82576adb;hp=0f9f60dc41b74f8a67301f555fba3296cda6aafe;hpb=0f2069b8a5967aac1b4f841214294f1fe21d2cad;p=lyx.git diff --git a/src/mathed/MacroTable.h b/src/mathed/MacroTable.h index 0f9f60dc41..bc445d4397 100644 --- a/src/mathed/MacroTable.h +++ b/src/mathed/MacroTable.h @@ -27,6 +27,7 @@ class Buffer; class MathData; class MathMacroTemplate; class Paragraph; +class latexkeys; enum MacroType { MacroTypeNewcommand, @@ -59,9 +60,19 @@ public: /// std::vector const & defaults() const; /// - std::string const & requires() const { return requires_; } + std::string const requires() const; /// - std::string & requires() { return requires_; } + bool hidden() const; + /// + docstring const xmlname() const; + /// + char const * MathMLtype() const; + /// + latexkeys const * symbol() const { return sym_; } + /// + void setSymbol(latexkeys const * sym) { sym_ = sym; } + /// + DocIterator const & pos() { return pos_; } /// lock while being drawn to avoid recursions int lock() const { return ++lockCount_; } @@ -86,7 +97,7 @@ public: return definition_ == x.definition_ && numargs_ == x.numargs_ && display_ == x.display_ - && requires_ == x.requires_ + && sym_ == x.sym_ && optionals_ == x.optionals_ && defaults_ == x.defaults_; } @@ -118,7 +129,7 @@ private: /// mutable docstring display_; /// - std::string requires_; + latexkeys const * sym_; /// mutable size_t optionals_; /// @@ -149,7 +160,7 @@ class MacroTable : public std::map { public: /// Parse full "\\def..." or "\\newcommand..." or ... - iterator insert(Buffer * buf, docstring const & definition, std::string const &); + iterator insert(Buffer * buf, docstring const & definition); /// Insert pre-digested macro definition iterator insert(docstring const & name, MacroData const & data); /// @@ -157,7 +168,7 @@ public: /// void dump(); /// - void getMacroNames(std::set & names) const; + void getMacroNames(std::set & names, bool gethidden) const; /// the global list static MacroTable & globalMacros();