X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FMathMacro.h;h=6e795237e197d2b50480c9b69d6f0e19cde108f0;hb=5fdc577badb1cb133d6a0dc7d831bb1f82576adb;hp=157e6e64efb3f04bf5e8eb01ef852fa5acf7b9a9;hpb=0f15dcc69895c190811d98ad5f0b9bce887f53f6;p=lyx.git diff --git a/src/mathed/MathMacro.h b/src/mathed/MathMacro.h index 157e6e64ef..6e795237e1 100644 --- a/src/mathed/MathMacro.h +++ b/src/mathed/MathMacro.h @@ -122,7 +122,7 @@ public: /// docstring name() const; - /// + /// FIXME: Often dangling. MacroData const * macro() const; /// docstring macroName() const; @@ -141,6 +141,9 @@ public: size_t appetite() const; /// InsetCode lyxCode() const { return MATH_MACRO_CODE; } + /// This is not used for display; however whether it is mathrel determines + /// how to split equations intelligently. + MathClass mathClass() const; //override protected: friend class MathData; @@ -164,6 +167,14 @@ protected: void attachArguments(std::vector const & args, size_t arity, int optionals); private: + /// Math mode for output and display. UNDECIDED for user macros: they could + /// be either. + mode_type modeToEnsure() const; + /// This function is needed for now because of two shortfalls of the current + /// implementation: the macro() pointer is often dangling, in which case we + /// fall back to a backup copy, and the macro is not known at inset + /// creation, in which case we fall back to the global macro with this name. + MacroData const * macroBackup() const; /// virtual Inset * clone() const; ///